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;
42 friend class GraphAbstract;
48 void treatEvent(
const Event&);
52 bool setNodeStringValue(
const node n,
const std::string & v);
53 bool setAllNodeStringValue(
const std::string & v);
54 bool setStringValueToGraphNodes(
const std::string & v,
const tlp::Graph *graph);
55 bool setEdgeStringValue(
const edge e,
const std::string & v);
56 bool setAllEdgeStringValue(
const std::string & v);
57 bool setStringValueToGraphEdges(
const std::string & v,
const tlp::Graph *graph);
58 static const std::string propertyTypename;
59 const std::string& getTypename()
const {
60 return propertyTypename;
65 virtual void setNodeValue(
const node n, tlp::StoredType<GraphType::RealType>::ReturnedConstValue g);
66 virtual void setAllNodeValue(tlp::StoredType<GraphType::RealType>::ReturnedConstValue g);
67 virtual void setValueToGraphNodes(tlp::StoredType<GraphType::RealType>::ReturnedConstValue g,
const Graph *graph);
68 virtual bool readNodeDefaultValue(std::istream& iss);
69 virtual bool readNodeValue(std::istream& iss,
node n);
72 virtual unsigned int nodeValueSize()
const {
73 return sizeof(
unsigned int);
75 virtual unsigned int edgeValueSize()
const {
80 bool hasNonDefaultValue(
const node n)
const {
81 return nodeProperties.hasNonDefaultValue(n.
id);
83 bool hasNonDefaultValue(
const edge e)
const {
84 return !edgeProperties.get(e.
id).empty();
88 MutableContainer<std::set<node> > referencedGraph;
89 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.