20 #ifndef TULIP_METAGRAPH_H 21 #define TULIP_METAGRAPH_H 23 #include <tulip/PropertyTypes.h> 24 #include <tulip/AbstractProperty.h> 28 class PropertyContext;
31 typedef AbstractProperty<tlp::GraphType, tlp::EdgeSetType> AbstractGraphProperty;
40 friend class GraphAbstract;
46 void treatEvent(
const Event&);
50 bool setNodeStringValue(
const node n,
const std::string & v);
51 bool setAllNodeStringValue(
const std::string & v,
tlp::Graph *graph = NULL);
52 bool setEdgeStringValue(
const edge e,
const std::string & v);
53 bool setAllEdgeStringValue(
const std::string & v,
tlp::Graph *graph = NULL);
54 static const std::string propertyTypename;
55 const std::string& getTypename()
const {
56 return propertyTypename;
61 virtual void setNodeValue(
const node n,
const GraphType::RealType& g);
62 virtual void setAllNodeValue(
const GraphType::RealType& g,
Graph *graph = NULL);
63 virtual bool readNodeDefaultValue(std::istream& iss);
64 virtual bool readNodeValue(std::istream& iss,
node n);
67 virtual unsigned int nodeValueSize()
const {
68 return sizeof(
unsigned int);
70 virtual unsigned int edgeValueSize()
const {
75 bool hasNonDefaultValue(
const node n)
const {
76 return nodeProperties.hasNonDefaultValue(n.
id);
78 bool hasNonDefaultValue(
const edge e)
const {
79 return !edgeProperties.get(e.
id).empty();
83 MutableContainer<std::set<node> > referencedGraph;
84 const std::set<edge>& getReferencedEdges(
const edge)
const;
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.
A graph property that maps a tlp::Graph* value to graph elements.
Event is the base class for all events used in the Observation mechanism.
unsigned int id
id The identifier of the node.
unsigned int id
id The identifier of the edge.