openETCS
case study for the European Train Control System developed for the authors dissertation
|
storage class for holding any available meta model data type More...
#include <Storage.h>
Public Member Functions | |
virtual void | Calculate () throw (::oETCS::DF::Error::CException) |
virtual method for computing all outputs and setting the all referenced outputs | |
CStorage (oETCS::DF::CEVCStateMachine *const pStateMachine, const bool &bDebug=false, const std::string &DebugName="") throw () | |
general constructor | |
::std::vector< bool > | GetBitVector (const unsigned long &lSize) const throw () |
gets a bit vector corresponding to the value | |
oETCS::DF::DATA_T | GetLastInputType () const throw () |
gets the type of the last used input during Calculate() | |
virtual | ~CStorage () throw () |
destructor |
Public Attributes | |
oETCS::DF::BOOL_CONTAINER_T | m_bBoolInput |
container of the boolean input | |
::std::vector < oETCS::DF::CBitFlow * > | m_BitValue |
vector of pointers to bit flows | |
::std::vector < oETCS::DF::BOOL_OUTPUT_T > | m_BoolValue |
pointers to boolean storages | |
oETCS::DF::DOUBLE_CONTAINER_T | m_dDoubleInput |
container of the double input | |
oETCS::DF::DOUBLE_ARRAY_CONTAINER_T | m_DoubleArrayInput |
container of the double array input | |
::std::vector < oETCS::DF::DOUBLE_ARRAY_OUTPUT_T > | m_DoubleArrayValue |
pointers to double array storages | |
::std::vector < oETCS::DF::DOUBLE_OUTPUT_T > | m_DoubleValue |
pointers to double storages | |
oETCS::DF::INT_CONTAINER_T | m_iIntInput |
container of the integer input | |
::std::vector < oETCS::DF::INT_OUTPUT_T > | m_IntValue |
pointers to interger storages | |
oETCS::DF::CEVCStateMachine *const | m_pStateMachine |
pointer to the all contenting EVC state machine | |
oETCS::DF::STRING_CONTAINER_T | m_StringInput |
container of the string input | |
::std::vector < oETCS::DF::STRING_OUTPUT_T > | m_StringValue |
pointers to string storages |
Private Attributes | |
const bool | m_bDebug |
flag for debug output | |
const std::string | m_DebugName |
name of instance for debug output | |
oETCS::DF::DATA_T | m_eLastInputType |
type of the input within the last cycle (call of Calculate()) |
storage class for holding any available meta model data type
|
explicit |
general constructor
[in] | pStateMachine | pointer to the parent EVC state machine object |
[in] | bDebug | optinal flag for using debug ouput of value |
[in] | DebugName | optional name for the debug output |
Definition at line 36 of file Storage.cpp.
|
virtual |
destructor
Definition at line 57 of file Storage.cpp.
|
virtual |
virtual method for computing all outputs and setting the all referenced outputs
Implements oETCS::DF::CFunctionBlock.
Definition at line 68 of file Storage.cpp.
References oETCS::DF::BOOL, oETCS::DF::DOUBLE, oETCS::DF::DOUBLE_ARRAY, oETCS::DF::INT, oETCS::DF::CFunctionBlock::CInput< INPUT_TYPE_T >::IsModified(), m_bBoolInput, m_bDebug, m_BitValue, m_BoolValue, m_dDoubleInput, m_DebugName, m_DoubleArrayInput, m_DoubleArrayValue, m_DoubleValue, m_eLastInputType, m_iIntInput, m_IntValue, m_StringInput, m_StringValue, oETCS::DF::CFunctionBlock::CInput< INPUT_TYPE_T >::m_Value, and oETCS::DF::STRING.
Referenced by oETCS::DF::CVariable::Calculate(), and oETCS::UT::CFunctionBlock::TestStorage().
std::vector< bool > oETCS::DF::CStorage::GetBitVector | ( | const unsigned long & | lSize | ) | const throw () |
gets a bit vector corresponding to the value
If the required size is smaller than the calculated needed size, the vector is truncated. In case of an array, the vector is truncated+ element-wise.
[in] | lSize | required size of the bit vector |
Definition at line 298 of file Storage.cpp.
References oETCS::DF::BOOL, oETCS::DF::DOUBLE, oETCS::DF::DOUBLE_ARRAY, oETCS::DF::INT, and oETCS::DF::STRING.
oETCS::DF::DATA_T oETCS::DF::CStorage::GetLastInputType | ( | ) | const throw () |
gets the type of the last used input during Calculate()
Definition at line 428 of file Storage.cpp.
References m_eLastInputType.
oETCS::DF::BOOL_CONTAINER_T oETCS::DF::CStorage::m_bBoolInput |
container of the boolean input
Definition at line 108 of file Storage.h.
Referenced by Calculate(), oETCS::UT::CEVCStateMachine::setUp(), oETCS::UT::CControlFlow::setUp(), and oETCS::UT::CFunctionBlock::TestStorage().
|
private |
::std::vector< oETCS::DF::CBitFlow* > oETCS::DF::CStorage::m_BitValue |
vector of pointers to bit flows
Definition at line 178 of file Storage.h.
Referenced by Calculate(), and oETCS::UT::CFunctionBlock::setUp().
::std::vector< oETCS::DF::BOOL_OUTPUT_T > oETCS::DF::CStorage::m_BoolValue |
pointers to boolean storages
Definition at line 143 of file Storage.h.
Referenced by Calculate(), oETCS::UT::CFunctionBlock::setUp(), oETCS::UT::CLanguage::setUp(), oETCS::UT::CEVCStateMachine::setUp(), and oETCS::UT::CControlFlow::setUp().
oETCS::DF::DOUBLE_CONTAINER_T oETCS::DF::CStorage::m_dDoubleInput |
container of the double input
Definition at line 115 of file Storage.h.
Referenced by Calculate(), oETCS::DF::CVariable::Calculate(), and oETCS::UT::CFunctionBlock::TestStorage().
|
private |
name of instance for debug output
Definition at line 201 of file Storage.h.
Referenced by Calculate().
oETCS::DF::DOUBLE_ARRAY_CONTAINER_T oETCS::DF::CStorage::m_DoubleArrayInput |
container of the double array input
Definition at line 122 of file Storage.h.
Referenced by Calculate(), oETCS::DF::CVariable::Calculate(), and oETCS::UT::CFunctionBlock::TestStorage().
::std::vector< oETCS::DF::DOUBLE_ARRAY_OUTPUT_T > oETCS::DF::CStorage::m_DoubleArrayValue |
pointers to double array storages
Definition at line 157 of file Storage.h.
Referenced by Calculate(), oETCS::UT::CFunctionBlock::setUp(), and oETCS::UT::CLanguage::setUp().
::std::vector< oETCS::DF::DOUBLE_OUTPUT_T > oETCS::DF::CStorage::m_DoubleValue |
pointers to double storages
Definition at line 150 of file Storage.h.
Referenced by Calculate(), oETCS::UT::CFunctionBlock::setUp(), and oETCS::UT::CLanguage::setUp().
|
private |
type of the input within the last cycle (call of Calculate())
Definition at line 187 of file Storage.h.
Referenced by Calculate(), and GetLastInputType().
oETCS::DF::INT_CONTAINER_T oETCS::DF::CStorage::m_iIntInput |
container of the integer input
Definition at line 129 of file Storage.h.
Referenced by Calculate(), oETCS::DF::CVariable::Calculate(), and oETCS::UT::CFunctionBlock::TestStorage().
::std::vector< oETCS::DF::INT_OUTPUT_T > oETCS::DF::CStorage::m_IntValue |
pointers to interger storages
Definition at line 164 of file Storage.h.
Referenced by Calculate(), oETCS::UT::CFunctionBlock::setUp(), and oETCS::UT::CLanguage::setUp().
|
inherited |
pointer to the all contenting EVC state machine
Definition at line 894 of file EVCStateMachine.h.
Referenced by oETCS::DF::CCondition::Calculate(), and oETCS::DF::CDMIOutput::Calculate().
oETCS::DF::STRING_CONTAINER_T oETCS::DF::CStorage::m_StringInput |
container of the string input
Definition at line 136 of file Storage.h.
Referenced by Calculate(), oETCS::DF::CVariable::Calculate(), and oETCS::UT::CFunctionBlock::TestStorage().
::std::vector< oETCS::DF::STRING_OUTPUT_T > oETCS::DF::CStorage::m_StringValue |
pointers to string storages
Definition at line 171 of file Storage.h.
Referenced by Calculate(), oETCS::UT::CFunctionBlock::setUp(), and oETCS::UT::CLanguage::setUp().
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/.