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;
61 return propertyTypename;
63 DEFINE_GET_CPP_CLASS_NAME;
66 void setNodeValue(
const node n,
67 tlp::StoredType<GraphType::RealType>::ReturnedConstValue g)
override;
68 void setAllNodeValue(tlp::StoredType<GraphType::RealType>::ReturnedConstValue g)
override;
69 void setValueToGraphNodes(tlp::StoredType<GraphType::RealType>::ReturnedConstValue g,
70 const Graph *graph)
override;
71 bool readNodeDefaultValue(std::istream &iss)
override;
72 bool readNodeValue(std::istream &iss,
node n)
override;
76 return sizeof(
unsigned int);
83 bool hasNonDefaultValue(
const node n)
const {
84 return nodeProperties.hasNonDefaultValue(n.
id);
86 bool hasNonDefaultValue(
const edge e)
const {
87 return !edgeProperties.get(e.id).empty();
91 MutableContainer<std::set<node>> referencedGraph;
92 const std::set<edge> &getReferencedEdges(
const edge)
const;