MeVisLabToolboxReference
ml::PropertyManager Class Reference

#include <mlPropertyManager.h>

Inheritance diagram for ml::PropertyManager:
ml::Base ml::IntrusivePtrBase< PropertyManager >

List of all members.

Public Types

typedef PropertyManager type
typedef boost::intrusive_ptr
< type
Pointer
typedef boost::intrusive_ptr
< const type
ConstPointer
typedef std::map< std::string,
PropertyValue
PropertyMap

Public Member Functions

 PropertyManager ()
 Empty default constructor.
 PropertyManager (const PropertyManager &other)
 Copy Constructor.
 ~PropertyManager ()
PropertyManageroperator= (const PropertyManager &item)
 Assignment operator. Resets all registered GraphProperties.
bool operator== (const PropertyManager &other) const
 Comparison operator, checks names and defaultValues without respect to their order.
void clearProperties ()
 Clear the list of property names and all registered GraphProperties.
size_t createProperty (const std::string &name, const PropertyValue &defaultValue)
 Create property with name name and return its' index.
const PropertyValuegetPropertyDefault (size_t propertyIndex) const
 Get the default value that is set for the property.
const PropertyValuegetPropertyDefault (const std::string &propertyName) const
PropertyMap getPropertyDefaultMap () const
 Get a map of property-names and default-values.
size_t getPropertyIndex (const std::string &propertyName) const
 Return the index of property with name name. Throws ML_BAD_PARAMETER if the property does not exist.
const std::string & getPropertyName (size_t index) const
 Return the name of property with index index.
const std::vector< std::string > & getPropertyNames () const
 Return the list of available property names.
template<typename T >
std::vector< std::string > getPropertyNames () const
 Return a list of names of properties of type T.
bool hasProperty (const std::string &name) const
 Returns whether a property with name name exists.
size_t numberOfProperties () const
 Return the number of properties currently available.
void removeProperty (const std::string &name)
 Remove property with name name. Throws ML_BAD_PARAMETER if the property does not exists.
Persistence
virtual void addStateToTree (TreeNode *parent) const
 Attaches the object state as children of the given parent node.
 ML_SET_ADDSTATE_VERSION (1)
 Set current addStateToTree() version number:
virtual void readStateFromTree (TreeNode *parent)
 Reads the object state from the children of the given parent node.

Static Public Member Functions

template<typename T >
static void logObjectConstructor (const T *object)
template<typename T >
static void logObjectDestructor (const T *object)
static void allowDestruction (void *location)

Friends

class PropertyContainer
class SmartPropertyIndex

Detailed Description

Definition at line 30 of file mlPropertyManager.h.


Member Typedef Documentation

typedef boost::intrusive_ptr<const type> ml::PropertyManager::ConstPointer

Definition at line 34 of file mlPropertyManager.h.

typedef boost::intrusive_ptr<type> ml::PropertyManager::Pointer

Definition at line 33 of file mlPropertyManager.h.

typedef std::map<std::string, PropertyValue> ml::PropertyManager::PropertyMap

Definition at line 35 of file mlPropertyManager.h.

Definition at line 32 of file mlPropertyManager.h.


Constructor & Destructor Documentation

ml::PropertyManager::PropertyManager ( )

Empty default constructor.

ml::PropertyManager::PropertyManager ( const PropertyManager other)

Copy Constructor.

ml::PropertyManager::~PropertyManager ( )

Member Function Documentation

virtual void ml::PropertyManager::addStateToTree ( TreeNode parent) const [virtual]

Attaches the object state as children of the given parent node.

Reimplemented from ml::Base.

static void ml::PropertyManager::allowDestruction ( void *  location) [static]
void ml::PropertyManager::clearProperties ( )

Clear the list of property names and all registered GraphProperties.

size_t ml::PropertyManager::createProperty ( const std::string &  name,
const PropertyValue defaultValue 
)

Create property with name name and return its' index.

If a property with this name already exists, just return the corresponding index.

Referenced by ml::DefaultPropertyAccessor< T >::operator()().

const PropertyValue& ml::PropertyManager::getPropertyDefault ( size_t  propertyIndex) const [inline]

Get the default value that is set for the property.

Definition at line 65 of file mlPropertyManager.h.

const PropertyValue& ml::PropertyManager::getPropertyDefault ( const std::string &  propertyName) const [inline]

Definition at line 66 of file mlPropertyManager.h.

PropertyMap ml::PropertyManager::getPropertyDefaultMap ( ) const

Get a map of property-names and default-values.

size_t ml::PropertyManager::getPropertyIndex ( const std::string &  propertyName) const

Return the index of property with name name. Throws ML_BAD_PARAMETER if the property does not exist.

const std::string& ml::PropertyManager::getPropertyName ( size_t  index) const [inline]

Return the name of property with index index.

Definition at line 75 of file mlPropertyManager.h.

std::vector< std::string > ml::PropertyManager::getPropertyNames ( ) const [inline]

Return the list of available property names.

Definition at line 78 of file mlPropertyManager.h.

template<typename T >
std::vector<std::string> ml::PropertyManager::getPropertyNames ( ) const

Return a list of names of properties of type T.

bool ml::PropertyManager::hasProperty ( const std::string &  name) const [inline]

Returns whether a property with name name exists.

Definition at line 85 of file mlPropertyManager.h.

template<typename T >
void ml::PropertyManager::logObjectConstructor ( const T *  object) [static]

Definition at line 162 of file mlPropertyManager.h.

template<typename T >
void ml::PropertyManager::logObjectDestructor ( const T *  object) [static]

Definition at line 172 of file mlPropertyManager.h.

ml::PropertyManager::ML_SET_ADDSTATE_VERSION ( )

Set current addStateToTree() version number:

size_t ml::PropertyManager::numberOfProperties ( ) const [inline]

Return the number of properties currently available.

Definition at line 88 of file mlPropertyManager.h.

PropertyManager& ml::PropertyManager::operator= ( const PropertyManager item)

Assignment operator. Resets all registered GraphProperties.

bool ml::PropertyManager::operator== ( const PropertyManager other) const

Comparison operator, checks names and defaultValues without respect to their order.

virtual void ml::PropertyManager::readStateFromTree ( TreeNode parent) [virtual]

Reads the object state from the children of the given parent node.

Reimplemented from ml::Base.

void ml::PropertyManager::removeProperty ( const std::string &  name)

Remove property with name name. Throws ML_BAD_PARAMETER if the property does not exists.


Friends And Related Function Documentation

friend class PropertyContainer [friend]

Definition at line 106 of file mlPropertyManager.h.

friend class SmartPropertyIndex [friend]

Definition at line 107 of file mlPropertyManager.h.


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