openETCS
case study for the European Train Control System developed for the authors dissertation
|
state class within a control flow More...
#include <ControlFlow.h>
Public Member Functions | |
CState (CControlFlow *const pParent, const std::string &StateName, const ::std::vector< oETCS::DF::CFunctionBlock * > &FunctionBlocks, const ::std::vector< oETCS::DF::CAbstractFlow * > &Flows, const bool &bIsFinal=false, const bool &bIsInitial=false) throw () | |
general constructor | |
void | Execute () throw (::oETCS::DF::Error::CException) |
executes the state including data flow and possible transitions | |
bool | IsActiveFlow (const oETCS::DF::CAbstractFlow *const pFlow) const throw () |
returns true, if a CFlow object is active in a control flow | |
bool | IsActiveFunctionBlock (const oETCS::DF::CFunctionBlock *const pFunctionBlock) const throw () |
returns true, if a CFunctionBlock objects is active in a control flow | |
virtual | ~CState () throw () |
Public Attributes | |
const bool | m_bIsFinal |
flag for a final state | |
const ::std::string | m_Name |
literal name of the state |
Private Attributes | |
::std::vector < oETCS::DF::CAbstractFlow * > | m_Flows |
vector with pointer to all flows/connections used in a control flow state | |
const ::std::vector < oETCS::DF::CFunctionBlock * > | m_FunctionBlocks |
vector with pointers to all function block objects, which are executed in a state | |
CControlFlow *const | m_pParent |
pointer to the parent control flow object | |
::std::vector < oETCS::DF::CTransition * > | m_TransitionStack |
vector with pointers to transition objects, which were activated |
Friends | |
class | oETCS::DF::CCondition |
state class within a control flow
Definition at line 58 of file ControlFlow.h.
oETCS::DF::CControlFlow::CState::CState | ( | CControlFlow *const | pParent, |
const std::string & | StateName, | ||
const ::std::vector< oETCS::DF::CFunctionBlock * > & | FunctionBlocks, | ||
const ::std::vector< oETCS::DF::CAbstractFlow * > & | Flows, | ||
const bool & | bIsFinal = false , |
||
const bool & | bIsInitial = false |
||
) | throw () |
general constructor
Parameterises the state with all constant members. The data flow object takes over the posession of the passed data flow object.
[in] | pParent | pointer to the parent control flow object |
[in] | StateName | literal name of the state |
[in] | FunctionBlocks | vector with pointers to function blocks, which are executed by this state |
[in] | Flows | vector with pointer to flow objects, which connect function blocks in this state |
[in] | bIsFinal | optinal flag for a final state |
[in] | bIsFinal | optinal flag for the initial state |
Definition at line 36 of file ControlFlow.cpp.
|
virtual |
Definition at line 59 of file ControlFlow.cpp.
void oETCS::DF::CControlFlow::CState::Execute | ( | ) | throw (::oETCS::DF::Error::CException) |
executes the state including data flow and possible transitions
Definition at line 143 of file ControlFlow.cpp.
Referenced by oETCS::DF::CControlFlow::Calculate().
bool oETCS::DF::CControlFlow::CState::IsActiveFlow | ( | const oETCS::DF::CAbstractFlow *const | pFlow | ) | const throw () |
returns true, if a CFlow object is active in a control flow
[in] | pFlow | pointer to a concerete flow object |
Definition at line 104 of file ControlFlow.cpp.
References oETCS::DF::CControlFlow::IsActiveFlow().
Referenced by oETCS::DF::CControlFlow::IsActiveFlow().
bool oETCS::DF::CControlFlow::CState::IsActiveFunctionBlock | ( | const oETCS::DF::CFunctionBlock *const | pFunctionBlock | ) | const throw () |
returns true, if a CFunctionBlock objects is active in a control flow
[in] | pFunctionBlock | pointer to a function block object to be testetd |
Definition at line 70 of file ControlFlow.cpp.
References oETCS::DF::CControlFlow::IsActiveFunctionBlock().
Referenced by oETCS::DF::CControlFlow::IsActiveFunctionBlock().
|
friend |
Definition at line 153 of file ControlFlow.h.
const bool oETCS::DF::CControlFlow::CState::m_bIsFinal |
flag for a final state
Definition at line 119 of file ControlFlow.h.
|
private |
vector with pointer to all flows/connections used in a control flow state
Definition at line 149 of file ControlFlow.h.
|
private |
vector with pointers to all function block objects, which are executed in a state
Definition at line 142 of file ControlFlow.h.
const ::std::string oETCS::DF::CControlFlow::CState::m_Name |
literal name of the state
Definition at line 112 of file ControlFlow.h.
Referenced by oETCS::DF::CControlFlow::Calculate().
|
private |
pointer to the parent control flow object
Definition at line 128 of file ControlFlow.h.
|
private |
vector with pointers to transition objects, which were activated
Definition at line 135 of file ControlFlow.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/.