Tulip  4.0.0
Better Visualization Through Research
 All Classes Files Functions Variables Enumerations Enumerator Properties Groups Pages
tlp::PropertyInterface Class Referenceabstract

#include <PropertyInterface.h>

Inherits tlp::Observable.

Inherited by tlp::AbstractProperty< nodeType, edgeType >, tlp::AbstractProperty< tlp::BooleanType, tlp::BooleanType >, tlp::AbstractProperty< tlp::BooleanVectorType, tlp::BooleanVectorType >, tlp::AbstractProperty< tlp::ColorVectorType, tlp::ColorVectorType >, tlp::AbstractProperty< tlp::CoordVectorType, tlp::CoordVectorType >, tlp::AbstractProperty< tlp::DoubleVectorType, tlp::DoubleVectorType >, tlp::AbstractProperty< tlp::SizeVectorType, tlp::SizeVectorType >, tlp::AbstractProperty< tlp::StringVectorType, tlp::StringVectorType >, tlp::AbstractProperty< vectType, vectType >, and tlp::AbstractProperty< Tnode, Tedge >.

Classes

class  MetaValueCalculator
 Base class for computing values on meta nodes and edges. More...
 

Public Member Functions

void addPropertyObserver (Observable *pObs)
 
virtual PropertyInterfaceclonePrototype (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 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::GraphgetGraph () const
 
MetaValueCalculatorgetMetaValueCalculator ()
 
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 std::string getTypename () const =0
 
void removePropertyObserver (Observable *pObs)
 
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
 
- 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 ()
 
- Protected Member Functions inherited from tlp::Observable
 Observable (const Observable &)
 
tlp::Iterator< tlp::Observable * > * getObservables () const
 
bool hasOnlookers () const
 
void notifyObservers ()
 
void observableDeleted ()
 
Observableoperator= (const Observable &)
 
void sendEvent (const Event &message)
 
virtual void treatEvent (const Event &message)
 
virtual void treatEvents (const std::vector< Event > &events)
 

Protected Attributes

Graphgraph
 
MetaValueCalculatormetaValueCalculator
 
std::string name
 

Friends

class PropertyManager
 

Additional Inherited Members

- Static Public Member Functions inherited from tlp::Observable
static ObservablegetObject (tlp::node n)
 
static const tlp::VectorGraph & getObservableGraph ()
 
static void holdObservers ()
 
static bool isAlive (tlp::node n)
 
static unsigned int observersHoldCounter ()
 
static void unholdObservers ()
 

Detailed Description

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 (

See Also
Graph::getProperty()).

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.

Member Function Documentation

void tlp::PropertyInterface::addPropertyObserver ( Observable pObs)
inline

Adds a Listener to this property.

Deprecated:
Use addListener instead.

Definition at line 359 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.

Parameters
graphThe Graph in which to create the new property.
nameThe name of the new property.
Returns
The newly created property.

Implemented in tlp::CoordVectorProperty, tlp::DoubleVectorProperty, tlp::BooleanVectorProperty, tlp::SizeVectorProperty, tlp::StringVectorProperty, tlp::ColorVectorProperty, tlp::LayoutProperty, tlp::GraphProperty, tlp::SizeProperty, tlp::DoubleProperty, tlp::StringProperty, tlp::ColorProperty, and tlp::BooleanProperty.

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.

Parameters
destinationThe node whose value will be set.
sourceThe node whose value to copy.
propertyThe property from which to copy the source node value.
ifNotDefaultIf true, the copy will only be performed if the source node's value is not the default value.
Returns
True if the copy was performed, false otherwise.

Implemented in tlp::AbstractProperty< Tnode, Tedge >, tlp::AbstractProperty< tlp::BooleanVectorType, tlp::BooleanVectorType >, tlp::AbstractProperty< tlp::ColorVectorType, tlp::ColorVectorType >, tlp::AbstractProperty< tlp::SizeVectorType, tlp::SizeVectorType >, tlp::AbstractProperty< tlp::StringVectorType, tlp::StringVectorType >, tlp::AbstractProperty< nodeType, edgeType >, tlp::AbstractProperty< tlp::DoubleVectorType, tlp::DoubleVectorType >, tlp::AbstractProperty< vectType, vectType >, tlp::AbstractProperty< tlp::CoordVectorType, tlp::CoordVectorType >, and tlp::AbstractProperty< tlp::BooleanType, tlp::BooleanType >.

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.

Parameters
destinationThe edge whose value will be set.
sourceThe edge whose value to copy.
propertyThe property from which to copy the source edge value.
ifNotDefaultIf true, the copy will only be performed if the source edge's value is not the default value.
Returns
True if the copy was performed, false otherwise.

Implemented in tlp::AbstractProperty< Tnode, Tedge >, tlp::AbstractProperty< tlp::BooleanVectorType, tlp::BooleanVectorType >, tlp::AbstractProperty< tlp::ColorVectorType, tlp::ColorVectorType >, tlp::AbstractProperty< tlp::SizeVectorType, tlp::SizeVectorType >, tlp::AbstractProperty< tlp::StringVectorType, tlp::StringVectorType >, tlp::AbstractProperty< nodeType, edgeType >, tlp::AbstractProperty< tlp::DoubleVectorType, tlp::DoubleVectorType >, tlp::AbstractProperty< vectType, vectType >, tlp::AbstractProperty< tlp::CoordVectorType, tlp::CoordVectorType >, and tlp::AbstractProperty< tlp::BooleanType, tlp::BooleanType >.

MetaValueCalculator* tlp::PropertyInterface::getMetaValueCalculator ( )
inline

Gets the MetaValueCalculator of this property.

Returns
The MetaValueCalculator of this property

Definition at line 341 of file PropertyInterface.h.

const std::string& tlp::PropertyInterface::getName ( ) const
inline

Gets the name of the property (e.g. viewLayout).

Returns
The name of this property.

Definition at line 125 of file PropertyInterface.h.

virtual tlp::Iterator<edge>* tlp::PropertyInterface::getNonDefaultValuatedEdges ( const Graph = NULL) const
pure virtual
virtual tlp::Iterator<node>* tlp::PropertyInterface::getNonDefaultValuatedNodes ( const Graph = NULL) const
pure virtual
virtual 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").

Returns
The name of this property's type.

Implemented in tlp::CoordVectorProperty, tlp::DoubleVectorProperty, tlp::BooleanVectorProperty, tlp::SizeVectorProperty, tlp::StringVectorProperty, tlp::ColorVectorProperty, tlp::GraphProperty, tlp::LayoutProperty, tlp::SizeProperty, tlp::DoubleProperty, tlp::StringProperty, tlp::ColorProperty, and tlp::BooleanProperty.

void tlp::PropertyInterface::removePropertyObserver ( Observable pObs)
inline

Removes a Listener from this property.

Deprecated:
Use removeListener instead.

Definition at line 367 of file PropertyInterface.h.

virtual bool tlp::PropertyInterface::setAllEdgeStringValue ( const std::string &  value)
pure virtual
virtual bool tlp::PropertyInterface::setAllNodeStringValue ( const std::string &  value)
pure virtual
virtual bool tlp::PropertyInterface::setEdgeStringValue ( const edge  e,
const std::string &  value 
)
pure virtual
virtual bool tlp::PropertyInterface::setNodeStringValue ( const node  n,
const std::string &  value 
)
pure virtual