MeVisLab Toolbox Reference
|
#include <mlPropertyContainer.h>
Public Types | |
typedef PropertyManager::Pointer | ManagerPointer |
typedef PropertyManager::ConstPointer | ConstManagerPointer |
typedef PropertyManager::PropertyMap | PropertyMap |
Public Member Functions | |
PropertyContainer (const ManagerPointer &manager) | |
PropertyContainer (const PropertyContainer &other) | |
~PropertyContainer () override | |
bool | operator== (const PropertyContainer &other) const |
Check for equality (managers and values). | |
bool | operator!= (const PropertyContainer &other) const |
Check for inequality (managers and values). | |
void | copyProperties (const PropertyContainer &other) |
Copy all properties from the given container to this object. | |
const PropertyManager * | getPropertyManager () const |
Get read-only access to the associated property manager. | |
PropertyManager * | getPropertyManager () |
Get access to the associated property manager. | |
PropertyMap | getPropertyMap () const |
Get a map of the contained properties, can be useful for comparison. | |
size_t | numberOfProperties () const |
Return the number of properties currently available. | |
const PropertyValue & | property (size_t index) const |
Get the property with index index as PropertyValue. | |
template<typename T > | |
T & | property (size_t index) |
Get the property with index index with type T. Throws boost::bad_get exception if the currently stored property has a different type. | |
template<typename T > | |
const T & | property (size_t index) const |
Get the property with index index with type T, const version. Throws boost::bad_get exception if the currently stored property has a different type. | |
const PropertyValue & | property (const std::string &name) const |
Get the property with name name . | |
template<typename T > | |
T & | property (const std::string &name) |
template<typename T > | |
const T & | property (const std::string &name) const |
virtual void | reset () |
Set all properties to default values. | |
ML_ABSTRACT_CLASS_HEADER (PropertyContainer) | |
Persistence | |
Attaches the object state as children of the given parent node. | |
void | addStateToTree (TreeNode *parent) const override |
ML_SET_ADDSTATE_VERSION (1) | |
Set current addStateToTree() version number: | |
void | readStateFromTree (TreeNode *parent) override |
Reads the object state from the children of the given parent node. | |
Protected Attributes | |
std::vector< PropertyValue > | _values |
ManagerPointer | _manager |
Friends | |
class | PropertyManager |
class | ::MLPropertyContainerWrapper |
Definition at line 31 of file mlPropertyContainer.h.
Definition at line 36 of file mlPropertyContainer.h.
Definition at line 35 of file mlPropertyContainer.h.
Definition at line 37 of file mlPropertyContainer.h.
PropertyContainer::PropertyContainer | ( | const ManagerPointer & | manager | ) |
PropertyContainer::PropertyContainer | ( | const PropertyContainer & | other | ) |
|
override |
|
override |
void PropertyContainer::copyProperties | ( | const PropertyContainer & | other | ) |
Copy all properties from the given container to this object.
|
inline |
Get access to the associated property manager.
Definition at line 54 of file mlPropertyContainer.h.
|
inline |
Get read-only access to the associated property manager.
Definition at line 52 of file mlPropertyContainer.h.
PropertyMap PropertyContainer::getPropertyMap | ( | ) | const |
Get a map of the contained properties, can be useful for comparison.
PropertyContainer::ML_ABSTRACT_CLASS_HEADER | ( | PropertyContainer | ) |
PropertyContainer::ML_SET_ADDSTATE_VERSION | ( | 1 | ) |
Set current addStateToTree() version number:
|
inline |
Return the number of properties currently available.
Definition at line 59 of file mlPropertyContainer.h.
|
inline |
Check for inequality (managers and values).
Definition at line 46 of file mlPropertyContainer.h.
References mlrange_cast().
bool PropertyContainer::operator== | ( | const PropertyContainer & | other | ) | const |
Check for equality (managers and values).
Definition at line 81 of file mlPropertyContainer.h.
References T.
|
inline |
Get the property with name name
.
This requires a lookup of the index in the graph container. If you need to access the same property for many different objects, it is more efficient to do the lookup manually and use the index-based access. Have a look at SmartPropertyIndex for how a convenient and safe way to do index-based lookups. Throws ML_BAD_PARAMETER if the property does not exist.
Definition at line 79 of file mlPropertyContainer.h.
Definition at line 83 of file mlPropertyContainer.h.
References T.
Get the property with index index
with type T. Throws boost::bad_get exception if the currently stored property has a different type.
Definition at line 67 of file mlPropertyContainer.h.
References T.
|
inline |
Get the property with index index
as PropertyValue.
Get the property with index index
as PropertyValue, const version.
Definition at line 64 of file mlPropertyContainer.h.
Get the property with index index
with type T, const version. Throws boost::bad_get exception if the currently stored property has a different type.
Definition at line 70 of file mlPropertyContainer.h.
References T.
|
override |
Reads the object state from the children of the given parent node.
Definition at line 33 of file mlPropertyContainer.h.
|
friend |
Definition at line 32 of file mlPropertyContainer.h.
|
protected |
Definition at line 91 of file mlPropertyContainer.h.
|
protected |
Definition at line 89 of file mlPropertyContainer.h.