openETCS
case study for the European Train Control System developed for the authors dissertation
Connection.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2010-2011
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
23  */
24 
25 #ifndef __GOPPRR_CONNECTION_H__
26 #define __GOPPRR_CONNECTION_H__
27 
28 
29 #include <string>
30 
31 #include <vector>
32 
33 
34 namespace GOPPRR { struct CObject; }
35 namespace GOPPRR { struct CRole; }
36 namespace GOPPRR { struct CPort; }
37 
38 
39 namespace GOPPRR {
40 
41 
42 /*!
43  * \brief connection class reprensentation
44  */
45 struct CConnection
46 {
47  /*!
48  * \brief connection call class reprensentation
49  */
50  struct CCall
51  {
52  /*!
53  * \brief default/general constructor
54  *
55  * default/general constructor
56  *
57  * \param{in] pObject: pointer to object in call
58  * \param{in] pRole: pointer to role in call
59  * \param{in] pPort: pointer to optinal port in call
60  */
61  CCall(GOPPRR::CObject * const pObject, GOPPRR::CRole * const pRole, GOPPRR::CPort * const pPort = 0) throw();
62 
63 
64 
65  /*!
66  * \brief copy constructor
67  *
68  * \param[in] Source object to copy
69  */
70  CCall(const CCall & Source) throw();
71 
72 
73 
74  virtual ~CCall() throw();
75 
76 
77 
78  /*!
79  * \brief assignment operator
80  *
81  * \param[in] Source object instance to assign from
82  */
83  CCall & operator=(const CCall& Source) throw();
84 
85 
86 
87  /*!
88  * \brief pointer to an optinal port in a connection call
89  */
91 
92 
93 
94  /*!
95  * \brief pointer to a objectin a connection call
96  */
98 
99 
100 
101  /*!
102  * \brief pointer to a role in a connection call
103  */
105 
106 
107 
108 
109  }; // struct CCall
110 
111 
112 
113 
114  /*!
115  * \brief default/general constructor
116  *
117  * \param{in] ObjectSet: new object set
118  * \param{in] PortSet: new port set
119  * \param{in] Role: new roleset
120  */
121  CConnection(const ::std::vector< ::GOPPRR::CConnection::CCall >& Calls = ::std::vector< ::GOPPRR::CConnection::CCall >()) throw();
122 
123 
124 
125  /*!
126  * \brief copy constructor
127  *
128  * \param[in] Source object to copy
129  */
130  CConnection(const CConnection& Source) throw();
131 
132 
133 
134  /*!
135  * \brief destructor
136  */
137  virtual ~CConnection() throw();
138 
139 
140 
141  /*!
142  * \brief assignment operator
143  *
144  * \param[in] Source object instance to assign from
145  */
146  CConnection & operator=(const CConnection& Source) throw();
147 
148 
149 
150  /*!
151  * \brief connection calls of connection
152  */
153  ::std::vector< CCall > m_Calls;
154 
155 
156 
157 
158 }; // struct CConnection
159 
160 
161 
162 
163 
164 } // namespace GOPPRR
165 
166 #endif // __ GOPPRR_CONNECTION_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/.