|
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. | |
| template<typename T > | |
| const T & | property (size_t index) const |
Get the property with index index with type T, const version. | |
| 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 38 of file mlPropertyContainer.h.
Definition at line 37 of file mlPropertyContainer.h.
Definition at line 39 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.
Referenced by BaseGraphItem::operator=().
|
inline |
Get access to the associated property manager.
Definition at line 62 of file mlPropertyContainer.h.
|
inline |
Get read-only access to the associated property manager.
Definition at line 57 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 70 of file mlPropertyContainer.h.
|
inline |
Check for inequality (managers and values).
Definition at line 48 of file mlPropertyContainer.h.
References mlrange_cast().
| bool PropertyContainer::operator== | ( | const PropertyContainer & | other | ) | const |
Check for equality (managers and values).
Definition at line 106 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 102 of file mlPropertyContainer.h.
Definition at line 110 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 84 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 78 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 90 of file mlPropertyContainer.h.
References T.
|
override |
Reads the object state from the children of the given parent node.
Definition at line 34 of file mlPropertyContainer.h.
|
friend |
Definition at line 33 of file mlPropertyContainer.h.
|
protected |
Definition at line 121 of file mlPropertyContainer.h.
|
protected |
Definition at line 119 of file mlPropertyContainer.h.