MeVisLabToolboxReference
|
Base class that declares to basic functionality of an object. More...
#include <ObjMgr/mlObjMgrObject.h>
Public Types | |
typedef attMtx::iterator | iterator |
typedef attMtx::const_iterator | const_iterator |
Public Member Functions | |
omObject () | |
omObject (const omObject &obj) | |
~omObject () | |
ObjMgr * | objMgr () |
omFlags & | flags () |
Writable flags access. | |
const omFlags & | flags () const |
Read-Only flags access. | |
omObject & | operator= (const omObject &obj) |
Assignment operator. | |
bool | isValid () const |
Check if this is a valid object (e.g. has been initialized). | |
const omIDType & | getID () const |
Get method for object ID. | |
omIDType | generateID (MLuint32 minID=0, MLuint32 maxID=omID_MAX, const std::string &prefix="") const |
Generate unique layer ID. A prefix may be given in the prefix argument. No layer is actually created. | |
omAttributesVector & | createLayer (MLuint32 minID=0, MLuint32 maxID=omID_MAX, const std::string &prefix="") |
Creates and inserts attribute vector in the object. | |
omAttributesVector & | operator[] (const omIDType &layer) |
Returns reference to attributes vector of specified layer. | |
const omAttributesVector & | operator[] (const omIDType &layer) const |
Returns read only reference to attributes vector of specified layer. | |
omAttributesVector & | getLayer (const omIDType &layer) |
Writable access operator to layer. | |
omAttribute & | getAttribute (const omIDType &layer, const omIDType &item) |
Read/write access to individual attributes. | |
const omAttribute & | getAttribute (const omIDType &layer, const omIDType &item) const |
Read only access to individual attributes. | |
bool | hasAttribute (const omIDType &layer, const omIDType &item) const |
Check if a specific attribute does exist in the object. | |
void | removeAttribute (const omIDType &layer, const omIDType &item) |
Remove a specific attribute of the object. | |
std::vector< std::pair < omIDType, omIDType > > | evalAttrAddrExpr (const std::string &layerRegEx, const std::string &itemRegEx) const |
Returns vector with addresses (layer + info ID) that match the address component's regular expression. | |
bool | exists (const omIDType &layer) const |
True if attribute layer with given name exists. | |
void | erase (const omIDType &layer) |
Erase the attribute layer whose name is given. | |
void | clear () |
Remove all attributes from container. | |
size_t | size () const |
Get number of information layers. | |
bool | empty () const |
True if there are no information stored in this object. | |
attMtx::iterator | begin () |
Returns an iterator pointing to the beginning of the attributes matrix. | |
attMtx::iterator | end () |
Returns an iterator pointing to the end of the attributes matrix. | |
attMtx::const_iterator | begin () const |
Returns a const_iterator pointing to the beginning of the attributes matrix. | |
attMtx::const_iterator | end () const |
Returns a const_iterator pointing to the end of the attributes matrix. | |
Protected Member Functions | |
void | setID (const omIDType &id) |
Sets the ID of an object. | |
Protected Attributes | |
omFlags | _flags |
Macro for declaring methods for the runtime system. | |
omIDType | _id |
Object identifier. Must be unique. | |
ObjMgr * | _objMgr |
Pointer to ObjMgr object. | |
Friends | |
class | omObjectContainer |
Base class that declares to basic functionality of an object.
Definition at line 40 of file mlObjMgrObject.h.
typedef attMtx::const_iterator ml::omObject::const_iterator |
Definition at line 68 of file mlObjMgrObject.h.
typedef attMtx::iterator ml::omObject::iterator |
Definition at line 67 of file mlObjMgrObject.h.
ml::omObject::omObject | ( | ) |
ml::omObject::omObject | ( | const omObject & | obj | ) |
ml::omObject::~omObject | ( | ) |
attMtx::iterator ml::omObject::begin | ( | ) | [inline] |
Returns an iterator pointing to the beginning of the attributes matrix.
Definition at line 163 of file mlObjMgrObject.h.
attMtx::const_iterator ml::omObject::begin | ( | ) | const [inline] |
Returns a const_iterator pointing to the beginning of the attributes matrix.
Definition at line 172 of file mlObjMgrObject.h.
void ml::omObject::clear | ( | ) |
Remove all attributes from container.
omAttributesVector& ml::omObject::createLayer | ( | MLuint32 | minID = 0 , |
MLuint32 | maxID = omID_MAX , |
||
const std::string & | prefix = "" |
||
) |
Creates and inserts attribute vector in the object.
The numerical layer ID is generated in the given range. A prefix may be given in the prefix argument.
bool ml::omObject::empty | ( | ) | const [inline] |
True if there are no information stored in this object.
Definition at line 158 of file mlObjMgrObject.h.
attMtx::iterator ml::omObject::end | ( | ) | [inline] |
Returns an iterator pointing to the end of the attributes matrix.
Definition at line 167 of file mlObjMgrObject.h.
attMtx::const_iterator ml::omObject::end | ( | ) | const [inline] |
Returns a const_iterator pointing to the end of the attributes matrix.
Definition at line 176 of file mlObjMgrObject.h.
void ml::omObject::erase | ( | const omIDType & | layer | ) |
Erase the attribute layer whose name is given.
std::vector<std::pair<omIDType,omIDType> > ml::omObject::evalAttrAddrExpr | ( | const std::string & | layerRegEx, |
const std::string & | itemRegEx | ||
) | const |
Returns vector with addresses (layer + info ID) that match the address component's regular expression.
bool ml::omObject::exists | ( | const omIDType & | layer | ) | const [inline] |
True if attribute layer with given name exists.
Definition at line 142 of file mlObjMgrObject.h.
const omFlags& ml::omObject::flags | ( | ) | const [inline] |
Read-Only flags access.
Definition at line 83 of file mlObjMgrObject.h.
omFlags& ml::omObject::flags | ( | ) | [inline] |
Writable flags access.
Definition at line 79 of file mlObjMgrObject.h.
omIDType ml::omObject::generateID | ( | MLuint32 | minID = 0 , |
MLuint32 | maxID = omID_MAX , |
||
const std::string & | prefix = "" |
||
) | const |
Generate unique layer ID. A prefix may be given in the prefix argument. No layer is actually created.
omAttribute& ml::omObject::getAttribute | ( | const omIDType & | layer, |
const omIDType & | item | ||
) |
Read/write access to individual attributes.
In contrast to the operator[] member the attribute is not created if it does not exist. Instead an invalid attribute (check with isValid()) is returned if the item does not exist in the layer.
const omAttribute& ml::omObject::getAttribute | ( | const omIDType & | layer, |
const omIDType & | item | ||
) | const |
Read only access to individual attributes.
Returns an invalid attribute (Check with isValid()) if the item does not exist in the layer
const omIDType& ml::omObject::getID | ( | ) | const [inline] |
Get method for object ID.
Definition at line 96 of file mlObjMgrObject.h.
omAttributesVector& ml::omObject::getLayer | ( | const omIDType & | layer | ) |
Writable access operator to layer.
No layer is created if it does not exist. Instead an invalid layer is returned (Check with isValid()).
Check if a specific attribute does exist in the object.
Definition at line 131 of file mlObjMgrObject.h.
bool ml::omObject::isValid | ( | void | ) | const [inline] |
Check if this is a valid object (e.g. has been initialized).
Definition at line 91 of file mlObjMgrObject.h.
References omID_DEFAULT.
ObjMgr* ml::omObject::objMgr | ( | ) | [inline] |
Definition at line 74 of file mlObjMgrObject.h.
omAttributesVector& ml::omObject::operator[] | ( | const omIDType & | layer | ) |
Returns reference to attributes vector of specified layer.
Can be used to access specific attributes of this object (e.g. object[layer][item]) Creates attributes vector if not yet existent.
const omAttributesVector& ml::omObject::operator[] | ( | const omIDType & | layer | ) | const |
Returns read only reference to attributes vector of specified layer.
Can be used to access specific attributes of this object (e.g. object[layer][item]) Returns invalid attributes vector if not yet existent (Check with isValid()).
Remove a specific attribute of the object.
void ml::omObject::setID | ( | const omIDType & | id | ) | [protected] |
Sets the ID of an object.
Stores the ID in the class member _id but also as an attribute in the global information layer.
size_t ml::omObject::size | ( | ) | const [inline] |
Get number of information layers.
Definition at line 153 of file mlObjMgrObject.h.
friend class omObjectContainer [friend] |
Definition at line 42 of file mlObjMgrObject.h.
omFlags ml::omObject::_flags [protected] |
Macro for declaring methods for the runtime system.
Special flags
Definition at line 53 of file mlObjMgrObject.h.
omIDType ml::omObject::_id [protected] |
Object identifier. Must be unique.
Definition at line 56 of file mlObjMgrObject.h.
ObjMgr* ml::omObject::_objMgr [protected] |
Pointer to ObjMgr object.
Definition at line 59 of file mlObjMgrObject.h.