torc::generic::PropertyContainer Class Reference

Represents objects that have properties. More...

#include <PropertyContainer.hpp>

Inheritance diagram for torc::generic::PropertyContainer:

Inheritance graph
[legend]

List of all members.

Public Member Functions

PropertySharedPtr getProperty (const std::string &inName) throw ()
bool setProperty (const std::string &inName, const PropertySharedPtr &inProperty) throw ()
void getProperties (std::map< std::string, PropertySharedPtr > &outProperties) const throw ()
void setProperties (const std::map< std::string, PropertySharedPtr > &inSource) throw ()
template<typename _Action>
void applyOnAllProperties (const _Action &action) throw (Error)

Private Member Functions

 PropertyContainer (const PropertyContainer &source) throw ()
PropertyContaineroperator= (const PropertyContainer &source) throw ()

Private Attributes

SymTab< std::string,
PropertySharedPtr > 
mProperties


Detailed Description

Represents objects that have properties.

The PropertyContainer interface is generalized by classes tat need to hold one or more properties. A property is identified by name in the container.

Definition at line 41 of file PropertyContainer.hpp.


Member Function Documentation

PropertySharedPtr torc::generic::PropertyContainer::getProperty ( const std::string &  inName  )  throw ()

Get a property

Parameters:
[in] inName Name of the property to be retreived
Returns:
Pointer to the property object if present, empty pointer otherwise.
Get a property

Parameters:
[in] name Name of the property to be retreived
Returns:
Pointer to the property object if present, empty pointer otherwise.

Definition at line 42 of file PropertyContainer.cpp.

bool torc::generic::PropertyContainer::setProperty ( const std::string &  inName,
const PropertySharedPtr &  inProperty 
) throw ()

Save the inSource of a property

Parameters:
[in] inName Name of the property to be saved
[in] inProperty Pointer to the property object if present, empty pointer otherwise.
Returns:
bool True if saved, false otherwise.
Save the inSource of a property

Parameters:
[in] inName Name of the property to be saved
[in] inPoperty Pointer to the property object if present, empty pointer otherwise.
Returns:
bool True if saved, false otherwise.

Definition at line 61 of file PropertyContainer.cpp.

void torc::generic::PropertyContainer::getProperties ( std::map< std::string, PropertySharedPtr > &  outProperties  )  const throw () [inline]

Get the map of all properties

Parameters:
[out] outProperties The map of properties
Get the map of all properties

Returns:
The map of properties

Definition at line 120 of file PropertyContainer.hpp.

void torc::generic::PropertyContainer::setProperties ( const std::map< std::string, PropertySharedPtr > &  inSource  )  throw ()

Set the map of properties

Parameters:
[in] inSource The map of properties

Definition at line 77 of file PropertyContainer.cpp.

template<typename _Action>
void torc::generic::PropertyContainer::applyOnAllProperties ( const _Action &  action  )  throw (Error) [inline]

Apply action on all properties.

Parameters:
[in] action Action to be applied

Definition at line 128 of file PropertyContainer.hpp.


The documentation for this class was generated from the following files:

Generated on Thu Oct 13 16:50:21 2011 for TORC by  doxygen 1.5.6