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 getNodeDoubleDefaultValue()
 const {
 
   66     return (
double) getNodeDefaultValue();
 
   68   virtual double getNodeDoubleMin(Graph* g = NULL) {
 
   69     return (
double) getNodeMin(g);
 
   71   virtual double getNodeDoubleMax(Graph* g = NULL) {
 
   72     return (
double) getNodeMax(g);
 
   74   virtual double getEdgeDoubleValue(
const edge e)
 const {
 
   75     return (
double) getEdgeValue(e);
 
   77   virtual double getEdgeDoubleDefaultValue()
 const {
 
   78     return (
double) getEdgeDefaultValue();
 
   80   virtual double getEdgeDoubleMin(Graph* g = NULL) {
 
   81     return (
double) getEdgeMin(g);
 
   83   virtual double getEdgeDoubleMax(Graph* g = NULL) {
 
   84     return (
double) getEdgeMax(g);
 
   87   void nodesUniformQuantification(
unsigned int);
 
   89   void edgesUniformQuantification(
unsigned int);
 
   91   NumericProperty* copyProperty(Graph *g) {
 
   92     IntegerProperty* newProp = 
new IntegerProperty(g);
 
   99   virtual void clone_handler(AbstractProperty<tlp::IntegerType, tlp::IntegerType, tlp::NumericProperty> &);
 
  103   void treatEvent(
const Event&);
 
  110 class TLP_SCOPE IntegerVectorProperty:
public AbstractVectorProperty<tlp::IntegerVectorType, tlp::IntegerType> {
 
  112   IntegerVectorProperty(Graph *g, std::string n =
""):AbstractVectorProperty<IntegerVectorType, tlp::IntegerType>(g, n) {}
 
  114   PropertyInterface* clonePrototype(Graph *, 
const std::string& );
 
  115   static const std::string propertyTypename;
 
  116   std::string getTypename()
 const {
 
  117     return propertyTypename;