Tulip
6.0.0
Large graphs analysis and drawing
|
#include <AbstractProperty.h>
Classes | |
class | edgeValueRef |
class | MetaValueCalculator |
class | nodeValueRef |
Public Member Functions | |
AbstractProperty (Graph *, const std::string &n="") | |
int | compare (const edge e1, const edge e2) const override |
int | compare (const node n1, const node n2) const override |
void | computeMetaValue (edge e, tlp::Iterator< edge > *itE, Graph *mg) override |
void | computeMetaValue (node n, Graph *sg, Graph *mg) override |
bool | copy (const edge destination, const edge source, PropertyInterface *property, bool ifNotDefault=false) override |
bool | copy (const node destination, const node source, PropertyInterface *property, bool ifNotDefault=false) override |
void | copy (PropertyInterface *property) override |
unsigned int | edgeValueSize () const override |
void | erase (const edge e) override |
void | erase (const node n) override |
DataMem * | getEdgeDataMemValue (const edge e) const override |
DataMem * | getEdgeDefaultDataMemValue () const override |
std::string | getEdgeDefaultStringValue () const override |
Tedge::RealType | getEdgeDefaultValue () const |
virtual tlp::Iterator< edge > * | getEdgesEqualTo (typename tlp::StoredType< typename Tedge::RealType >::ReturnedConstValue v, const Graph *g=nullptr) const |
std::string | getEdgeStringValue (const edge e) const override |
tlp::StoredType< typename Tedge::RealType >::ReturnedConstValue | getEdgeValue (const edge e) const |
DataMem * | getNodeDataMemValue (const node n) const override |
DataMem * | getNodeDefaultDataMemValue () const override |
std::string | getNodeDefaultStringValue () const override |
Tnode::RealType | getNodeDefaultValue () const |
virtual tlp::Iterator< node > * | getNodesEqualTo (typename tlp::StoredType< typename Tnode::RealType >::ReturnedConstValue v, const Graph *g=nullptr) const |
std::string | getNodeStringValue (const node n) const override |
tlp::StoredType< typename Tnode::RealType >::ReturnedConstValue | getNodeValue (const node n) const |
DataMem * | getNonDefaultDataMemValue (const edge e) const override |
DataMem * | getNonDefaultDataMemValue (const node n) const override |
tlp::Iterator< edge > * | getNonDefaultValuatedEdges (const Graph *g=nullptr) const override |
tlp::Iterator< node > * | getNonDefaultValuatedNodes (const Graph *g=nullptr) const override |
bool | hasNonDefaultValuatedEdges (const Graph *g=nullptr) const override |
bool | hasNonDefaultValuatedNodes (const Graph *g=nullptr) const override |
unsigned int | nodeValueSize () const override |
unsigned int | numberOfNonDefaultValuatedEdges (const Graph *=nullptr) const override |
unsigned int | numberOfNonDefaultValuatedNodes (const Graph *g=nullptr) const override |
virtual AbstractProperty< Tnode, Tedge, Tprop > & | operator= (AbstractProperty< Tnode, Tedge, Tprop > &prop) |
constexpr edgeValueRef | operator[] (edge e) |
tlp::StoredType< typename Tedge::RealType >::ReturnedConstValue | operator[] (edge e) const |
constexpr nodeValueRef | operator[] (node n) |
const tlp::StoredType< typename Tnode::RealType >::ReturnedConstValue | operator[] (node n) const |
bool | readEdgeDefaultValue (std::istream &) override |
bool | readEdgeValue (std::istream &, edge) override |
bool | readNodeDefaultValue (std::istream &) override |
bool | readNodeValue (std::istream &, node) override |
void | setAllEdgeDataMemValue (const DataMem *v) override |
bool | setAllEdgeStringValue (const std::string &inV) override |
virtual void | setAllEdgeValue (typename tlp::StoredType< typename Tedge::RealType >::ReturnedConstValue v) |
void | setAllNodeDataMemValue (const DataMem *v) override |
bool | setAllNodeStringValue (const std::string &inV) override |
virtual void | setAllNodeValue (typename tlp::StoredType< typename Tnode::RealType >::ReturnedConstValue v) |
void | setEdgeDataMemValue (const edge e, const DataMem *v) override |
bool | setEdgeDefaultStringValue (const std::string &inV) override |
virtual void | setEdgeDefaultValue (typename tlp::StoredType< typename Tedge::RealType >::ReturnedConstValue v) |
bool | setEdgeStringValue (const edge inE, const std::string &inV) override |
virtual void | setEdgeValue (const edge e, typename tlp::StoredType< typename Tedge::RealType >::ReturnedConstValue v) |
void | setMetaValueCalculator (PropertyInterface::MetaValueCalculator *mvCalc) override |
void | setNodeDataMemValue (const node n, const DataMem *v) override |
bool | setNodeDefaultStringValue (const std::string &inV) override |
virtual void | setNodeDefaultValue (typename tlp::StoredType< typename Tnode::RealType >::ReturnedConstValue v) |
bool | setNodeStringValue (const node inN, const std::string &inV) override |
virtual void | setNodeValue (const node n, typename tlp::StoredType< typename Tnode::RealType >::ReturnedConstValue v) |
bool | setStringValueToGraphEdges (const std::string &inV, const Graph *graph) override |
bool | setStringValueToGraphNodes (const std::string &inV, const Graph *graph) override |
virtual void | setValueToGraphEdges (typename tlp::StoredType< typename Tedge::RealType >::ReturnedConstValue v, const Graph *graph) |
virtual void | setValueToGraphNodes (typename tlp::StoredType< typename Tnode::RealType >::ReturnedConstValue v, const Graph *graph) |
void | writeEdgeDefaultValue (std::ostream &) const override |
void | writeEdgeValue (std::ostream &, edge) const override |
void | writeNodeDefaultValue (std::ostream &) const override |
void | writeNodeValue (std::ostream &, node) const override |
Public Member Functions inherited from tlp::PropertyInterface | |
virtual PropertyInterface * | clonePrototype (Graph *graph, const std::string &name) const =0 |
virtual const std::string & | getCppClassName () const =0 |
tlp::Graph * | getGraph () const |
MetaValueCalculator * | getMetaValueCalculator () |
const std::string & | getName () const |
virtual const std::string & | getTypename () const =0 |
constexpr edgeStringValueRef | operator[] (edge e) |
std::string | operator[] (edge e) const |
constexpr nodeStringValueRef | operator[] (node n) |
bool | rename (const std::string &newName) |
Public Member Functions inherited from tlp::Observable | |
void | addListener (Observable &listener) const |
void | addListener (Observable *const listener) const |
void | addObserver (Observable &observer) 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 &listener) const |
void | removeListener (Observable *const listener) const |
void | removeObserver (Observable &observer) const |
void | removeObserver (Observable *const observer) const |
Protected Member Functions | |
virtual void | clone_handler (AbstractProperty< Tnode, Tedge, Tprop > &) |
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 () |
void | notifyRename (const std::string &newName) |
Protected Member Functions inherited from tlp::Observable | |
Observable (const Observable &) | |
bool | hasOnlookers () const |
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 void | disableEventNotification () |
static void | enableEventNotification () |
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 () |
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 55 of file AbstractProperty.h.
|
inlineprotectedvirtual |
Enable to clone part of sub_class.
Definition at line 658 of file AbstractProperty.h.
|
overridevirtual |
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 264 of file AbstractProperty.cxx.
|
overridevirtual |
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::StringProperty, tlp::SizeProperty, and tlp::ColorProperty.
Definition at line 257 of file AbstractProperty.cxx.
|
inlineoverridevirtual |
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 611 of file AbstractProperty.h.
|
inlineoverridevirtual |
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 603 of file AbstractProperty.h.
|
inlineoverridevirtual |
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 530 of file AbstractProperty.h.
|
inlineoverridevirtual |
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 512 of file AbstractProperty.h.
|
inlineoverridevirtual |
Copies the values of the source property to this property.
source | The property from which to copy values. |
Implements tlp::PropertyInterface.
Definition at line 548 of file AbstractProperty.h.
|
overridevirtual |
Returns the size in bytes of an edge's value.
Implements tlp::PropertyInterface.
Reimplemented in tlp::StringProperty, and tlp::GraphProperty.
Definition at line 492 of file AbstractProperty.cxx.
|
inlineoverridevirtual |
Resets the value of an edge to the default value.
e | The edge to reset the value of. |
Implements tlp::PropertyInterface.
Definition at line 355 of file AbstractProperty.h.
|
inlineoverridevirtual |
Resets the value of a node to the default value.
n | The node to reset the value of. |
Implements tlp::PropertyInterface.
Definition at line 344 of file AbstractProperty.h.
|
inlineoverridevirtual |
Gets the edge value, contained in a tlp::DataMem structure.
n | The edge to get the value of. |
Implements tlp::PropertyInterface.
Definition at line 564 of file AbstractProperty.h.
|
inlineoverridevirtual |
Gets a pointer to the tlp::DataMem structure that contains the edge default value.
Implements tlp::PropertyInterface.
Definition at line 558 of file AbstractProperty.h.
|
inlineoverridevirtual |
Gets a string representation of the edge default value.
Implements tlp::PropertyInterface.
Definition at line 412 of file AbstractProperty.h.
|
inline |
Gets the default edge value of the property.
Definition at line 41 of file AbstractProperty.cxx.
|
virtual |
Returns an iterator through all edges belonging to g whose associated value is equal to val. If g is nullptr, the graph given when creating the property is considered.
Definition at line 78 of file AbstractProperty.cxx.
|
inlineoverridevirtual |
Gets a string representation of the edge value.
e | The edge to get the value of. |
Implements tlp::PropertyInterface.
Definition at line 420 of file AbstractProperty.h.
|
inline |
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 54 of file AbstractProperty.cxx.
|
inlineoverridevirtual |
Gets the node value, contained in a tlp::DataMem structure.
n | The node to get the value of. |
Implements tlp::PropertyInterface.
Definition at line 561 of file AbstractProperty.h.
|
inlineoverridevirtual |
Gets a pointer to the tlp::DataMem structure that contains the node default value.
Implements tlp::PropertyInterface.
Definition at line 555 of file AbstractProperty.h.
|
inlineoverridevirtual |
Gets a string representation of the node default value.
Implements tlp::PropertyInterface.
Definition at line 408 of file AbstractProperty.h.
|
inline |
Gets the default node value of the property.
Definition at line 35 of file AbstractProperty.cxx.
|
virtual |
Returns an iterator through all nodes belonging to g whose associated value is equal to val. If g is nullptr, the graph given when creating the property is considered.
Definition at line 60 of file AbstractProperty.cxx.
|
inlineoverridevirtual |
Gets a string representation of the node value.
n | The node to get the value of. |
Implements tlp::PropertyInterface.
Definition at line 416 of file AbstractProperty.h.
|
inline |
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 47 of file AbstractProperty.cxx.
|
inlineoverridevirtual |
Returns the value in a DataMem if it is not default, otherwise returns nullptr.
e | The edge to get the value of. |
Implements tlp::PropertyInterface.
Definition at line 577 of file AbstractProperty.h.
|
inlineoverridevirtual |
Returns the value in a DataMem if it is not default, otherwise returns nullptr.
n | The node to get the value of. |
Implements tlp::PropertyInterface.
Definition at line 567 of file AbstractProperty.h.
|
overridevirtual |
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 449 of file AbstractProperty.cxx.
|
overridevirtual |
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 367 of file AbstractProperty.cxx.
|
overridevirtual |
Returns whether the property has edges with a non default value. When given a Graph as parameter, only the edges with a non default value belonging to this graph are taken into account.
Implements tlp::PropertyInterface.
Definition at line 473 of file AbstractProperty.cxx.
|
overridevirtual |
Returns whether the property has nodes with a non default value. When given a Graph as parameter, only the nodes with a non default value belonging to this graph are taken into account.
Implements tlp::PropertyInterface.
Definition at line 391 of file AbstractProperty.cxx.
|
overridevirtual |
Returns the size in bytes of a node's value.
Implements tlp::PropertyInterface.
Reimplemented in tlp::StringProperty, and tlp::GraphProperty.
Definition at line 410 of file AbstractProperty.cxx.
|
overridevirtual |
Returns the number of edges with a non default value.
Implements tlp::PropertyInterface.
Definition at line 483 of file AbstractProperty.cxx.
|
overridevirtual |
Returns the number of nodes with a non default value. When given a Graph as parameter, only the number of nodes with a non default value belonging to this graph is returned.
Implements tlp::PropertyInterface.
Definition at line 401 of file AbstractProperty.cxx.
|
inlinevirtual |
This operator overload allows to copy a property using the following syntax :
prop | The property to copy the values from. |
Definition at line 371 of file AbstractProperty.h.
|
inlineconstexpr |
overloading of operator[] to set an edge value
Definition at line 245 of file AbstractProperty.h.
|
inline |
overloading of operator[] to get an edge value
Definition at line 107 of file AbstractProperty.h.
|
inlineconstexpr |
overloading of operator[] to set a node value
Definition at line 185 of file AbstractProperty.h.
|
inline |
overloading of operator[] to get a node value
Definition at line 89 of file AbstractProperty.h.
|
overridevirtual |
Reads the edges default value.
Implements tlp::PropertyInterface.
Definition at line 508 of file AbstractProperty.cxx.
|
overridevirtual |
Reads the value of an edge.
Implements tlp::PropertyInterface.
Definition at line 518 of file AbstractProperty.cxx.
|
overridevirtual |
Reads the nodes default value.
Implements tlp::PropertyInterface.
Reimplemented in tlp::GraphProperty.
Definition at line 426 of file AbstractProperty.cxx.
|
overridevirtual |
Reads the value of a node.
Implements tlp::PropertyInterface.
Reimplemented in tlp::GraphProperty.
Definition at line 436 of file AbstractProperty.cxx.
|
inlineoverridevirtual |
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 596 of file AbstractProperty.h.
|
inlineoverridevirtual |
Sets all the edges value to the value represented by the string. For some types, some parsing will be necessary (e.g. LayoutProperty). 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. |
Implements tlp::PropertyInterface.
Reimplemented in tlp::GraphProperty.
Definition at line 478 of file AbstractProperty.h.
|
virtual |
Sets the value of all edges and notify the observers. All previous values are lost and the given value is assigned as the default one to the future added edges.
v | The value to set to all edges. |
Definition at line 226 of file AbstractProperty.cxx.
|
inlineoverridevirtual |
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 593 of file AbstractProperty.h.
|
inlineoverridevirtual |
Sets all the nodes value to the value represented by the string. For some types, some parsing will be necessary (e.g. LayoutProperty). 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. |
Implements tlp::PropertyInterface.
Reimplemented in tlp::GraphProperty.
Definition at line 451 of file AbstractProperty.h.
|
virtual |
Sets the value of all nodes and notify the observers. All previous values are lost and the given value is assigned as the default one to the future added nodes.
v | The value to set to all nodes. |
Definition at line 114 of file AbstractProperty.cxx.
|
inlineoverridevirtual |
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 590 of file AbstractProperty.h.
|
inlineoverridevirtual |
Sets the value assigned as the default one to the future added edges from a string representation.
value | A string representing the new value to set on future added edges. |
Implements tlp::PropertyInterface.
Definition at line 469 of file AbstractProperty.h.
|
virtual |
Sets the value assigned as the default one to the future added edges.
value | the new value to set on future added edges. |
Definition at line 185 of file AbstractProperty.cxx.
|
inlineoverridevirtual |
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. |
Implements tlp::PropertyInterface.
Reimplemented in tlp::GraphProperty.
Definition at line 433 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 105 of file AbstractProperty.cxx.
|
inlineoverridevirtual |
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.
Definition at line 617 of file AbstractProperty.h.
|
inlineoverridevirtual |
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 587 of file AbstractProperty.h.
|
inlineoverridevirtual |
Sets the value assigned as the default one to the future added nodes from a string representation.
value | A string representing the new value to set on future added nodes. |
Implements tlp::PropertyInterface.
Definition at line 442 of file AbstractProperty.h.
|
virtual |
Sets the value assigned as the default one to the future added nodes.
v | the new value to set on future added nodes. |
Definition at line 123 of file AbstractProperty.cxx.
|
inlineoverridevirtual |
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. |
Implements tlp::PropertyInterface.
Reimplemented in tlp::GraphProperty.
Definition at line 424 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 96 of file AbstractProperty.cxx.
|
inlineoverridevirtual |
Sets all the edges value to the value represented by the string for a graph. For some types, some parsing will be necessary (e.g. LayoutProperty). Only the edges from that graph will have their value modified in the property and the default edge value will not be modified.
value | A string representing the new value to set on all the edges. |
graph | A graph that defines the set of edges. |
Implements tlp::PropertyInterface.
Reimplemented in tlp::GraphProperty.
Definition at line 487 of file AbstractProperty.h.
|
inlineoverridevirtual |
Sets all the nodes value to the value represented by the string for a graph. For some types, some parsing will be necessary (e.g. LayoutProperty). Only the nodes from that graph will have their value modified in the property and the default node value will not be modified.
value | A string representing the new value to set on all the nodes. |
graph | A graph that defines the set of nodes. |
Implements tlp::PropertyInterface.
Reimplemented in tlp::GraphProperty.
Definition at line 460 of file AbstractProperty.h.
|
virtual |
Sets the value of all edges in a graph and notify the observers. Only the edges from that graph will have their value modified in the property and the default edge value will not be modified.
v | The value to set to all edges. |
graph | A graph on which to modify |
Definition at line 235 of file AbstractProperty.cxx.
|
virtual |
Sets the value of all nodes in a graph and notify the observers. Only the nodes from that graph will have their value modified in the property and the default node value will not be modified.
v | The value to set to all nodes. |
graph | A graph that defines the set of nodes |
Definition at line 163 of file AbstractProperty.cxx.
|
overridevirtual |
Writes the edges default value.
Implements tlp::PropertyInterface.
Definition at line 497 of file AbstractProperty.cxx.
|
overridevirtual |
Writes the value of an edge.
Implements tlp::PropertyInterface.
Definition at line 502 of file AbstractProperty.cxx.
|
overridevirtual |
Writes the nodes default value.
Implements tlp::PropertyInterface.
Definition at line 415 of file AbstractProperty.cxx.
|
overridevirtual |
Writes the value of a node.
Implements tlp::PropertyInterface.
Definition at line 420 of file AbstractProperty.cxx.