47 #ifndef _MIRA_PROPERTYMANAGER_H_ 48 #define _MIRA_PROPERTYMANAGER_H_ 53 #include <boost/scoped_ptr.hpp> 54 #include <boost/algorithm/string/split.hpp> 60 #include <serialization/adapters/std/list> 115 template <
typename T>
120 MIRA_THROW(XLogical,
"The property '" << name <<
"' does not exist");
136 template <
typename T>
141 MIRA_THROW(XLogical,
"The property '" << name <<
"' does not exist");
173 return mRoot->findChildNode(name);
180 return mRoot->findChildNode(name);
200 if ( node->
type() != typeName<T>() )
202 << typeName<T>() <<
"' for property '" << name
203 <<
"' does not match its real type '" 204 << node->
type() <<
"'");
220 boost::scoped_ptr<PropertyNode> mRoot;
Abstract base class for all derived property node classes.
Definition: PropertyNode.h:202
const TypedPropertyNode< T > * getPropertyNode(const std::string &name) const
Returns a typed PropertyNode that represents the specified property.
Definition: PropertyManager.h:195
specialize cv::DataType for our ImgPixel and inherit from cv::DataType<Vec>
Definition: IOService.h:67
T getProperty(const std::string &name) const
Obtains the value of the specified property.
Definition: PropertyManager.h:137
Get compiler and platform independent typenames.
#define MIRA_THROW(ex, msg)
Macro for throwing an exception.
Definition: Exception.h:82
TypedPropertyNode< T > * getPropertyNode(const std::string &name)
Returns the PropertyNode that represents the specified property.
Definition: PropertyManager.h:212
virtual void set(const value_type &value)=0
Sets the property to the specified value.
void setProperty(const std::string &name, const T &value)
Modifies the value of the specified property.
Definition: PropertyManager.h:116
PropertyManager()
Definition: PropertyManager.h:86
const Typename & type() const
Returns the type of this property as Typename.
Definition: PropertyNode.h:149
Commonly used exception classes.
Serializer that handles properties and creates PropertyNodes.
void addObject(const char *name, T &object)
Add the specified object to the PropertyManager under the specified name.
Definition: PropertyManager.h:96
const PropertyNode * getPropertyNode(const std::string &name) const
Returns the PropertyNode that represents the specified property.
Definition: PropertyManager.h:172
Core class of the logging library.
A special node that acts only as (empty) root node for a property tree.
Definition: PropertyNode.h:448
A special PropertyReflector that creates a PropertyNode for each reflected property.
Definition: PropertySerializer.h:67
const PropertyNode * getRootNode() const
Returns the root node of the managed property tree.
Definition: PropertyManager.h:151
PropertyNode * getRootNode()
Returns the root node of the managed property tree.
Definition: PropertyManager.h:158
void reflectProperties(PropertyNode *root, const std::string &name, T &object)
Reflects the properties of the specified 'object'.
Definition: PropertySerializer.h:219
PropertyNode * getPropertyNode(const std::string &name)
Returns the PropertyNode that represents the specified property.
Definition: PropertyManager.h:179
virtual value_type get() const =0
Returns the value of the property.
Abstract base class for all typed property nodes.
Definition: PropertyNode.h:70
The property manager maintains the properties of objects that are added to the manager.
Definition: PropertyManager.h:82