openETCS
case study for the European Train Control System developed for the authors dissertation
Property.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_PROPERTY_H__
26 #define __GOPPRR_PROPERTY_H__
27 
28 
29 
30 
31 #include <string>
32 #include <map>
33 #include "Concept.h"
34 
35 
36 namespace GOPPRR { struct CNonProperty; }
37 
38 
39 namespace GOPPRR {
40 
41 
42 /*!
43  * \brief property class representation
44  */
45 struct CProperty : public GOPPRR::CConcept
46 {
47  /*!
48  * \brief general constructor
49  *
50  * \param[in] OID object identifier
51  * \param[in] Type literal name of the type
52  */
53  CProperty(const ::std::string& OID = "", const ::std::string& Type = "", const ::std::string& Value = "", const std::map< ::std::string, ::GOPPRR::CNonProperty* >& NonProperties = std::map< ::std::string, ::GOPPRR::CNonProperty* >()) throw();
54 
55 
56 
57  /*!
58  * \brief copy constructor
59  *
60  * \param[in] Source object to copy
61  */
62  CProperty(const CProperty & Source) throw();
63 
64 
65 
66  /*!
67  * \brief destructor
68  */
69  virtual ~CProperty() throw();
70 
71 
72 
73  /*!
74  * \brief assignment operator
75  *
76  * \param[in] Source object instance to assign from
77  */
78  CProperty & operator=(const CProperty& Source) throw();
79 
80 
81 
82  /*!
83  * \brief abstraction method
84  *
85  * Gets certain non-properties of a property object
86  *
87  * \param[in] Type non-property type
88  * \param[in] bSubString if true, Type only must be a substring of nin-property type
89  *
90  * \return map of pointers to non-properties
91  */
92  ::std::map< ::std::string, GOPPRR::CNonProperty* > NonProperties(const ::std::string& Type, const bool& bSubString = false) const throw();
93 
94 
95 
96  /*!
97  * \brief value as string
98  */
99  ::std::string m_Value;
100 
101 
102 
103  /*!
104  * \brief set of non-propeties as property value
105  */
106  ::std::map< std::string,GOPPRR::CNonProperty* > m_NonProperties;
107 
108 
109 
110 
111 }; // struct CProperty : public GOPPRR::CConcept
112 
113 
114 
115 
116 
117 } // namespace GOPPRR
118 
119 #endif // __ GOPPRR_PROPERTY_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/.