24 #include <tulip/tuliphash.h>
25 #include <tulip/PropertyTypes.h>
26 #include <tulip/AbstractProperty.h>
27 #include <tulip/PropertyAlgorithm.h>
28 #include <tulip/Observable.h>
29 #include <tulip/minmaxproperty.h>
30 #include <tulip/NumericProperty.h>
35 class PropertyContext;
37 typedef MinMaxProperty<tlp::IntegerType, tlp::IntegerType, tlp::NumericProperty> IntegerMinMaxProperty;
43 class TLP_SCOPE IntegerProperty :
public IntegerMinMaxProperty {
46 IntegerProperty(Graph *, std::string n =
"");
48 PropertyInterface* clonePrototype(Graph *,
const std::string& );
49 static const std::string propertyTypename;
50 std::string getTypename()
const {
51 return propertyTypename;
53 virtual void setNodeValue(
const node n,
const int &v);
54 virtual void setEdgeValue(
const edge e,
const int &v);
55 virtual void setAllNodeValue(
const int &v);
56 virtual void setAllEdgeValue(
const int &v);
58 int compare(
const node n1,
const node n2)
const;
59 int compare(
const edge e1,
const edge e2)
const;
62 virtual double getNodeDoubleValue(
const node n )
const {
63 return (
double) getNodeValue(n);
65 virtual double getNodeDoubleMin(Graph* g = NULL) {
66 return (
double) getNodeMin(g);
68 virtual double getNodeDoubleMax(Graph* g = NULL) {
69 return (
double) getNodeMax(g);
71 virtual double getEdgeDoubleValue(
const edge e)
const {
72 return (
double) getEdgeValue(e);
74 virtual double getEdgeDoubleMin(Graph* g = NULL) {
75 return (
double) getEdgeMin(g);
77 virtual double getEdgeDoubleMax(Graph* g = NULL) {
78 return (
double) getEdgeMax(g);
81 void nodesUniformQuantification(
unsigned int);
83 void edgesUniformQuantification(
unsigned int);
85 NumericProperty* copyProperty(Graph *g) {
86 IntegerProperty* newProp =
new IntegerProperty(g);
93 virtual void clone_handler(AbstractProperty<tlp::IntegerType, tlp::IntegerType, tlp::NumericProperty> &);
97 void treatEvent(
const Event&);
104 class TLP_SCOPE IntegerVectorProperty:
public AbstractVectorProperty<tlp::IntegerVectorType, tlp::IntegerType> {
106 IntegerVectorProperty(Graph *g, std::string n =
""):AbstractVectorProperty<IntegerVectorType, tlp::IntegerType>(g, n) {}
108 PropertyInterface* clonePrototype(Graph *,
const std::string& );
109 static const std::string propertyTypename;
110 std::string getTypename()
const {
111 return propertyTypename;