MeVisLab Toolbox Reference
BaseGraphItem Class Reference

class BaseGraphItem More...

#include <mlBaseGraphItem.h>

Inheritance diagram for BaseGraphItem:
PropertyContainer VesselEdge VesselNode

Public Member Functions

MLint getRootId () const
 Get root id.
 
void setRootId (MLint rootId)
 Sets the root id. Usually called by calling setRootIdToAllChildren on the graph itself.
 
Graph Topology

Get the surrounding Graph object.

GraphgetGraph (void)
 
const GraphgetGraph (void) const
 
MLint getId (void) const
 Get unique id of the object.
 
- Public Member Functions inherited from PropertyContainer
 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 PropertyManagergetPropertyManager () const
 Get read-only access to the associated property manager.
 
PropertyManagergetPropertyManager ()
 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 PropertyValueproperty (size_t index) const
 Get the property with index index as PropertyValue.
 
template<typename T >
Tproperty (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 Tproperty (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 PropertyValueproperty (const std::string &name) const
 Get the property with name name.
 
template<typename T >
Tproperty (const std::string &name)
 
template<typename T >
const Tproperty (const std::string &name) const
 
virtual void reset ()
 Set all properties to default values.
 
 ML_ABSTRACT_CLASS_HEADER (PropertyContainer)
 
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 Member Functions

 BaseGraphItem (Graph &graph, MLint id, const ManagerPointer &manager)
 Constructor.
 
 BaseGraphItem (const BaseGraphItem &item)
 Copy constructor (creates an unconnected object, only copies properties), deprecated.
 
BaseGraphItemoperator= (const BaseGraphItem &item)
 Assignment operator, deprecated. Use copyProperties() instead.
 
void copyProperties (const BaseGraphItem *other)
 Copy all properties (topology information is left unchanged)
 
bool operator== (const BaseGraphItem &other) const
 Compare properties (ignores topology information)
 
bool operator!= (const BaseGraphItem &other) const
 
Persistence

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

void addStateToTree (TreeNode *parent) const override
 
 ML_SET_ADDSTATE_VERSION (2)
 Set current addStateToTree() version number:
 
void readStateFromTree (TreeNode *parent) override
 Reads the object state from the children of the given parent node.
 

Protected Attributes

Graph_graph
 Reference to the owner Graph object.
 
- Protected Attributes inherited from PropertyContainer
std::vector< PropertyValue_values
 
ManagerPointer _manager
 

Friends

class Graph
 
class LoadTreeData
 

Additional Inherited Members

- Public Types inherited from PropertyContainer
typedef PropertyManager::Pointer ManagerPointer
 
typedef PropertyManager::ConstPointer ConstManagerPointer
 
typedef PropertyManager::PropertyMap PropertyMap
 

Detailed Description

class BaseGraphItem

Definition at line 35 of file mlBaseGraphItem.h.

Constructor & Destructor Documentation

◆ BaseGraphItem() [1/2]

BaseGraphItem::BaseGraphItem ( Graph & graph,
MLint id,
const ManagerPointer & manager )
protected

Constructor.

◆ BaseGraphItem() [2/2]

BaseGraphItem::BaseGraphItem ( const BaseGraphItem & item)
protected

Copy constructor (creates an unconnected object, only copies properties), deprecated.

Member Function Documentation

◆ addStateToTree()

void BaseGraphItem::addStateToTree ( TreeNode * parent) const
overrideprotected

◆ copyProperties()

void BaseGraphItem::copyProperties ( const BaseGraphItem * other)
protected

Copy all properties (topology information is left unchanged)

◆ getGraph() [1/2]

Graph * BaseGraphItem::getGraph ( void )
inline

Definition at line 46 of file mlBaseGraphItem.h.

◆ getGraph() [2/2]

const Graph * BaseGraphItem::getGraph ( void ) const
inline

Definition at line 47 of file mlBaseGraphItem.h.

◆ getId()

MLint BaseGraphItem::getId ( void ) const
inline

Get unique id of the object.

Definition at line 50 of file mlBaseGraphItem.h.

◆ getRootId()

MLint BaseGraphItem::getRootId ( ) const
inline

Get root id.

Is negative if invalid (not set). Is only set if setRootIdToAllChildren is called on the Graph itself.

Definition at line 81 of file mlBaseGraphItem.h.

◆ ML_SET_ADDSTATE_VERSION()

BaseGraphItem::ML_SET_ADDSTATE_VERSION ( 2 )
protected

Set current addStateToTree() version number:

◆ operator!=()

bool BaseGraphItem::operator!= ( const BaseGraphItem & other) const
inlineprotected

Definition at line 68 of file mlBaseGraphItem.h.

References mlrange_cast().

◆ operator=()

BaseGraphItem & BaseGraphItem::operator= ( const BaseGraphItem & item)
protected

Assignment operator, deprecated. Use copyProperties() instead.

◆ operator==()

bool BaseGraphItem::operator== ( const BaseGraphItem & other) const
protected

Compare properties (ignores topology information)

◆ readStateFromTree()

void BaseGraphItem::readStateFromTree ( TreeNode * parent)
overrideprotected

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

◆ setRootId()

void BaseGraphItem::setRootId ( MLint rootId)
inline

Sets the root id. Usually called by calling setRootIdToAllChildren on the graph itself.

Definition at line 83 of file mlBaseGraphItem.h.

References mlrange_cast().

Friends And Related Symbol Documentation

◆ Graph

friend class Graph
friend

Definition at line 39 of file mlBaseGraphItem.h.

◆ LoadTreeData

friend class LoadTreeData
friend

Definition at line 40 of file mlBaseGraphItem.h.

Member Data Documentation

◆ _graph

Graph* BaseGraphItem::_graph
protected

Reference to the owner Graph object.

Definition at line 71 of file mlBaseGraphItem.h.


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