MRPT  1.9.9
CPropertiesValuesList.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2018, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 #ifndef CPropertiesValuesList_H
10 #define CPropertiesValuesList_H
11 
13 
14 namespace mrpt::hmtslam
15 {
16 /** An arbitrary list of "annotations", or named attributes, each being an
17  * instance of any CSerializable object.
18  * A multi-hypotheses version exists in CMHPropertiesValuesList.
19  * \sa CSerializable, CMHPropertiesValuesList, mrpt::system::TParameters
20  * \ingroup mrpt_base_grp
21  */
23 {
25  protected:
27  {
29  CSerializable::Ptr value;
30  };
31  /** The properties list: a map between strings and objects
32  */
33  std::vector<TPropertyValuePair> m_properties;
34 
35  public:
36  /** Default constructor
37  */
39 
40  /** Copy constructor
41  */
43 
44  /** Copy operator
45  */
47 
48  /** Destructor
49  */
50  virtual ~CPropertiesValuesList();
51 
52  /** Clears the list.
53  */
54  void clear();
55 
56  /** Returns the value of the property (case insensitive), or nullptr if it
57  * does not exist.
58  */
59  CSerializable::Ptr get(const std::string& propertyName) const;
60 
61  /** Sets/change the value of the property (case insensitive), making a copy
62  * of the object (or setting it to nullptr if it is the passed value)
63  */
64  void set(const std::string& propertyName, const CSerializable::Ptr& obj);
65 
66  /** Returns the number of properties in the list
67  */
68  size_t size() const;
69 
70  /** Returns the name of all properties in the list
71  */
72  std::vector<std::string> getPropertyNames() const;
73 
74 }; // End of class def.
75 }
76 #endif
77 
78 
std::vector< std::string > getPropertyNames() const
Returns the name of all properties in the list.
Classes related to the implementation of Hybrid Metric Topological (HMT) SLAM.
GLsizei GLsizei GLuint * obj
Definition: glext.h:4070
GLsizei const GLchar ** string
Definition: glext.h:4101
std::vector< TPropertyValuePair > m_properties
The properties list: a map between strings and objects.
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
size_t size() const
Returns the number of properties in the list.
The virtual base class which provides a unified interface for all persistent objects in MRPT...
Definition: CSerializable.h:30
CPropertiesValuesList & operator=(const CPropertiesValuesList &o)
Copy operator.
An arbitrary list of "annotations", or named attributes, each being an instance of any CSerializable ...



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 7d5e6d718 Fri Aug 24 01:51:28 2018 +0200 at lun nov 2 08:35:50 CET 2020