23 #include <tulip/PropertyTypes.h>
24 #include <tulip/AbstractProperty.h>
25 #include <tulip/minmaxproperty.h>
26 #include <tulip/NumericProperty.h>
31 class PropertyContext;
33 typedef MinMaxProperty<tlp::IntegerType, tlp::IntegerType, tlp::NumericProperty>
34 IntegerMinMaxProperty;
46 static const std::string propertyTypename;
48 return propertyTypename;
50 DEFINE_GET_CPP_CLASS_NAME;
51 void setNodeValue(
const node n, tlp::StoredType<int>::ReturnedConstValue v)
override;
52 void setEdgeValue(
const edge e, tlp::StoredType<int>::ReturnedConstValue v)
override;
53 void setAllNodeValue(tlp::StoredType<int>::ReturnedConstValue v)
override;
55 void setValueToGraphNodes(tlp::StoredType<int>::ReturnedConstValue v,
56 const Graph *graph)
override;
57 void setAllEdgeValue(tlp::StoredType<int>::ReturnedConstValue v)
override;
58 void setValueToGraphEdges(tlp::StoredType<int>::ReturnedConstValue v,
59 const Graph *graph)
override;
61 int compare(
const node n1,
const node n2)
const override;
62 int compare(
const edge e1,
const edge e2)
const override;
65 double getNodeDoubleValue(
const node n)
const override {
66 return getNodeValue(n);
68 double getNodeDoubleDefaultValue()
const override {
69 return getNodeDefaultValue();
71 double getNodeDoubleMin(
const Graph *g =
nullptr)
override {
74 double getNodeDoubleMax(
const Graph *g =
nullptr)
override {
77 double getEdgeDoubleValue(
const edge e)
const override {
78 return getEdgeValue(e);
80 double getEdgeDoubleDefaultValue()
const override {
81 return getEdgeDefaultValue();
83 double getEdgeDoubleMin(
const Graph *g =
nullptr)
override {
86 double getEdgeDoubleMax(
const Graph *g =
nullptr)
override {
90 void nodesUniformQuantification(
unsigned int)
override;
92 void edgesUniformQuantification(
unsigned int)
override;
94 NumericProperty *copyProperty(Graph *g)
override {
95 IntegerProperty *newProp =
new IntegerProperty(g);
103 AbstractProperty<tlp::IntegerType, tlp::IntegerType, tlp::NumericProperty> &)
override;
107 void treatEvent(
const Event &)
override;
115 :
public AbstractVectorProperty<tlp::IntegerVectorType, tlp::IntegerType> {
118 : AbstractVectorProperty<IntegerVectorType, tlp::IntegerType>(g, n) {}
121 static const std::string propertyTypename;
123 return propertyTypename;
125 DEFINE_GET_CPP_CLASS_NAME;