![]() |
Tulip
4.6.0
Better Visualization Through Research
|
#include <PropertyInterface.h>
Inheritance diagram for tlp::PropertyInterface:
Collaboration diagram for tlp::PropertyInterface:Classes | |
| class | MetaValueCalculator |
| Base class for computing values on meta nodes and edges. More... | |
Public Member Functions | |
| virtual PropertyInterface * | clonePrototype (Graph *graph, const std::string &name)=0 |
| virtual int | compare (const node n1, const node n2) const =0 |
| virtual int | compare (const edge e1, const edge e2) const =0 |
| virtual void | computeMetaValue (node metaNode, Graph *subgraph, Graph *metaGraph)=0 |
| virtual void | computeMetaValue (edge metaEdge, tlp::Iterator< edge > *it, Graph *metaGraph)=0 |
| virtual bool | copy (const node destination, const node source, PropertyInterface *property, bool ifNotDefault=false)=0 |
| virtual bool | copy (const edge destination, const edge source, PropertyInterface *property, bool ifNotDefault=false)=0 |
| virtual void | copy (PropertyInterface *source)=0 |
| virtual unsigned int | edgeValueSize () const =0 |
| virtual void | erase (const node)=0 |
| virtual void | erase (const edge)=0 |
| virtual DataMem * | getEdgeDataMemValue (const edge e) const =0 |
| virtual DataMem * | getEdgeDefaultDataMemValue () const =0 |
| virtual std::string | getEdgeDefaultStringValue () const =0 |
| virtual std::string | getEdgeStringValue (const edge e) const =0 |
| tlp::Graph * | getGraph () const |
| MetaValueCalculator * | getMetaValueCalculator () |
| const std::string & | getName () const |
| virtual DataMem * | getNodeDataMemValue (const node n) const =0 |
| virtual DataMem * | getNodeDefaultDataMemValue () const =0 |
| virtual std::string | getNodeDefaultStringValue () const =0 |
| virtual std::string | getNodeStringValue (const node n) const =0 |
| virtual DataMem * | getNonDefaultDataMemValue (const node n) const =0 |
| virtual DataMem * | getNonDefaultDataMemValue (const edge e) const =0 |
| virtual tlp::Iterator< edge > * | getNonDefaultValuatedEdges (const Graph *=NULL) const =0 |
| virtual tlp::Iterator< node > * | getNonDefaultValuatedNodes (const Graph *=NULL) const =0 |
| virtual const std::string & | getTypename () const =0 |
| virtual unsigned int | nodeValueSize () const =0 |
| virtual unsigned int | numberOfNonDefaultValuatedEdges () const =0 |
| virtual unsigned int | numberOfNonDefaultValuatedNodes () const =0 |
| virtual bool | readEdgeDefaultValue (std::istream &)=0 |
| virtual bool | readEdgeValue (std::istream &, edge)=0 |
| virtual bool | readNodeDefaultValue (std::istream &)=0 |
| virtual bool | readNodeValue (std::istream &, node)=0 |
| bool | rename (const std::string &newName) |
| virtual void | setAllEdgeDataMemValue (const DataMem *v)=0 |
| virtual bool | setAllEdgeStringValue (const std::string &value)=0 |
| virtual void | setAllNodeDataMemValue (const DataMem *value)=0 |
| virtual bool | setAllNodeStringValue (const std::string &value)=0 |
| virtual void | setEdgeDataMemValue (const edge e, const DataMem *v)=0 |
| virtual bool | setEdgeStringValue (const edge e, const std::string &value)=0 |
| virtual void | setMetaValueCalculator (MetaValueCalculator *calculator) |
| virtual void | setNodeDataMemValue (const node n, const DataMem *value)=0 |
| virtual bool | setNodeStringValue (const node n, const std::string &value)=0 |
| virtual void | writeEdgeDefaultValue (std::ostream &) const =0 |
| virtual void | writeEdgeValue (std::ostream &, edge) const =0 |
| virtual void | writeNodeDefaultValue (std::ostream &) const =0 |
| virtual void | writeNodeValue (std::ostream &, node) const =0 |
Protected Member Functions | |
| void | notifyAfterSetAllEdgeValue () |
| void | notifyAfterSetAllNodeValue () |
| void | notifyAfterSetEdgeValue (const edge e) |
| void | notifyAfterSetNodeValue (const node n) |
| void | notifyBeforeSetAllEdgeValue () |
| void | notifyBeforeSetAllNodeValue () |
| void | notifyBeforeSetEdgeValue (const edge e) |
| void | notifyBeforeSetNodeValue (const node n) |
| void | notifyDestroy () |
| void | notifyRename (const std::string &newName) |
Protected Attributes | |
| Graph * | graph |
| MetaValueCalculator * | metaValueCalculator |
| std::string | name |
Friends | |
| class | PropertyManager |
PropertyInterface describes the interface of a graph property.
The intent of a property is to hold a value for each node and edge (e.g. the degree of the nodes).
A property can be used in two different ways : Either it is attached to a graph; and in this case creating and deleting the property is handled by the graph (
Either is is detached from a graph, and you have to handle creation and deletion yourself. This is most useful for some algorithms that need a temporary property, but do not want the property to appear on the graph after the computation.
Definition at line 53 of file PropertyInterface.h.
| virtual PropertyInterface* tlp::PropertyInterface::clonePrototype | ( | Graph * | graph, |
| const std::string & | name | ||
| ) | [pure virtual] |
Creates a property of the same type (e.g. tlp::DoubleProperty) in the graph. The new property will not contain a copy of this property's values.
| graph | The Graph in which to create the new property. |
| name | The name of the new property. |
Implemented in tlp::BooleanProperty.
| virtual int tlp::PropertyInterface::compare | ( | const node | n1, |
| const node | n2 | ||
| ) | const [pure virtual] |
Compares the value this property holds for the two given nodes.
| n1 | The first node to compare the value of. |
| n2 | The second node to compare the value of. |
| virtual int tlp::PropertyInterface::compare | ( | const edge | e1, |
| const edge | e2 | ||
| ) | const [pure virtual] |
Compares the value this property holds for the two given edges.
| e1 | The first edge to compare the value of. |
| e2 | The second edge to compare the value of. |
| virtual void tlp::PropertyInterface::computeMetaValue | ( | node | metaNode, |
| Graph * | subgraph, | ||
| Graph * | metaGraph | ||
| ) | [pure virtual] |
Sets the value of the metanode to a computed value.
The value is computed by this property's MetaValueCalculator.
| metaNode | The metanode to compute a value on. |
| subgraph | The subgraph pointed by the metanode. |
| metaGraph | The graph who owns the meta node. |
| virtual void tlp::PropertyInterface::computeMetaValue | ( | edge | metaEdge, |
| tlp::Iterator< edge > * | it, | ||
| Graph * | metaGraph | ||
| ) | [pure virtual] |
Sets the value of the metaedge to a computed value.
| metaEdge | The meta edge to compute a value on. |
| it | The edges represented by the meta edge. |
| metaGraph | The graph who owns the meta edge. |
| virtual bool tlp::PropertyInterface::copy | ( | const node | destination, |
| const node | source, | ||
| PropertyInterface * | property, | ||
| bool | ifNotDefault = false |
||
| ) | [pure virtual] |
Copies the value of a node in another property to a node in this property.
| destination | The node whose value will be set. |
| source | The node whose value to copy. |
| property | The property from which to copy the source node value. |
| ifNotDefault | If true, the copy will only be performed if the source node's value is not the default value. |
| virtual bool tlp::PropertyInterface::copy | ( | const edge | destination, |
| const edge | source, | ||
| PropertyInterface * | property, | ||
| bool | ifNotDefault = false |
||
| ) | [pure virtual] |
Copies the value of an edge in another property to an edge in this property.
| destination | The edge whose value will be set. |
| source | The edge whose value to copy. |
| property | The property from which to copy the source edge value. |
| ifNotDefault | If true, the copy will only be performed if the source edge's value is not the default value. |
| virtual void tlp::PropertyInterface::copy | ( | PropertyInterface * | source | ) | [pure virtual] |
Copies the values of the passed property to this property.
| source | The property from which to copy values. |
| virtual unsigned int tlp::PropertyInterface::edgeValueSize | ( | ) | const [pure virtual] |
Returns the size in bytes of an edge's value.
| virtual void tlp::PropertyInterface::erase | ( | const node | ) | [pure virtual] |
Erases the value stored for the given node. The new value for the node is the default value.
Implemented in tlp::AbstractProperty< tlp::DoubleVectorType, tlp::DoubleVectorType, VectorPropertyInterface >, tlp::AbstractProperty< tlp::CoordVectorType, tlp::CoordVectorType, VectorPropertyInterface >, tlp::AbstractProperty< tlp::ColorVectorType, tlp::ColorVectorType, VectorPropertyInterface >, tlp::AbstractProperty< tlp::StringVectorType, tlp::StringVectorType, VectorPropertyInterface >, tlp::AbstractProperty< tlp::SizeVectorType, tlp::SizeVectorType, VectorPropertyInterface >, tlp::AbstractProperty< tlp::BooleanVectorType, tlp::BooleanVectorType, VectorPropertyInterface >, and tlp::AbstractProperty< tlp::BooleanType, tlp::BooleanType >.
| virtual void tlp::PropertyInterface::erase | ( | const edge | ) | [pure virtual] |
Erases the value stored for the given edge. The new value for the edge is the default value.
Implemented in tlp::AbstractProperty< tlp::DoubleVectorType, tlp::DoubleVectorType, VectorPropertyInterface >, tlp::AbstractProperty< tlp::CoordVectorType, tlp::CoordVectorType, VectorPropertyInterface >, tlp::AbstractProperty< tlp::ColorVectorType, tlp::ColorVectorType, VectorPropertyInterface >, tlp::AbstractProperty< tlp::StringVectorType, tlp::StringVectorType, VectorPropertyInterface >, tlp::AbstractProperty< tlp::SizeVectorType, tlp::SizeVectorType, VectorPropertyInterface >, tlp::AbstractProperty< tlp::BooleanVectorType, tlp::BooleanVectorType, VectorPropertyInterface >, and tlp::AbstractProperty< tlp::BooleanType, tlp::BooleanType >.
| virtual DataMem* tlp::PropertyInterface::getEdgeDataMemValue | ( | const edge | e | ) | const [pure virtual] |
Gets the edge value, contained in a tlp::DataMem structure.
| n | The edge to get the value of. |
| virtual DataMem* tlp::PropertyInterface::getEdgeDefaultDataMemValue | ( | ) | const [pure virtual] |
Gets a pointer to the tlp::DataMem structure that contains the edge default value.
| virtual std::string tlp::PropertyInterface::getEdgeDefaultStringValue | ( | ) | const [pure virtual] |
Gets a string representation of the edge default value.
| virtual std::string tlp::PropertyInterface::getEdgeStringValue | ( | const edge | e | ) | const [pure virtual] |
Gets a string representation of the edge default value.
| e | The edge to get the value of. |
Gets the MetaValueCalculator of this property.
Definition at line 423 of file PropertyInterface.h.
| const std::string& tlp::PropertyInterface::getName | ( | ) | const [inline] |
Gets the name of the property (e.g. viewLayout).
Definition at line 124 of file PropertyInterface.h.
| virtual DataMem* tlp::PropertyInterface::getNodeDataMemValue | ( | const node | n | ) | const [pure virtual] |
Gets the node value, contained in a tlp::DataMem structure.
| n | The node to get the value of. |
| virtual DataMem* tlp::PropertyInterface::getNodeDefaultDataMemValue | ( | ) | const [pure virtual] |
Gets a pointer to the tlp::DataMem structure that contains the node default value.
| virtual std::string tlp::PropertyInterface::getNodeDefaultStringValue | ( | ) | const [pure virtual] |
Gets a string representation of the node default value.
| virtual std::string tlp::PropertyInterface::getNodeStringValue | ( | const node | n | ) | const [pure virtual] |
Gets a string representation of the node default value.
| n | The node to get the value of. |
| virtual DataMem* tlp::PropertyInterface::getNonDefaultDataMemValue | ( | const node | n | ) | const [pure virtual] |
Returns the value in a DataMem if it is not default, otherwise returns NULL.
| n | The node to get the value of. |
| virtual DataMem* tlp::PropertyInterface::getNonDefaultDataMemValue | ( | const edge | e | ) | const [pure virtual] |
Returns the value in a DataMem if it is not default, otherwise returns NULL.
| e | The edge to get the value of. |
| virtual tlp::Iterator<edge>* tlp::PropertyInterface::getNonDefaultValuatedEdges | ( | const Graph * | = NULL | ) | const [pure virtual] |
Gets an Iterator on all non-default valuated edges. When given a Graph as parameter, only edges belonging to this graph are iterated over.
| virtual tlp::Iterator<node>* tlp::PropertyInterface::getNonDefaultValuatedNodes | ( | const Graph * | = NULL | ) | const [pure virtual] |
Gets an Iterator on all non-default valuated nodes. When given a Graph as parameter, only nodes belonging to this graph are iterated over.
| virtual const std::string& tlp::PropertyInterface::getTypename | ( | ) | const [pure virtual] |
Gets a string describing the type of the property (e.g. "graph", "double", "layout", "string", "integer", "color", "size").
Implemented in tlp::BooleanProperty.
| virtual unsigned int tlp::PropertyInterface::nodeValueSize | ( | ) | const [pure virtual] |
Returns the size in bytes of a node's value.
| virtual unsigned int tlp::PropertyInterface::numberOfNonDefaultValuatedEdges | ( | ) | const [pure virtual] |
Returns the number of edges with a non default value.
| virtual unsigned int tlp::PropertyInterface::numberOfNonDefaultValuatedNodes | ( | ) | const [pure virtual] |
Returns the number of nodes with a non default value.
| virtual bool tlp::PropertyInterface::readEdgeDefaultValue | ( | std::istream & | ) | [pure virtual] |
Reads the edges default value.
| virtual bool tlp::PropertyInterface::readEdgeValue | ( | std::istream & | , |
| edge | |||
| ) | [pure virtual] |
Reads the value of an edge.
| virtual bool tlp::PropertyInterface::readNodeDefaultValue | ( | std::istream & | ) | [pure virtual] |
Reads the nodes default value.
| virtual bool tlp::PropertyInterface::readNodeValue | ( | std::istream & | , |
| node | |||
| ) | [pure virtual] |
Reads the value of a node.
| bool tlp::PropertyInterface::rename | ( | const std::string & | newName | ) |
Rename a property.
| the | new name |
| virtual void tlp::PropertyInterface::setAllEdgeDataMemValue | ( | const DataMem * | v | ) | [pure virtual] |
Sets all the edges value to the value contained in the given DataMem structure. All previous values are lost.
| value | The value to set on all the edges. |
| virtual bool tlp::PropertyInterface::setAllEdgeStringValue | ( | const std::string & | value | ) | [pure virtual] |
Sets all the edges value to the value described by the string. For some types, some parsing will be necessary (e.g. LayoutPorperty). All previous values are lost.
| value | A string describing the new value to set on all the edges. |
| virtual void tlp::PropertyInterface::setAllNodeDataMemValue | ( | const DataMem * | value | ) | [pure virtual] |
Sets all the nodes value to the value contained in the given DataMem structure. All previous values are lost.
| value | The value to set on all the nodes. |
| virtual bool tlp::PropertyInterface::setAllNodeStringValue | ( | const std::string & | value | ) | [pure virtual] |
Sets all the nodes value to the value described by the string. For some types, some parsing will be necessary (e.g. LayoutPorperty). All previous values are lost.
| value | A string describing the new value to set on all the nodes. |
| virtual void tlp::PropertyInterface::setEdgeDataMemValue | ( | const edge | e, |
| const DataMem * | v | ||
| ) | [pure virtual] |
Sets the edge value.
| e | The edge to set the value of. |
| value | The value to set to this edge. |
| virtual bool tlp::PropertyInterface::setEdgeStringValue | ( | const edge | e, |
| const std::string & | value | ||
| ) | [pure virtual] |
Sets a new value on the edge, described by the string parameter.
| e | The edge on which to set value on. |
| value | A string describing the value to set on the edge. |
| virtual void tlp::PropertyInterface::setMetaValueCalculator | ( | MetaValueCalculator * | calculator | ) | [inline, virtual] |
Sets the Calculator for meta nodes and edges.
| calculator | The object containing the logic for computing the meta values for the nodes and edges. |
Definition at line 433 of file PropertyInterface.h.
| virtual void tlp::PropertyInterface::setNodeDataMemValue | ( | const node | n, |
| const DataMem * | value | ||
| ) | [pure virtual] |
Sets the node value.
| n | The node to set the value of. |
| value | The value to set to this node. |
| virtual bool tlp::PropertyInterface::setNodeStringValue | ( | const node | n, |
| const std::string & | value | ||
| ) | [pure virtual] |
Sets a new value on the node, described by the string parameter.
| n | The node on which to set the new value. |
| value | A string describing the value to set on the node. |
| virtual void tlp::PropertyInterface::writeEdgeDefaultValue | ( | std::ostream & | ) | const [pure virtual] |
Writes the edges default value.
| virtual void tlp::PropertyInterface::writeEdgeValue | ( | std::ostream & | , |
| edge | |||
| ) | const [pure virtual] |
Writes the value of an edge.
| virtual void tlp::PropertyInterface::writeNodeDefaultValue | ( | std::ostream & | ) | const [pure virtual] |
Writes the nodes default value.
| virtual void tlp::PropertyInterface::writeNodeValue | ( | std::ostream & | , |
| node | |||
| ) | const [pure virtual] |
Writes the value of a node.