#include <Property.hpp>
Public Types | |
typedef VisitorType< Property > | Visitor |
Public Member Functions | |
virtual void | accept (BaseVisitor &inoutVisitor) throw (Error) |
const Value | getValue () const throw () |
void | setValue (const Value &inSource) throw () |
const Unit | getUnit () const throw () |
void | setUnit (const Unit &inSource) throw () |
const std::string | getOwner () const throw () |
void | setOwner (const std::string &inSource) throw () |
void | getChildren (std::map< std::string, PropertySharedPtr > &outValues) const throw () |
template<typename _Action> | |
void | applyOnAllChildren (const _Action &action) throw (Error) |
void | setChildren (const std::map< std::string, PropertySharedPtr > &inSource) throw () |
bool | addChildProperty (const std::string &inName, const PropertySharedPtr &inProperty) throw () |
Private Attributes | |
std::string | mOwner |
Unit | mUnit |
Value | mValue |
SymTab< std::string, PropertySharedPtr > | mChildren |
Friends | |
class | FactoryType< Property > |
Classes | |
class | Factory |
Definition at line 50 of file Property.hpp.
void torc::generic::Property::accept | ( | BaseVisitor & | inoutVisitor | ) | throw (Error) [virtual] |
Recive a inoutVisitor to this class. The visit method of the inoutVisitor is called and a reference to this object is passed as a parameter. It has to be noted however, that a dynamic_cast is performed inside this method. If the cast fails, an appropriate exception is thrown by this method. This sitation can arise when the passed Visitor object does not inherit from the appropriate inoutVisitor specialization. See Visitor documentation for more details.
[in,out] | inoutVisitor | A reference to the inoutVisitor object |
Error | Visitor type inappropriate for visiting this object or any other error thrown by the Visitor::throw() method. |
Implements torc::generic::Visitable.
Definition at line 37 of file Property.cpp.
const Value torc::generic::Property::getValue | ( | ) | const throw () [inline] |
void torc::generic::Property::setValue | ( | const Value & | inSource | ) | throw () |
Set the Property inSource.
[in] | inSource | Value of property. |
Definition at line 66 of file Property.cpp.
const Unit torc::generic::Property::getUnit | ( | ) | const throw () [inline] |
void torc::generic::Property::setUnit | ( | const Unit & | inSource | ) | throw () |
Set the Property inSource unit.
[in] | inSource | Unit of property. |
Definition at line 76 of file Property.cpp.
const std::string torc::generic::Property::getOwner | ( | ) | const throw () [inline] |
Get the owner/source of this property.
Definition at line 226 of file Property.hpp.
void torc::generic::Property::setOwner | ( | const std::string & | inSource | ) | throw () |
Set the owner/source of this property.
[in] | inSource | Owner of this property |
Definition at line 86 of file Property.cpp.
void torc::generic::Property::getChildren | ( | std::map< std::string, PropertySharedPtr > & | outValues | ) | const throw () [inline] |
Get the nested properties.
[out] | outValues | map Containing properties |
Definition at line 236 of file Property.hpp.
void torc::generic::Property::applyOnAllChildren | ( | const _Action & | action | ) | throw (Error) [inline] |
Apply action on all children.
[in] | action | Action to be applied |
Definition at line 243 of file Property.hpp.
void torc::generic::Property::setChildren | ( | const std::map< std::string, PropertySharedPtr > & | inSource | ) | throw () |
Set the nested properties.
[in] | inSource | Map containing properties |
Definition at line 96 of file Property.cpp.
bool torc::generic::Property::addChildProperty | ( | const std::string & | inName, | |
const PropertySharedPtr & | inProperty | |||
) | throw () |
Add a nested property to this property
[in] | inName | Nested property name |
[in] | inProperty | Nested property |
Definition at line 113 of file Property.cpp.