20 #ifndef TULIP_METAGRAPH_H 
   21 #define TULIP_METAGRAPH_H 
   25 #include <tulip/PropertyTypes.h> 
   26 #include <tulip/AbstractProperty.h> 
   30 class PropertyContext;
 
   33 typedef AbstractProperty<tlp::GraphType, tlp::EdgeSetType> AbstractGraphProperty;
 
   43   friend class GraphAbstract;
 
   48   using AbstractGraphProperty::operator=;
 
   60   static const std::string propertyTypename;
 
   62     return propertyTypename;
 
   64   DEFINE_GET_CPP_CLASS_NAME;
 
   67   void setNodeValue(
const node n,
 
   68                     tlp::StoredType<GraphType::RealType>::ReturnedConstValue g) 
override;
 
   69   void setAllNodeValue(tlp::StoredType<GraphType::RealType>::ReturnedConstValue g) 
override;
 
   70   void setValueToGraphNodes(tlp::StoredType<GraphType::RealType>::ReturnedConstValue g,
 
   71                             const Graph *graph) 
override;
 
   77     return sizeof(
unsigned int);
 
   84   bool hasNonDefaultValue(
const node n)
 const {
 
   85     return nodeProperties.hasNonDefaultValue(n.
id);
 
   87   bool hasNonDefaultValue(
const edge e)
 const {
 
   88     return !edgeProperties.get(e.id).empty();
 
   92   MutableContainer<std::set<node>> referencedGraph;
 
   93   const std::set<edge> &getReferencedEdges(
const edge) 
const;
 
This class extends upon PropertyInterface, and adds type-safe methods to get and set the node and edg...
 
Event is the base class for all events used in the Observation mechanism.
 
A graph property that maps a tlp::Graph* value to graph elements.
 
unsigned int edgeValueSize() const override
Returns the size in bytes of an edge's value.
 
bool setAllEdgeStringValue(const std::string &v) override
Sets all the edges value to the value represented by the string. For some types, some parsing will be...
 
bool setAllNodeStringValue(const std::string &v) override
Sets all the nodes value to the value represented by the string. For some types, some parsing will be...
 
void treatEvent(const Event &) override
This function is called when events are sent to the Listeners, and Listeners only.
 
bool setEdgeStringValue(const edge e, const std::string &v) override
Sets a new value on the edge, represented by the string parameter.
 
bool setStringValueToGraphNodes(const std::string &v, const tlp::Graph *graph) override
Sets all the nodes value to the value represented by the string for a graph. For some types,...
 
unsigned int nodeValueSize() const override
Returns the size in bytes of a node's value.
 
bool readNodeDefaultValue(std::istream &iss) override
Reads the nodes default value.
 
bool setNodeStringValue(const node n, const std::string &v) override
Sets a new value on the node, represented by the string parameter.
 
const std::string & getTypename() const override
Gets a string describing the type of the property value (e.g. "graph", "double", "layout",...
 
bool setStringValueToGraphEdges(const std::string &v, const tlp::Graph *graph) override
Sets all the edges value to the value represented by the string for a graph. For some types,...
 
bool readNodeValue(std::istream &iss, node n) override
Reads the value of a node.
 
PropertyInterface * clonePrototype(Graph *, const std::string &) const override
Creates a property of the same type (e.g. tlp::DoubleProperty) in the graph. The new property will no...
 
PropertyInterface describes the interface of a graph property.
 
The edge struct represents an edge in a Graph object.
 
The node struct represents a node in a Graph object.
 
unsigned int id
id The identifier of the node.