src/core/value-helper.h
author Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
Thu, 21 Feb 2008 18:44:27 +0100
changeset 2449 30127bc12056
parent 2446 f2a03c7d069c
permissions -rw-r--r--
param-spec-helper.h -> attribute-accessor-helper.h
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2422
6cbcb8fe4551 macro-ify
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     1
#ifndef VALUE_HELPER_H
6cbcb8fe4551 macro-ify
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     2
#define VALUE_HELPER_H
6cbcb8fe4551 macro-ify
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     3
2449
30127bc12056 param-spec-helper.h -> attribute-accessor-helper.h
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2446
diff changeset
     4
#include "attribute-accessor-helper.h"
2446
f2a03c7d069c fix includes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2443
diff changeset
     5
#include <sstream>
f2a03c7d069c fix includes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2443
diff changeset
     6
#include "fatal-error.h"
2422
6cbcb8fe4551 macro-ify
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     7
2439
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
     8
#define ATTRIBUTE_ACCESSOR_DEFINE(type)					\
2437
44e34ffee8e3 Value -> AttributeValue
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2436
diff changeset
     9
  class type##Accessor : public AttributeAccessor {};			\
2436
23415bac7eaf Accessor -> AttributeAccessor
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2435
diff changeset
    10
  template <typename T1>						\
23415bac7eaf Accessor -> AttributeAccessor
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2435
diff changeset
    11
  Ptr<const AttributeAccessor> Make##type##Accessor (T1 a1)		\
23415bac7eaf Accessor -> AttributeAccessor
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2435
diff changeset
    12
  {									\
2439
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    13
    return MakeAccessorHelper<type##Accessor,type##Value> (a1);		\
2436
23415bac7eaf Accessor -> AttributeAccessor
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2435
diff changeset
    14
  }									\
23415bac7eaf Accessor -> AttributeAccessor
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2435
diff changeset
    15
  template <typename T1, typename T2>					\
23415bac7eaf Accessor -> AttributeAccessor
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2435
diff changeset
    16
  Ptr<const AttributeAccessor> Make##type##Accessor (T1 a1, T2 a2)	\
23415bac7eaf Accessor -> AttributeAccessor
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2435
diff changeset
    17
  {									\
2439
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    18
    return MakeAccessorHelper<type##Accessor,type##Value> (a1, a2);	\
2422
6cbcb8fe4551 macro-ify
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    19
  }
6cbcb8fe4551 macro-ify
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    20
2439
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    21
#define ATTRIBUTE_VALUE_DEFINE(type)					\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    22
  class type##Value : public AttributeValue				\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    23
  {									\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    24
  public:								\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    25
    type##Value (const type &value);					\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    26
    void Set (const type &value);					\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    27
    type Get (void) const;						\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    28
    virtual Attribute Copy (void) const;				\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    29
    virtual std::string SerializeToString (Ptr<const AttributeChecker> checker) const; \
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    30
    virtual bool DeserializeFromString (std::string value, Ptr<const AttributeChecker> checker); \
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    31
    type##Value (Attribute value);					\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    32
    operator Attribute () const;					\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    33
  private:								\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    34
    type m_value;							\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    35
  };
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    36
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    37
#define ATTRIBUTE_CONVERTER_DEFINE(type)	\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    38
  type (Attribute value);			\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    39
  operator Attribute () const;
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    40
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    41
#define ATTRIBUTE_CHECKER_DEFINE(type)				\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    42
  Ptr<const AttributeChecker> Make##type##Checker (void);	\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    43
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    44
#define ATTRIBUTE_VALUE_IMPLEMENT(type)					\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    45
  type##Value::type##Value (const type &value)				\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    46
  : m_value (value) {}							\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    47
  void type##Value::Set (const type &v) {				\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    48
    m_value = v;							\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    49
  }									\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    50
  type type##Value::Get (void) const {					\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    51
    return m_value;							\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    52
  }									\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    53
  Attribute								\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    54
  type##Value::Copy (void) const {					\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    55
    return Attribute::Create<type##Value> (*this);			\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    56
  }									\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    57
  std::string								\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    58
  type##Value::SerializeToString (Ptr<const AttributeChecker> checker) const { \
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    59
    std::ostringstream oss;						\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    60
    oss << m_value;							\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    61
    return oss.str ();							\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    62
  }									\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    63
  bool									\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    64
  type##Value::DeserializeFromString (std::string value, Ptr<const AttributeChecker> checker) { \
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    65
    std::istringstream iss;						\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    66
    iss.str (value);							\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    67
    iss >> m_value;							\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    68
    return !iss.bad () && !iss.fail ();					\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    69
  }									\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    70
  type##Value::type##Value (Attribute value)				\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    71
  {									\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    72
    type##Value *v = value.DynCast<type##Value *> ();			\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    73
    if (v == 0)								\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    74
      {									\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    75
	NS_FATAL_ERROR ("Unexpected type of value. Expected \"" << #type << "Value\""); \
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    76
      }									\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    77
    m_value = v->Get ();						\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    78
  }									\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    79
  type##Value::operator Attribute () const				\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    80
  {									\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    81
    return Attribute::Create<type##Value> (*this);			\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    82
  }
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    83
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    84
#define ATTRIBUTE_CHECKER_IMPLEMENT(type)				\
2436
23415bac7eaf Accessor -> AttributeAccessor
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2435
diff changeset
    85
  Ptr<const AttributeChecker> Make##type##Checker (void)		\
2427
9245ec163111 split checker from ParamSpec.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2424
diff changeset
    86
  {									\
2443
10d1420573df indent align
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2442
diff changeset
    87
    return MakeSimpleAttributeChecker<type##Value> ();			\
2427
9245ec163111 split checker from ParamSpec.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2424
diff changeset
    88
  }									\
2439
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    89
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    90
#define ATTRIBUTE_CONVERTER_IMPLEMENT(type)				\
2433
3a98e1db7f80 PValue -> Attribute
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2427
diff changeset
    91
  type::type (Attribute value)						\
2422
6cbcb8fe4551 macro-ify
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    92
  {									\
2439
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    93
    const type##Value *v = value.DynCast<const type##Value *> ();	\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    94
    if (v == 0)								\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    95
      {									\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    96
      NS_FATAL_ERROR ("Unexpected type of value. Expected \"" << #type << "Value\""); \
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    97
      }									\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
    98
    *this = v->Get ();							\
2422
6cbcb8fe4551 macro-ify
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    99
  }									\
2433
3a98e1db7f80 PValue -> Attribute
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2427
diff changeset
   100
  type::operator Attribute () const					\
2422
6cbcb8fe4551 macro-ify
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   101
  {									\
2439
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
   102
    return Attribute::Create<type##Value> (*this);			\
2422
6cbcb8fe4551 macro-ify
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   103
  }
6cbcb8fe4551 macro-ify
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   104
2439
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
   105
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
   106
#define VALUE_HELPER_HEADER_1(type) \
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
   107
  ATTRIBUTE_CONVERTER_DEFINE (type)
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
   108
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
   109
#define VALUE_HELPER_HEADER_2(type)					\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
   110
  ATTRIBUTE_VALUE_DEFINE (type);					\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
   111
  ATTRIBUTE_ACCESSOR_DEFINE (type);					\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
   112
  ATTRIBUTE_CHECKER_DEFINE (type);
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
   113
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
   114
#define VALUE_HELPER_CPP(type)						\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
   115
  ATTRIBUTE_CHECKER_IMPLEMENT (type);					\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
   116
  ATTRIBUTE_CONVERTER_IMPLEMENT (type);					\
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
   117
  ATTRIBUTE_VALUE_IMPLEMENT (type);
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
   118
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
   119
4a0b22a3f5fa UintValue -> Uinteger, IntValue -> Integer
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2437
diff changeset
   120
2422
6cbcb8fe4551 macro-ify
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   121
#endif /* VALUE_HELPER_H */