openETCS
case study for the European Train Control System developed for the authors dissertation
Transition.h
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 #ifndef __OETCS_DF_TRANSITION_H__
26 #define __OETCS_DF_TRANSITION_H__
27 
28 
29 
30 
31 #include "EVCStateMachine.h"
32 #include "ControlFlow.h"
33 
34 
35 
36 
37 namespace oETCS { namespace DF { class CCondition; } }
38 
39 
40 namespace oETCS {
41 
42 namespace DF {
43 
44 
45 /*!
46  * \brief transition class for control flow states
47  */
49 {
50  public:
51  /*!
52  * \brief general constructor
53  *
54  * Parameterises the control flow state transition with all constant members.
55  *
56  * \param[in] pParent pointer to the parent EVC state object
57  * \param[in] pConditon pointer to the related condition object
58  * \param[in] pTargetState pointer to the startEVC state object of the transtion
59  * \param[in] pTargetState pointer to the target EVC state object of the transtion
60  * \param[in] iPriority numerical priority of the transition
61  */
62  explicit 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 = 0) throw();
63 
64 
65 
66  /*!
67  * \brief destructor
68  */
69  virtual ~CTransition() throw();
70 
71 
72 
73  /*!
74  * \brief gets the pointer to the related condition
75  *
76  * \return pointer to the related condition object
77  */
78  oETCS::DF::CCondition* const GetCondition() const throw();
79 
80 
81 
82  /*!
83  * \brief gets the pointer to the related start state
84  *
85  * \return pointer to the related start state object
86  */
87  oETCS::DF::CControlFlow::CState* const GetStartState() const throw();
88 
89 
90 
91  /*!
92  * \brief gets the pointer to the related target state
93  *
94  * \return pointer to the related target state object
95  */
96  oETCS::DF::CControlFlow::CState* const GetTargetState() const throw();
97 
98 
99 
100  /*!
101  * \brief gets the nurmerial priority
102  *
103  * \returns the numerical priority
104  */
105  unsigned int GetPriority() const throw();
106 
107 
108 
109 
110  private:
111  /*!
112  * \brief pointer to the related condition object
113  */
115 
116 
117 
118  /*!
119  * \brief pointer to the starting state of the transition
120  */
122 
123 
124 
125  /*!
126  * \brief pointer to the target state of the transition
127  */
129 
130 
131 
132  /*!
133  * \brief numerical priority of a transition
134  */
135  const int m_iPriority;
136 
137 
138 
139 
140 }; // class CTransition
141 
142 
143 
144 
145 
146 } // namespace oETCS::DF
147 
148 } // namespace oETCS
149 
150 #endif // __ OETCS_DF_TRANSITION_H__

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/.