Tulip
4.1.0
Better Visualization Through Research
|
#include <AbstractProperty.h>
Inherits tlp::PropertyInterface.
Inherited by tlp::ColorProperty, tlp::GraphProperty, tlp::SizeProperty, and tlp::StringProperty.
Classes | |
class | MetaValueCalculator |
This class is used to delegate the computation of the values associated to meta nodes or edges. More... | |
Public Member Functions | |
AbstractProperty (Graph *, std::string n="") | |
int | compare (const node n1, const node n2) const |
int | compare (const edge e1, const edge e2) const |
virtual void | computeMetaValue (node n, Graph *sg, Graph *mg) |
virtual void | computeMetaValue (edge e, tlp::Iterator< edge > *itE, Graph *mg) |
virtual bool | copy (const node destination, const node source, PropertyInterface *property, bool ifNotDefault=false) |
virtual bool | copy (const edge destination, const edge source, PropertyInterface *property, bool ifNotDefault=false) |
virtual void | copy (PropertyInterface *property) |
virtual void | erase (const node n) |
virtual void | erase (const edge e) |
virtual DataMem * | getEdgeDataMemValue (const edge e) const |
virtual DataMem * | getEdgeDefaultDataMemValue () const |
virtual std::string | getEdgeDefaultStringValue () const |
Tedge::RealType | getEdgeDefaultValue () const |
virtual std::string | getEdgeStringValue (const edge e) const |
tlp::StoredType< typename Tedge::RealType > ::ReturnedConstValue | getEdgeValue (const edge e) const |
virtual DataMem * | getNodeDataMemValue (const node n) const |
virtual DataMem * | getNodeDefaultDataMemValue () const |
virtual std::string | getNodeDefaultStringValue () const |
Tnode::RealType | getNodeDefaultValue () const |
virtual std::string | getNodeStringValue (const node n) const |
tlp::StoredType< typename Tnode::RealType > ::ReturnedConstValue | getNodeValue (const node n) const |
virtual DataMem * | getNonDefaultDataMemValue (const node n) const |
virtual DataMem * | getNonDefaultDataMemValue (const edge e) const |
virtual tlp::Iterator< edge > * | getNonDefaultValuatedEdges (const Graph *g=NULL) const |
virtual tlp::Iterator< node > * | getNonDefaultValuatedNodes (const Graph *g=NULL) const |
virtual AbstractProperty < Tnode, Tedge > & | operator= (AbstractProperty< Tnode, Tedge > &prop) |
virtual void | setAllEdgeDataMemValue (const DataMem *v) |
virtual bool | setAllEdgeStringValue (const std::string &inV) |
virtual void | setAllEdgeValue (const typename Tedge::RealType &v) |
virtual void | setAllNodeDataMemValue (const DataMem *v) |
virtual bool | setAllNodeStringValue (const std::string &inV) |
virtual void | setAllNodeValue (const typename Tnode::RealType &v) |
virtual void | setEdgeDataMemValue (const edge e, const DataMem *v) |
virtual bool | setEdgeStringValue (const edge inE, const std::string &inV) |
virtual void | setEdgeValue (const edge e, const typename Tedge::RealType &v) |
virtual void | setMetaValueCalculator (PropertyInterface::MetaValueCalculator *mvCalc) |
virtual void | setNodeDataMemValue (const node n, const DataMem *v) |
virtual bool | setNodeStringValue (const node inN, const std::string &inV) |
virtual void | setNodeValue (const node n, const typename Tnode::RealType &v) |
Public Member Functions inherited from tlp::PropertyInterface | |
void | addPropertyObserver (Observable *pObs) |
virtual PropertyInterface * | clonePrototype (Graph *graph, const std::string &name)=0 |
tlp::Graph * | getGraph () const |
MetaValueCalculator * | getMetaValueCalculator () |
const std::string & | getName () const |
virtual std::string | getTypename () const =0 |
void | removePropertyObserver (Observable *pObs) |
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 | |
virtual void | clone_handler (AbstractProperty< Tnode, Tedge > &) |
Protected Member Functions inherited from tlp::PropertyInterface | |
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 () |
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 | |
Tedge::RealType | edgeDefaultValue |
MutableContainer< typename Tedge::RealType > | edgeProperties |
Tnode::RealType | nodeDefaultValue |
MutableContainer< typename Tnode::RealType > | nodeProperties |
Protected Attributes inherited from tlp::PropertyInterface | |
Graph * | graph |
MetaValueCalculator * | metaValueCalculator |
std::string | name |
Friends | |
class | Graph |
class | GraphView |
Additional Inherited Members | |
Static Public Member Functions inherited from tlp::Observable | |
static Observable * | getObject (tlp::node n) |
static const tlp::VectorGraph & | getObservableGraph () |
static void | holdObservers () |
static bool | isAlive (tlp::node n) |
static unsigned int | observersHoldCounter () |
static void | unholdObservers () |
This class extends upon PropertyInterface, and adds type-safe methods to get and set the node and edge values, through the magic of template programming.
Nodes and Edges can have different types (e.g. tlp::LayoutProperty has tlp::PointType as node type and tlp::LineType as edge type), but most of the time they have the same type (e.g. tlp::DoubleProperty, tlp::IntegerProperty).
Some of the pure virtual functions of PropertyInterface are implemented in this class (e.g. erase()).
The actual data is stored in this class, and it manages the default values.
Definition at line 54 of file AbstractProperty.h.
|
inlineprotectedvirtual |
Enable to clone part of sub_class.
Definition at line 401 of file AbstractProperty.h.
|
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. |
Implements tlp::PropertyInterface.
Reimplemented in tlp::SizeProperty, tlp::StringProperty, and tlp::ColorProperty.
Definition at line 88 of file AbstractProperty.cxx.
|
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. |
Implements tlp::PropertyInterface.
Reimplemented in tlp::StringProperty, and tlp::ColorProperty.
Definition at line 95 of file AbstractProperty.cxx.
|
inlinevirtual |
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. |
Implements tlp::PropertyInterface.
Definition at line 354 of file AbstractProperty.h.
|
inlinevirtual |
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. |
Implements tlp::PropertyInterface.
Definition at line 361 of file AbstractProperty.h.
|
inlinevirtual |
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. |
Implements tlp::PropertyInterface.
Definition at line 265 of file AbstractProperty.h.
|
inlinevirtual |
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. |
Implements tlp::PropertyInterface.
Definition at line 283 of file AbstractProperty.h.
|
inlinevirtual |
Copies the values of the passed property to this property.
source | The property from which to copy values. |
Implements tlp::PropertyInterface.
Definition at line 301 of file AbstractProperty.h.
|
inlinevirtual |
Resets the value of a node to the default value.
n | The node to reset the value of. |
Implements tlp::PropertyInterface.
Definition at line 130 of file AbstractProperty.h.
|
inlinevirtual |
Resets the value of an edge to the default value.
e | The edge to reset the value of. |
Implements tlp::PropertyInterface.
Definition at line 141 of file AbstractProperty.h.
|
inlinevirtual |
Gets the edge value, contained in a tlp::DataMem structure.
n | The edge to get the value of. |
Implements tlp::PropertyInterface.
Definition at line 317 of file AbstractProperty.h.
|
inlinevirtual |
Gets a pointer to the tlp::DataMem structure that contains the edge default value.
Implements tlp::PropertyInterface.
Definition at line 311 of file AbstractProperty.h.
|
inlinevirtual |
Gets a string representation of the edge default value.
Implements tlp::PropertyInterface.
Definition at line 215 of file AbstractProperty.h.
Tedge::RealType tlp::AbstractProperty< Tnode, Tedge >::getEdgeDefaultValue | ( | ) | const |
Gets the default edge value of the property.
Definition at line 39 of file AbstractProperty.cxx.
|
inlinevirtual |
Gets a string representation of the edge default value.
e | The edge to get the value of. |
Implements tlp::PropertyInterface.
Definition at line 223 of file AbstractProperty.h.
tlp::StoredType< typename Tedge::RealType >::ReturnedConstValue tlp::AbstractProperty< Tnode, Tedge >::getEdgeValue | ( | const edge | e | ) | const |
Returns the value associated to the edge e in this property. If there is no value, it returns the default edge value.
e | The edge for which we want to get the value of the property. |
Definition at line 50 of file AbstractProperty.cxx.
|
inlinevirtual |
Gets the node value, contained in a tlp::DataMem structure.
n | The node to get the value of. |
Implements tlp::PropertyInterface.
Definition at line 314 of file AbstractProperty.h.
|
inlinevirtual |
Gets a pointer to the tlp::DataMem structure that contains the node default value.
Implements tlp::PropertyInterface.
Definition at line 308 of file AbstractProperty.h.
|
inlinevirtual |
Gets a string representation of the node default value.
Implements tlp::PropertyInterface.
Definition at line 211 of file AbstractProperty.h.
Tnode::RealType tlp::AbstractProperty< Tnode, Tedge >::getNodeDefaultValue | ( | ) | const |
Gets the default node value of the property.
Definition at line 34 of file AbstractProperty.cxx.
|
inlinevirtual |
Gets a string representation of the node default value.
n | The node to get the value of. |
Implements tlp::PropertyInterface.
Definition at line 219 of file AbstractProperty.h.
tlp::StoredType< typename Tnode::RealType >::ReturnedConstValue tlp::AbstractProperty< Tnode, Tedge >::getNodeValue | ( | const node | n | ) | const |
Returns the value associated with the node n in this property. If there is no value, it returns the default node value.
n | The node for which we want to get the value of the property. |
Definition at line 44 of file AbstractProperty.cxx.
|
inlinevirtual |
Returns the value in a DataMem if it is not default, otherwise returns NULL.
n | The node to get the value of. |
Implements tlp::PropertyInterface.
Definition at line 320 of file AbstractProperty.h.
|
inlinevirtual |
Returns the value in a DataMem if it is not default, otherwise returns NULL.
e | The edge to get the value of. |
Implements tlp::PropertyInterface.
Definition at line 329 of file AbstractProperty.h.
|
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.
Implements tlp::PropertyInterface.
Definition at line 158 of file AbstractProperty.cxx.
|
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.
Implements tlp::PropertyInterface.
Definition at line 144 of file AbstractProperty.cxx.
|
inlinevirtual |
This operator overload allows to copy a property using the following syntax :
prop | The property nto copy the values from. |
Definition at line 156 of file AbstractProperty.h.
|
inlinevirtual |
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. |
Implements tlp::PropertyInterface.
Definition at line 347 of file AbstractProperty.h.
|
inlinevirtual |
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. |
Implements tlp::PropertyInterface.
Reimplemented in tlp::GraphProperty.
Definition at line 254 of file AbstractProperty.h.
|
virtual |
Sets the value of all edges and notify the observers.
v | The value to set to all edges. |
Definition at line 80 of file AbstractProperty.cxx.
|
inlinevirtual |
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. |
Implements tlp::PropertyInterface.
Definition at line 344 of file AbstractProperty.h.
|
inlinevirtual |
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. |
Implements tlp::PropertyInterface.
Reimplemented in tlp::GraphProperty.
Definition at line 245 of file AbstractProperty.h.
|
virtual |
Sets the value of all nodes and notify the observers.
v | The value to set to all nodes. |
Definition at line 72 of file AbstractProperty.cxx.
|
inlinevirtual |
Sets the edge value.
e | The edge to set the value of. |
value | The value to set to this edge. |
Implements tlp::PropertyInterface.
Definition at line 341 of file AbstractProperty.h.
|
inlinevirtual |
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. |
Implements tlp::PropertyInterface.
Reimplemented in tlp::GraphProperty.
Definition at line 236 of file AbstractProperty.h.
|
virtual |
Set the value of an edge and notify the observers of a modification.
e | The edge to set the value of. |
v | The value to affect for this edge. |
Definition at line 64 of file AbstractProperty.cxx.
|
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. |
Reimplemented from tlp::PropertyInterface.
Reimplemented in tlp::DoubleProperty.
Definition at line 365 of file AbstractProperty.h.
|
inlinevirtual |
Sets the node value.
n | The node to set the value of. |
value | The value to set to this node. |
Implements tlp::PropertyInterface.
Definition at line 338 of file AbstractProperty.h.
|
inlinevirtual |
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. |
Implements tlp::PropertyInterface.
Reimplemented in tlp::GraphProperty.
Definition at line 227 of file AbstractProperty.h.
|
virtual |
Sets the value of a node and notify the observers of a modification.
n | The node to set the value of. |
v | The value to affect for this node. |
Definition at line 56 of file AbstractProperty.cxx.