41 out << m_properties[i].name.c_str();
44 isNull = m_properties[i].value.present() ? 1:0;
47 if (m_properties[i].
value.present())
48 out << *m_properties[i].
value;
70 m_properties.resize(
n);
76 m_properties[i].name = nameBuf;
82 m_properties[i].value.set( static_cast<CSerializable*>(NULL) );
84 in >> m_properties[i].value;
113 m_properties ( o.m_properties )
116 it->value.make_unique();
124 if (
this!=&o)
return *
this;
128 it->value.make_unique();
150 if (!
os::_strcmpi(propertyName.c_str(),it->name.c_str()))
154 return CSerializablePtr();
167 if (!
os::_strcmpi(propertyName.c_str(),it->name.c_str()))
171 if (!
obj) it->value.clear_unique();
172 else it->value =
obj;
184 printf(
"Exception while setting annotation '%s'",propertyName.c_str()); \
201 std::vector<std::string> ret;
204 ret.push_back(it->name);
CPropertiesValuesList & operator=(const CPropertiesValuesList &o)
Copy operator.
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
std::vector< TPropertyValuePair > m_properties
The properties list: a map between strings and objects.
#define MRPT_END_WITH_CLEAN_UP(stuff)
This namespace provides a OS-independent interface to many useful functions: filenames manipulation...
The virtual base class which provides a unified interface for all persistent objects in MRPT...
std::vector< std::string > getPropertyNames() const
Returns the name of all properties in the list.
void clear()
Clears the list.
void readFromStream(mrpt::utils::CStream &in, int version)
Introduces a pure virtual method responsible for loading from a CStream This can not be used directly...
const Scalar * const_iterator
IMPLEMENTS_SERIALIZABLE(CLogFileRecord_FullEval, CHolonomicLogFileRecord, mrpt::nav) IMPLEMENTS_SERIALIZABLE(CHolonomicFullEval
GLsizei GLsizei GLuint * obj
void clear()
Clear the contents of this container.
CSerializablePtr get(const std::string &propertyName) const
Returns the value of the property (case insensitive), or NULL if it does not exist.
size_t size() const
Returns the number of properties in the list.
virtual ~CPropertiesValuesList()
Destructor.
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
An arbitrary list of "annotations", or named attributes, each being an instance of any CSerializable ...
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
GLsizei const GLchar ** string
void set(const std::string &propertyName, const CSerializablePtr &obj)
Sets/change the value of the property (case insensitive), making a copy of the object (or setting it ...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
int BASE_IMPEXP _strcmpi(const char *str1, const char *str2) MRPT_NO_THROWS
An OS-independent version of strcmpi.
CPropertiesValuesList()
Default constructor.
typedef void(APIENTRYP PFNGLBLENDCOLORPROC)(GLclampf red
GLsizei const GLfloat * value
unsigned __int32 uint32_t