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;
49 void treatEvent(
const Event &)
override;
53 bool setNodeStringValue(
const node n,
const std::string &v)
override;
54 bool setAllNodeStringValue(
const std::string &v)
override;
55 bool setStringValueToGraphNodes(
const std::string &v,
const tlp::Graph *graph)
override;
56 bool setEdgeStringValue(
const edge e,
const std::string &v)
override;
57 bool setAllEdgeStringValue(
const std::string &v)
override;
58 bool setStringValueToGraphEdges(
const std::string &v,
const tlp::Graph *graph)
override;
59 static const std::string propertyTypename;
60 const std::string &getTypename()
const override {
61 return propertyTypename;
65 void setNodeValue(
const node n,
66 tlp::StoredType<GraphType::RealType>::ReturnedConstValue g)
override;
67 void setAllNodeValue(tlp::StoredType<GraphType::RealType>::ReturnedConstValue g)
override;
68 void setValueToGraphNodes(tlp::StoredType<GraphType::RealType>::ReturnedConstValue g,
69 const Graph *graph)
override;
70 bool readNodeDefaultValue(std::istream &iss)
override;
71 bool readNodeValue(std::istream &iss,
node n)
override;
74 unsigned int nodeValueSize()
const override {
75 return sizeof(
unsigned int);
77 unsigned int edgeValueSize()
const override {
82 bool hasNonDefaultValue(
const node n)
const {
83 return nodeProperties.hasNonDefaultValue(n.
id);
85 bool hasNonDefaultValue(
const edge e)
const {
86 return !edgeProperties.get(e.
id).empty();
90 MutableContainer<std::set<node>> referencedGraph;
91 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.