Tulip
4.7.0
Better Visualization Through Research
|
#include <PropertyInterface.h>
Classes | |
class | MetaValueCalculator |
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 |
Public Member Functions inherited from tlp::Observable | |
void | addListener (Observable *const listener) const |
void | addObserver (Observable *const observer) const |
unsigned int | countListeners () const |
unsigned int | countObservers () const |
unsigned int | getReceived () const |
unsigned int | getSent () const |
void | removeListener (Observable *const listener) const |
void | removeObserver (Observable *const observerver) const |
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 Member Functions inherited from tlp::Observable | |
Observable (const Observable &) | |
tlp::Iterator< tlp::Observable * > * | getObservables () const |
bool | hasOnlookers () const |
void | notifyObservers () |
void | observableDeleted () |
Observable & | operator= (const Observable &) |
void | sendEvent (const Event &message) |
virtual void | treatEvent (const Event &message) |
virtual void | treatEvents (const std::vector< Event > &events) |
Protected Attributes | |
Graph * | graph |
MetaValueCalculator * | metaValueCalculator |
std::string | name |
Friends | |
class | PropertyManager |
Additional Inherited Members | |
Static Public Member Functions inherited from tlp::Observable | |
static tlp::node | getNode (const tlp::Observable *obs) |
static Observable * | getObject (tlp::node n) |
static const tlp::VectorGraph & | getObservableGraph () |
static unsigned int | getScheduled (tlp::node n) |
static void | holdObservers () |
static bool | isAlive (tlp::node n) |
static unsigned int | observersHoldCounter () |
static void | unholdObservers () |
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.
|
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.
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. |
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
pure virtual |
Copies the values of the source property to this property.
source | The property from which to copy values. |
|
pure virtual |
Returns the size in bytes of an edge's value.
|
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 >, tlp::AbstractProperty< tlp::IntegerVectorType, tlp::IntegerVectorType, VectorPropertyInterface >, and tlp::AbstractProperty< tlp::BooleanType, tlp::BooleanType >.
|
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 >, tlp::AbstractProperty< tlp::IntegerVectorType, tlp::IntegerVectorType, VectorPropertyInterface >, and tlp::AbstractProperty< tlp::BooleanType, tlp::BooleanType >.
|
pure virtual |
Gets the edge value, contained in a tlp::DataMem structure.
n | The edge to get the value of. |
|
pure virtual |
Gets a pointer to the tlp::DataMem structure that contains the edge default value.
|
pure virtual |
Gets a string representation of the edge default value.
|
pure virtual |
Gets a string representation of the edge default value.
e | The edge to get the value of. |
|
inline |
Gets the MetaValueCalculator of this property.
Definition at line 424 of file PropertyInterface.h.
|
inline |
Gets the name of the property (e.g. viewLayout).
Definition at line 125 of file PropertyInterface.h.
|
pure virtual |
Gets the node value, contained in a tlp::DataMem structure.
n | The node to get the value of. |
|
pure virtual |
Gets a pointer to the tlp::DataMem structure that contains the node default value.
|
pure virtual |
Gets a string representation of the node default value.
|
pure virtual |
Gets a string representation of the node default value.
n | The node to get the value of. |
|
pure virtual |
Returns the value in a DataMem if it is not default, otherwise returns NULL.
n | The node to get the value of. |
|
pure virtual |
Returns the value in a DataMem if it is not default, otherwise returns NULL.
e | The edge to get the value of. |
|
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.
|
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.
|
pure virtual |
Gets a string describing the type of the property (e.g. "graph", "double", "layout", "string", "integer", "color", "size").
Implemented in tlp::BooleanProperty.
|
pure virtual |
Returns the size in bytes of a node's value.
|
pure virtual |
Returns the number of edges with a non default value.
|
pure virtual |
Returns the number of nodes with a non default value.
|
pure virtual |
Reads the edges default value.
|
pure virtual |
Reads the value of an edge.
|
pure virtual |
Reads the nodes default value.
|
pure virtual |
Reads the value of a node.
bool tlp::PropertyInterface::rename | ( | const std::string & | newName | ) |
Rename a property.
the | new name |
|
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. |
|
pure virtual |
Sets all the edges value to the value represented by the string. For some types, some parsing will be necessary (e.g. LayoutPorperty). All previous values are lost and the represented value is assigned as the default one to the future added edges.
value | A string representing the new value to set on all the edges. |
|
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. |
|
pure virtual |
Sets all the nodes value to the value represented by the string. For some types, some parsing will be necessary (e.g. LayoutPorperty). All previous values are lost and the represented value is assigned as the default one to the future added nodes.
value | A string representing the new value to set on all the nodes. |
|
pure virtual |
Sets the edge value.
e | The edge to set the value of. |
value | The value to set to this edge. |
|
pure virtual |
Sets a new value on the edge, represented by the string parameter.
e | The edge on which to set value on. |
value | A string representing the value to set on the edge. |
|
inlinevirtual |
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 434 of file PropertyInterface.h.
|
pure virtual |
Sets the node value.
n | The node to set the value of. |
value | The value to set to this node. |
|
pure virtual |
Sets a new value on the node, represented by the string parameter.
n | The node on which to set the new value. |
value | A string representing the value to set on the node. |
|
pure virtual |
Writes the edges default value.
|
pure virtual |
Writes the value of an edge.
|
pure virtual |
Writes the nodes default value.
|
pure virtual |
Writes the value of a node.