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