openETCS
case study for the European Train Control System developed for the authors dissertation
AbstractModel.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 abstract model classes
23  */
24 
25 #ifndef __OETCS_GEN_ABSTRACTMODEL_H__
26 #define __OETCS_GEN_ABSTRACTMODEL_H__
27 
28 
29 
30 
31 #include <string>
32 #include <list>
33 
34 
35 
36 
37 
38 namespace oETCS {
39 
40 namespace GEN {
41 
42 
43 /*!
44  * \brief node representing a function block object in the abstract model
45  */
46 struct CFBNode
47 {
48  /*!
49  * \brief enumeration type for nodes
50  */
52  {
53  /*!
54  * \brief defined state
55  */
56  DEFINED = 0,
57 
58  /*!
59  * \brief undefined state
60  */
62 
63 
64  }; // enum NODE_TYPE_T
65 
66 
67 
68  /*!
69  * \brief default/general constructor
70  *
71  * \param[in] OID optional string with the OID
72  * \param[in] eState optional enum with the state of the node
73  * \param[in] Inputs optional list of pointers to CFBNode objects defined as inputs
74  */
75  CFBNode(const std::string & OID = "", const NODE_TYPE_T & eState = ::oETCS::GEN::CFBNode::UNDEFINED, const ::std::list< CFBNode * > & Inputs = ::std::list< ::oETCS::GEN::CFBNode* >(0)) throw();
76 
77 
78 
79  /*!
80  * \brief OID of the corresponding function block object
81  */
82  ::std::string m_OID;
83 
84 
85 
86  /*!
87  * \brief state of the node
88  */
90 
91 
92 
93  /*!
94  * \brief list with pointer to all nodes being inputs of current node
95  */
96  ::std::list< CFBNode* > m_Inputs;
97 
98 
99 
100 
101 }; // struct CFBNode
102 
103 
104 
105 
106 
107 } // namespace oETCS::GEN
108 
109 } // namespace oETCS
110 
111 #endif // __ OETCS_GEN_ABSTRACTMODEL_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/.