#include <PropertyInterface.h>
Inherits tlp::Observable.
Inherited by tlp::AbstractProperty< tlp::BooleanType, tlp::BooleanType >, tlp::AbstractProperty< tlp::BooleanVectorType, tlp::BooleanVectorType, PropertyInterface >, tlp::AbstractProperty< tlp::ColorVectorType, tlp::ColorVectorType, PropertyInterface >, tlp::AbstractProperty< tlp::CoordVectorType, tlp::CoordVectorType, PropertyInterface >, tlp::AbstractProperty< tlp::DoubleVectorType, tlp::DoubleVectorType, PropertyInterface >, tlp::AbstractProperty< tlp::SizeVectorType, tlp::SizeVectorType, PropertyInterface >, tlp::AbstractProperty< tlp::StringVectorType, tlp::StringVectorType, PropertyInterface >, and tlp::NumericProperty.
 | 
| 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 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 std::string  | getTypename () const =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 | 
|   | 
| 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  | 
|   | 
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 52 of file PropertyInterface.h.
 
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
 - 
  
    | graph | The Graph in which to create the new property.  | 
    | name | The name of the new property.  | 
  
   
- Returns
 - The newly created property. 
 
Implemented in tlp::BooleanProperty.
 
 
  
  
      
        
          | virtual int tlp::PropertyInterface::compare  | 
          ( | 
          const node  | 
          n1,  | 
         
        
           | 
           | 
          const node  | 
          n2  | 
         
        
           | 
          ) | 
           |  const | 
         
       
   | 
  
pure virtual   | 
  
 
Compares the value this property holds for the two given nodes. 
- Parameters
 - 
  
    | n1 | The first node to compare the value of.  | 
    | n2 | The second node to compare the value of.  | 
  
   
- Returns
 - 0 if the values are identical, a positive value if n1 is greater than n2, and a negative value if n1 is less than n2. 
 
 
 
  
  
      
        
          | virtual int tlp::PropertyInterface::compare  | 
          ( | 
          const edge  | 
          e1,  | 
         
        
           | 
           | 
          const edge  | 
          e2  | 
         
        
           | 
          ) | 
           |  const | 
         
       
   | 
  
pure virtual   | 
  
 
Compares the value this property holds for the two given edges. 
- Parameters
 - 
  
    | e1 | The first edge to compare the value of.  | 
    | e2 | The second edge to compare the value of.  | 
  
   
- Returns
 - 0 if the values are identical, a positive value if e1 is greater than e2, and a negative value if e1 is less than e2. 
 
 
 
  
  
      
        
          | virtual void tlp::PropertyInterface::computeMetaValue  | 
          ( | 
          node  | 
          metaNode,  | 
         
        
           | 
           | 
          Graph *  | 
          subgraph,  | 
         
        
           | 
           | 
          Graph *  | 
          metaGraph  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
pure virtual   | 
  
 
Sets the value of the metanode to a computed value. 
The value is computed by this property's MetaValueCalculator. 
- Parameters
 - 
  
    | metaNode | The metanode to compute a value on.  | 
    | subgraph | The subgraph pointed by the metanode.  | 
    | metaGraph | The graph who owns the meta node.  | 
  
   
 
 
  
  
      
        
          | virtual void tlp::PropertyInterface::computeMetaValue  | 
          ( | 
          edge  | 
          metaEdge,  | 
         
        
           | 
           | 
          tlp::Iterator< edge > *  | 
          it,  | 
         
        
           | 
           | 
          Graph *  | 
          metaGraph  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
pure virtual   | 
  
 
Sets the value of the metaedge to a computed value. 
- Parameters
 - 
  
    | 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.  | 
  
   
 
 
  
  
      
        
          | 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
 - 
  
    | 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.  | 
  
   
- Returns
 - True if the copy was performed, false otherwise. 
 
 
 
  
  
      
        
          | 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
 - 
  
    | 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.  | 
  
   
- Returns
 - True if the copy was performed, false otherwise. 
 
 
 
Copies the values of the passed property to this property. 
- Parameters
 - 
  
    | source | The property from which to copy values.  | 
  
   
 
 
  
  
      
        
          | virtual void tlp::PropertyInterface::erase  | 
          ( | 
          const node  | 
           | ) | 
           | 
         
       
   | 
  
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::BooleanVectorType, tlp::BooleanVectorType, PropertyInterface >, tlp::AbstractProperty< tlp::SizeVectorType, tlp::SizeVectorType, PropertyInterface >, tlp::AbstractProperty< tlp::DoubleVectorType, tlp::DoubleVectorType, PropertyInterface >, tlp::AbstractProperty< tlp::StringVectorType, tlp::StringVectorType, PropertyInterface >, tlp::AbstractProperty< tlp::CoordVectorType, tlp::CoordVectorType, PropertyInterface >, tlp::AbstractProperty< tlp::ColorVectorType, tlp::ColorVectorType, PropertyInterface >, and tlp::AbstractProperty< tlp::BooleanType, tlp::BooleanType >.
 
 
  
  
      
        
          | virtual void tlp::PropertyInterface::erase  | 
          ( | 
          const edge  | 
           | ) | 
           | 
         
       
   | 
  
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::BooleanVectorType, tlp::BooleanVectorType, PropertyInterface >, tlp::AbstractProperty< tlp::SizeVectorType, tlp::SizeVectorType, PropertyInterface >, tlp::AbstractProperty< tlp::DoubleVectorType, tlp::DoubleVectorType, PropertyInterface >, tlp::AbstractProperty< tlp::StringVectorType, tlp::StringVectorType, PropertyInterface >, tlp::AbstractProperty< tlp::CoordVectorType, tlp::CoordVectorType, PropertyInterface >, tlp::AbstractProperty< tlp::ColorVectorType, tlp::ColorVectorType, PropertyInterface >, and tlp::AbstractProperty< tlp::BooleanType, tlp::BooleanType >.
 
 
  
  
      
        
          | virtual DataMem* tlp::PropertyInterface::getEdgeDataMemValue  | 
          ( | 
          const edge  | 
          e | ) | 
           const | 
         
       
   | 
  
pure virtual   | 
  
 
Gets the edge value, contained in a tlp::DataMem structure. 
- Parameters
 - 
  
    | n | The edge to get the value of.  | 
  
   
- Returns
 - The value of the edge, in a tlp::DataMem.
 
- Warning
 - The ownership of this pointer is given to the caller. 
 
 
 
  
  
      
        
          | virtual DataMem* tlp::PropertyInterface::getEdgeDefaultDataMemValue  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
pure virtual   | 
  
 
Gets a pointer to the tlp::DataMem structure that contains the edge default value. 
- Returns
 - The DataMem structure containing the edge default value. 
 
- Warning
 - The ownership of this pointer is given to the caller. 
 
 
 
  
  
      
        
          | virtual std::string tlp::PropertyInterface::getEdgeDefaultStringValue  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
pure virtual   | 
  
 
Gets a string representation of the edge default value. 
- Returns
 - A string representation of the edge default value. 
 
 
 
  
  
      
        
          | virtual std::string tlp::PropertyInterface::getEdgeStringValue  | 
          ( | 
          const edge  | 
          e | ) | 
           const | 
         
       
   | 
  
pure virtual   | 
  
 
Gets a string representation of the edge default value. 
- Parameters
 - 
  
    | e | The edge to get the value of.  | 
  
   
- Returns
 - A string representation of the edge default value. 
 
 
 
  
  
      
        
          | 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 123 of file PropertyInterface.h.
 
 
  
  
      
        
          | virtual DataMem* tlp::PropertyInterface::getNodeDataMemValue  | 
          ( | 
          const node  | 
          n | ) | 
           const | 
         
       
   | 
  
pure virtual   | 
  
 
Gets the node value, contained in a tlp::DataMem structure. 
- Parameters
 - 
  
    | n | The node to get the value of.  | 
  
   
- Returns
 - The value of the node, in a tlp::DataMem.
 
- Warning
 - The ownership of this pointer is given to the caller. 
 
 
 
  
  
      
        
          | virtual DataMem* tlp::PropertyInterface::getNodeDefaultDataMemValue  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
pure virtual   | 
  
 
Gets a pointer to the tlp::DataMem structure that contains the node default value. 
- Returns
 - The DataMem structure containing the node default value. 
 
- Warning
 - The ownership of this pointer is given to the caller. 
 
 
 
  
  
      
        
          | virtual std::string tlp::PropertyInterface::getNodeDefaultStringValue  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
pure virtual   | 
  
 
Gets a string representation of the node default value. 
- Returns
 - A string representation of the node default value. 
 
 
 
  
  
      
        
          | virtual std::string tlp::PropertyInterface::getNodeStringValue  | 
          ( | 
          const node  | 
          n | ) | 
           const | 
         
       
   | 
  
pure virtual   | 
  
 
Gets a string representation of the node default value. 
- Parameters
 - 
  
    | n | The node to get the value of.  | 
  
   
- Returns
 - A string representation of the node default value. 
 
 
 
  
  
      
        
          | virtual DataMem* tlp::PropertyInterface::getNonDefaultDataMemValue  | 
          ( | 
          const node  | 
          n | ) | 
           const | 
         
       
   | 
  
pure virtual   | 
  
 
Returns the value in a DataMem if it is not default, otherwise returns NULL. 
- Parameters
 - 
  
    | n | The node to get the value of.  | 
  
   
- Returns
 - The value of the node if it is not default, or NULL.
 
- Warning
 - The ownership of this pointer is given to the caller. 
 
 
 
  
  
      
        
          | virtual DataMem* tlp::PropertyInterface::getNonDefaultDataMemValue  | 
          ( | 
          const edge  | 
          e | ) | 
           const | 
         
       
   | 
  
pure virtual   | 
  
 
Returns the value in a DataMem if it is not default, otherwise returns NULL. 
- Parameters
 - 
  
    | e | The edge to get the value of.  | 
  
   
- Returns
 - The value of the edge if it is not default, or NULL.
 
- Warning
 - The ownership of this pointer is given to the caller. 
 
 
 
  
  
      
        
          | virtual tlp::Iterator<edge>* tlp::PropertyInterface::getNonDefaultValuatedEdges  | 
          ( | 
          const Graph *  | 
           = NULL | ) | 
           const | 
         
       
   | 
  
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. 
- Returns
 - An Iterator over edges whose value is not default.
 
- Warning
 - The ownership of the iterator is given to the caller. 
 
 
 
  
  
      
        
          | virtual tlp::Iterator<node>* tlp::PropertyInterface::getNonDefaultValuatedNodes  | 
          ( | 
          const Graph *  | 
           = NULL | ) | 
           const | 
         
       
   | 
  
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. 
- Returns
 - An Iterator over nodes whose value is not default.
 
- Warning
 - The ownership of the iterator is given to the caller. 
 
 
 
  
  
      
        
          | 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::BooleanProperty.
 
 
      
        
          | bool tlp::PropertyInterface::rename  | 
          ( | 
          const std::string &  | 
          newName | ) | 
           | 
        
      
 
Rename a property. 
- Parameters
 - 
  
  
 
- Returns
 - returns true if the renaming succeed. It may fails if a property with the given name already exists 
 
 
 
  
  
      
        
          | virtual void tlp::PropertyInterface::setAllEdgeDataMemValue  | 
          ( | 
          const DataMem *  | 
          v | ) | 
           | 
         
       
   | 
  
pure virtual   | 
  
 
Sets all the edges value to the value contained in the given DataMem structure. All previous values are lost. 
- Parameters
 - 
  
    | value | The value to set on all the edges.  | 
  
   
 
 
  
  
      
        
          | virtual bool tlp::PropertyInterface::setAllEdgeStringValue  | 
          ( | 
          const std::string &  | 
          value | ) | 
           | 
         
       
   | 
  
pure virtual   | 
  
 
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. 
- Parameters
 - 
  
    | value | A string describing the new value to set on all the edges.  | 
  
   
- Returns
 - Whether the given string was a correct representation for this property's type. If not, the values are not set. 
 
 
 
  
  
      
        
          | virtual void tlp::PropertyInterface::setAllNodeDataMemValue  | 
          ( | 
          const DataMem *  | 
          value | ) | 
           | 
         
       
   | 
  
pure virtual   | 
  
 
Sets all the nodes value to the value contained in the given DataMem structure. All previous values are lost. 
- Parameters
 - 
  
    | value | The value to set on all the nodes.  | 
  
   
 
 
  
  
      
        
          | virtual bool tlp::PropertyInterface::setAllNodeStringValue  | 
          ( | 
          const std::string &  | 
          value | ) | 
           | 
         
       
   | 
  
pure virtual   | 
  
 
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. 
- Parameters
 - 
  
    | value | A string describing the new value to set on all the nodes.  | 
  
   
- Returns
 - Whether the given string was a correct representation for this property's type. If not, the values are not set. 
 
 
 
  
  
      
        
          | virtual void tlp::PropertyInterface::setEdgeDataMemValue  | 
          ( | 
          const edge  | 
          e,  | 
         
        
           | 
           | 
          const DataMem *  | 
          v  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
pure virtual   | 
  
 
Sets the edge value. 
- Parameters
 - 
  
    | e | The edge to set the value of.  | 
    | value | The value to set to this edge.  | 
  
   
 
 
  
  
      
        
          | virtual bool tlp::PropertyInterface::setEdgeStringValue  | 
          ( | 
          const edge  | 
          e,  | 
         
        
           | 
           | 
          const std::string &  | 
          value  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
pure virtual   | 
  
 
Sets a new value on the edge, described by the string parameter. 
- Parameters
 - 
  
    | e | The edge on which to set value on.  | 
    | value | A string describing the value to set on the edge.  | 
  
   
- Returns
 - Whether the string was a correct representation for this property's type. If not, the value is not set. 
 
 
 
  
  
      
        
          | virtual void tlp::PropertyInterface::setMetaValueCalculator  | 
          ( | 
          MetaValueCalculator *  | 
          calculator | ) | 
           | 
         
       
   | 
  
inlinevirtual   | 
  
 
Sets the Calculator for meta nodes and edges. 
- Parameters
 - 
  
    | calculator | The object containing the logic for computing the meta values for the nodes and edges. | 
  
   
- Warning
 - The ownership of the MetaValueCalculator is not taken by the property. 
 
Definition at line 356 of file PropertyInterface.h.
 
 
  
  
      
        
          | virtual void tlp::PropertyInterface::setNodeDataMemValue  | 
          ( | 
          const node  | 
          n,  | 
         
        
           | 
           | 
          const DataMem *  | 
          value  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
pure virtual   | 
  
 
Sets the node value. 
- Parameters
 - 
  
    | n | The node to set the value of.  | 
    | value | The value to set to this node.  | 
  
   
 
 
  
  
      
        
          | virtual bool tlp::PropertyInterface::setNodeStringValue  | 
          ( | 
          const node  | 
          n,  | 
         
        
           | 
           | 
          const std::string &  | 
          value  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
pure virtual   | 
  
 
Sets a new value on the node, described by the string parameter. 
- Parameters
 - 
  
    | n | The node on which to set the new value.  | 
    | value | A string describing the value to set on the node.  | 
  
   
- Returns
 - Whether the string was a correct representation for this property's type. If not, the value is not set.