openETCS
case study for the European Train Control System developed for the authors dissertation
Transition.cpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2010-2012
3  Johannes Feuser <feuser@uni-bremen.de>
4  This file is part of the openETCS library.
5 
6  The openETCS library is free software: you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  any later version.
10 
11  The openETCS library is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with the openETCS library. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 /*!
21  * \author Johannes Feuser <feuser@uni-bremen.de>
22  * \brief transition class for control flows
23  */
24 
25 #include "Transition.h"
26 #include "Condition.h"
27 
28 
29 
30 
31 namespace oETCS {
32 
33 namespace DF {
34 
35 
36 CTransition::CTransition(oETCS::DF::CEVCStateMachine::CEVCState * const pParent, oETCS::DF::CCondition * const pCondition, oETCS::DF::CControlFlow::CState * const pStartState, oETCS::DF::CControlFlow::CState * const pTargetState, const unsigned int & iPriority) throw()
37 :m_pCondition(pCondition),
38  m_pStartState(pStartState),
39  m_pTargetState(pTargetState),
40  m_iPriority(iPriority)
41 {
42  // Bouml preserved body begin 00068782
43  // add this instance to parent EVC state object
44  pParent->AddTransition(this);
45  // Bouml preserved body end 00068782
46 
47 } // CTransition::CTransition() throw()
48 
49 
50 
51 
53 {
54  // Bouml preserved body begin 00068802
55  // empty destructor
56  // Bouml preserved body end 00068802
57 
58 } // CTransition::~CTransition() throw()
59 
60 
61 
62 
64 {
65  // Bouml preserved body begin 00074B02
66  // return pointer to related condition object
67  return m_pCondition;
68  // Bouml preserved body end 00074B02
69 
70 } // oETCS::DF::CCondition CTransition::GetCondition() const throw()
71 
72 
73 
74 
76 {
77  // Bouml preserved body begin 00074B82
78  // return pointer to related start state object
79  return m_pStartState;
80  // Bouml preserved body end 00074B82
81 
82 } // oETCS::DF::CControlFlow::CState CTransition::GetStartState() const throw()
83 
84 
85 
86 
88 {
89  // Bouml preserved body begin 00074C02
90  // return pointer to related target state object
91  return m_pTargetState;
92  // Bouml preserved body end 00074C02
93 
94 } // oETCS::DF::CControlFlow::CState CTransition::GetTargetState() const throw()
95 
96 
97 
98 
99 unsigned int CTransition::GetPriority() const throw()
100 {
101  // Bouml preserved body begin 00074C82
102  // return numerical priority
103  return m_iPriority;
104  // Bouml preserved body end 00074C82
105 
106 } // unsigned int CTransition::GetPriority() const throw()
107 
108 
109 
110 
111 
112 
113 } // namespace oETCS::DF
114 
115 } // namespace oETCS

Copyright (C) 2010-2012 Johannes Feuser (feuser@uni-bremen.de)
The openETCS library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.
The openETCS library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with the openETCS library. If not, see "http://www.gnu.org/licenses/.