tlp::AbstractProperty< Tnode, Tedge, TPROPERTY > Class Template Reference
[Properties]
#include <AbstractProperty.h>
Inherits tlp::PropertyInterface.
Inherited by tlp::ColorProperty, tlp::DoubleProperty, tlp::IntegerProperty, tlp::LayoutProperty, tlp::SizeProperty, and tlp::StringProperty.
Inheritance diagram for tlp::AbstractProperty< Tnode, Tedge, TPROPERTY >:
[legend]Collaboration diagram for tlp::AbstractProperty< Tnode, Tedge, TPROPERTY >:
[legend]List of all members.
Detailed Description
template<class Tnode, class Tedge, class TPROPERTY = PropertyAlgorithm>
class tlp::AbstractProperty< Tnode, Tedge, TPROPERTY >
This class is used to store a property of a graph. A property is a couple of two functions:
- One from the set of nodes to a set of Tnode value
- One from the set of edges to a set of Tedge value
A AbstractProperty can be connected or not to a PropertyAlgorithm. In the first case it can be seen as buffer beetween the property and the user. In the second case it is only a memory area for storing data. A AbstractProperty is an observable, so it can be observed by others objects.
Public Member Functions
- AbstractProperty (Graph *, std::string n="")
- Tnode::RealType getNodeDefaultValue () const
- Tedge::RealType getEdgeDefaultValue () const
- ReturnType< typename Tnode::RealType
>::ConstValue getNodeValue (const node n) const
- ReturnType< typename Tedge::RealType
>::ConstValue getEdgeValue (const edge e) const
- void setNodeValue (const node n, const typename Tnode::RealType &v)
- void setEdgeValue (const edge e, const typename Tedge::RealType &v)
- void setAllNodeValue (const typename Tnode::RealType &v)
- void setAllEdgeValue (const typename Tedge::RealType &v)
- virtual void erase (const node n)
- virtual void erase (const edge e)
- virtual AbstractProperty<
Tnode, Tedge, TPROPERTY > & operator= (AbstractProperty< Tnode, Tedge, TPROPERTY > &prop)
- virtual std::string getTypename () const
- virtual std::string getNodeDefaultStringValue () const
- virtual std::string getEdgeDefaultStringValue () const
- virtual std::string getNodeStringValue (const node n) const
- virtual std::string getEdgeStringValue (const edge e) const
- virtual bool setNodeStringValue (const node n, const std::string &v)
- virtual bool setEdgeStringValue (const edge e, const std::string &v)
- virtual bool setAllNodeStringValue (const std::string &v)
- virtual bool setAllEdgeStringValue (const std::string &v)
- virtual Iterator< node > * getNonDefaultValuatedNodes (const Graph *g=NULL) const
- virtual Iterator< edge > * getNonDefaultValuatedEdges (const Graph *g=NULL) const
- virtual void copy (const node dst, const node src, PropertyInterface *prop, bool ifNotDefault=false)
- virtual void copy (const edge dst, const edge src, PropertyInterface *prop, bool ifNotDefault=false)
- virtual DataMem * getNodeDefaultDataMemValue () const
- virtual DataMem * getEdgeDefaultDataMemValue () const
- virtual DataMem * getNodeDataMemValue (const node n) const
- virtual DataMem * getEdgeDataMemValue (const edge e) const
- virtual DataMem * getNonDefaultDataMemValue (const node n) const
- virtual DataMem * getNonDefaultDataMemValue (const edge e) const
- virtual void setNodeDataMemValue (const node n, const DataMem *v)
- virtual void setEdgeDataMemValue (const edge e, const DataMem *v)
- virtual void setAllNodeDataMemValue (const DataMem *v)
- virtual void setAllEdgeDataMemValue (const DataMem *v)
- virtual void computeMetaValue (node mN, Graph *sg, Graph *mg)
- virtual void computeMetaValue (edge mE, Iterator< edge > *itE, Graph *mg)
- virtual void setMetaValueCalculator (PropertyInterface::MetaValueCalculator *mvCalc)
Static Public Member Functions
Static Public Attributes
Protected Types
Protected Member Functions
Protected Attributes
Friends
Classes
Member Typedef Documentation
Constructor & Destructor Documentation
Member Function Documentation
template<class Tnode, class Tedge, class TPROPERTY = PropertyAlgorithm> |
virtual void tlp::AbstractProperty< Tnode, Tedge, TPROPERTY >::clone_handler |
( |
AbstractProperty< Tnode, Tedge, TPROPERTY > & |
|
) |
[inline, protected, virtual] |
|
|
Enable to clone part of sub_class.
|
template<class Tnode, class Tedge, class TPROPERTY = PropertyAlgorithm> |
virtual void tlp::AbstractProperty< Tnode, Tedge, TPROPERTY >::computeMetaValue |
( |
node |
mN, |
|
|
Graph * |
sg, |
|
|
Graph * |
mg |
|
) |
[virtual] |
|
template<class Tnode, class Tedge, class TPROPERTY = PropertyAlgorithm> |
virtual void tlp::AbstractProperty< Tnode, Tedge, TPROPERTY >::copy |
( |
const edge |
dst, |
|
|
const edge |
src, |
|
|
PropertyInterface * |
prop, |
|
|
bool |
ifNotDefault = false |
|
) |
[virtual] |
|
|
Set the value of an edge (first argument) in the current property (this) with the value of the edge (second argument) defined in prop (third argument). If the fourth argument is set to true, the value will be copied only if it is not the default value.
Implements tlp::PropertyInterface. |
template<class Tnode, class Tedge, class TPROPERTY = PropertyAlgorithm> |
virtual void tlp::AbstractProperty< Tnode, Tedge, TPROPERTY >::copy |
( |
const node |
dst, |
|
|
const node |
src, |
|
|
PropertyInterface * |
prop, |
|
|
bool |
ifNotDefault = false |
|
) |
[virtual] |
|
|
Set the value of a node (first argument) in the current property (this) with the value of the node (second argument) defined in prop (third argument). If the fourth argument is set to true, the value will be copied only if it is not the default value.
Implements tlp::PropertyInterface. |
template<class Tnode, class Tedge, class TPROPERTY = PropertyAlgorithm> |
virtual void tlp::AbstractProperty< Tnode, Tedge, TPROPERTY >::erase |
( |
const edge |
e |
) |
[virtual] |
|
template<class Tnode, class Tedge, class TPROPERTY = PropertyAlgorithm> |
virtual void tlp::AbstractProperty< Tnode, Tedge, TPROPERTY >::erase |
( |
const node |
n |
) |
[virtual] |
|
template<class Tnode, class Tedge, class TPROPERTY = PropertyAlgorithm> |
virtual DataMem* tlp::AbstractProperty< Tnode, Tedge, TPROPERTY >::getEdgeDataMemValue |
( |
const edge |
e |
) |
const [virtual] |
|
template<class Tnode, class Tedge, class TPROPERTY = PropertyAlgorithm> |
virtual DataMem* tlp::AbstractProperty< Tnode, Tedge, TPROPERTY >::getEdgeDefaultDataMemValue |
( |
|
) |
const [virtual] |
|
template<class Tnode, class Tedge, class TPROPERTY = PropertyAlgorithm> |
virtual std::string tlp::AbstractProperty< Tnode, Tedge, TPROPERTY >::getEdgeDefaultStringValue |
( |
|
) |
const [virtual] |
|
template<class Tnode, class Tedge, class TPROPERTY = PropertyAlgorithm> |
Tedge::RealType tlp::AbstractProperty< Tnode, Tedge, TPROPERTY >::getEdgeDefaultValue |
( |
|
) |
const |
|
|
Returns the edge default value of the property |
template<class Tnode, class Tedge, class TPROPERTY = PropertyAlgorithm> |
virtual std::string tlp::AbstractProperty< Tnode, Tedge, TPROPERTY >::getEdgeStringValue |
( |
const edge |
e |
) |
const [virtual] |
|
template<class Tnode, class Tedge, class TPROPERTY = PropertyAlgorithm> |
ReturnType<typename Tedge::RealType>::ConstValue tlp::AbstractProperty< Tnode, Tedge, TPROPERTY >::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 value depending of the type. |
template<class Tnode, class Tedge, class TPROPERTY = PropertyAlgorithm> |
virtual DataMem* tlp::AbstractProperty< Tnode, Tedge, TPROPERTY >::getNodeDataMemValue |
( |
const node |
n |
) |
const [virtual] |
|
template<class Tnode, class Tedge, class TPROPERTY = PropertyAlgorithm> |
virtual DataMem* tlp::AbstractProperty< Tnode, Tedge, TPROPERTY >::getNodeDefaultDataMemValue |
( |
|
) |
const [virtual] |
|
template<class Tnode, class Tedge, class TPROPERTY = PropertyAlgorithm> |
virtual std::string tlp::AbstractProperty< Tnode, Tedge, TPROPERTY >::getNodeDefaultStringValue |
( |
|
) |
const [virtual] |
|
template<class Tnode, class Tedge, class TPROPERTY = PropertyAlgorithm> |
Tnode::RealType tlp::AbstractProperty< Tnode, Tedge, TPROPERTY >::getNodeDefaultValue |
( |
|
) |
const |
|
|
Returns the node default value of the property |
template<class Tnode, class Tedge, class TPROPERTY = PropertyAlgorithm> |
virtual std::string tlp::AbstractProperty< Tnode, Tedge, TPROPERTY >::getNodeStringValue |
( |
const node |
n |
) |
const [virtual] |
|
template<class Tnode, class Tedge, class TPROPERTY = PropertyAlgorithm> |
ReturnType<typename Tnode::RealType>::ConstValue tlp::AbstractProperty< Tnode, Tedge, TPROPERTY >::getNodeValue |
( |
const node |
n |
) |
const |
|
|
Returns the value associated to the node n in this property. If there is no value it returns the default value depending of the type. |
template<class Tnode, class Tedge, class TPROPERTY = PropertyAlgorithm> |
virtual DataMem* tlp::AbstractProperty< Tnode, Tedge, TPROPERTY >::getNonDefaultDataMemValue |
( |
const edge |
e |
) |
const [virtual] |
|
template<class Tnode, class Tedge, class TPROPERTY = PropertyAlgorithm> |
virtual DataMem* tlp::AbstractProperty< Tnode, Tedge, TPROPERTY >::getNonDefaultDataMemValue |
( |
const node |
n |
) |
const [virtual] |
|
template<class Tnode, class Tedge, class TPROPERTY = PropertyAlgorithm> |
virtual Iterator<edge>* tlp::AbstractProperty< Tnode, Tedge, TPROPERTY >::getNonDefaultValuatedEdges |
( |
const Graph * |
g = NULL |
) |
const [virtual] |
|
template<class Tnode, class Tedge, class TPROPERTY = PropertyAlgorithm> |
virtual Iterator<node>* tlp::AbstractProperty< Tnode, Tedge, TPROPERTY >::getNonDefaultValuatedNodes |
( |
const Graph * |
g = NULL |
) |
const [virtual] |
|
template<class Tnode, class Tedge, class TPROPERTY = PropertyAlgorithm> |
virtual std::string tlp::AbstractProperty< Tnode, Tedge, TPROPERTY >::getTypename |
( |
|
) |
const [virtual] |
|
|
Returns a string describing the type of the property. i.e. "graph", "double", "layout", "string", "integer", "color", "size", ...
Implements tlp::PropertyInterface. |
template<class Tnode, class Tedge, class TPROPERTY = PropertyAlgorithm> |
static void tlp::AbstractProperty< Tnode, Tedge, TPROPERTY >::initFactory |
( |
|
) |
[inline, static] |
|
template<class Tnode, class Tedge, class TPROPERTY = PropertyAlgorithm> |
virtual void tlp::AbstractProperty< Tnode, Tedge, TPROPERTY >::setAllEdgeDataMemValue |
( |
const DataMem * |
v |
) |
[virtual] |
|
template<class Tnode, class Tedge, class TPROPERTY = PropertyAlgorithm> |
virtual bool tlp::AbstractProperty< Tnode, Tedge, TPROPERTY >::setAllEdgeStringValue |
( |
const std::string & |
v |
) |
[virtual] |
|
template<class Tnode, class Tedge, class TPROPERTY = PropertyAlgorithm> |
void tlp::AbstractProperty< Tnode, Tedge, TPROPERTY >::setAllEdgeValue |
( |
const typename Tedge::RealType & |
v |
) |
|
|
|
Set the value of all edges and notify the observers |
template<class Tnode, class Tedge, class TPROPERTY = PropertyAlgorithm> |
virtual void tlp::AbstractProperty< Tnode, Tedge, TPROPERTY >::setAllNodeDataMemValue |
( |
const DataMem * |
v |
) |
[virtual] |
|
template<class Tnode, class Tedge, class TPROPERTY = PropertyAlgorithm> |
virtual bool tlp::AbstractProperty< Tnode, Tedge, TPROPERTY >::setAllNodeStringValue |
( |
const std::string & |
v |
) |
[virtual] |
|
template<class Tnode, class Tedge, class TPROPERTY = PropertyAlgorithm> |
void tlp::AbstractProperty< Tnode, Tedge, TPROPERTY >::setAllNodeValue |
( |
const typename Tnode::RealType & |
v |
) |
|
|
|
Set the value of all nodes and notify the observers |
template<class Tnode, class Tedge, class TPROPERTY = PropertyAlgorithm> |
virtual void tlp::AbstractProperty< Tnode, Tedge, TPROPERTY >::setEdgeDataMemValue |
( |
const edge |
e, |
|
|
const DataMem * |
v |
|
) |
[virtual] |
|
template<class Tnode, class Tedge, class TPROPERTY = PropertyAlgorithm> |
virtual bool tlp::AbstractProperty< Tnode, Tedge, TPROPERTY >::setEdgeStringValue |
( |
const edge |
e, |
|
|
const std::string & |
v |
|
) |
[virtual] |
|
template<class Tnode, class Tedge, class TPROPERTY = PropertyAlgorithm> |
void tlp::AbstractProperty< Tnode, Tedge, TPROPERTY >::setEdgeValue |
( |
const edge |
e, |
|
|
const typename Tedge::RealType & |
v |
|
) |
|
|
|
Set the value of an edge and notify the observers of a modification. |
template<class Tnode, class Tedge, class TPROPERTY = PropertyAlgorithm> |
virtual void tlp::AbstractProperty< Tnode, Tedge, TPROPERTY >::setNodeDataMemValue |
( |
const node |
n, |
|
|
const DataMem * |
v |
|
) |
[virtual] |
|
template<class Tnode, class Tedge, class TPROPERTY = PropertyAlgorithm> |
virtual bool tlp::AbstractProperty< Tnode, Tedge, TPROPERTY >::setNodeStringValue |
( |
const node |
n, |
|
|
const std::string & |
v |
|
) |
[virtual] |
|
template<class Tnode, class Tedge, class TPROPERTY = PropertyAlgorithm> |
void tlp::AbstractProperty< Tnode, Tedge, TPROPERTY >::setNodeValue |
( |
const node |
n, |
|
|
const typename Tnode::RealType & |
v |
|
) |
|
|
|
Set the value of a node n and notify the observers of a modification. |
Friends And Related Function Documentation
template<class Tnode, class Tedge, class TPROPERTY = PropertyAlgorithm> |
friend class Graph [friend] |
|
template<class Tnode, class Tedge, class TPROPERTY = PropertyAlgorithm> |
friend class GraphView [friend] |
|
Member Data Documentation
|