src/core/attribute-helper.h
changeset 2461 a48106d6f3b4
parent 2451 8979f07befd5
child 2473 24e929fe7d4c
equal deleted inserted replaced
2460:7f5679184b79 2461:a48106d6f3b4
     4 #include "attribute-accessor-helper.h"
     4 #include "attribute-accessor-helper.h"
     5 #include <sstream>
     5 #include <sstream>
     6 #include "fatal-error.h"
     6 #include "fatal-error.h"
     7 
     7 
     8 #define ATTRIBUTE_ACCESSOR_DEFINE(type)					\
     8 #define ATTRIBUTE_ACCESSOR_DEFINE(type)					\
     9   class type##Accessor : public AttributeAccessor {};			\
       
    10   template <typename T1>						\
     9   template <typename T1>						\
    11   Ptr<const AttributeAccessor> Make##type##Accessor (T1 a1)		\
    10   Ptr<const AttributeAccessor> Make##type##Accessor (T1 a1)		\
    12   {									\
    11   {									\
    13     return MakeAccessorHelper<type##Accessor,type##Value> (a1);		\
    12     return MakeAccessorHelper<type##Value> (a1);		\
    14   }									\
    13   }									\
    15   template <typename T1, typename T2>					\
    14   template <typename T1, typename T2>					\
    16   Ptr<const AttributeAccessor> Make##type##Accessor (T1 a1, T2 a2)	\
    15   Ptr<const AttributeAccessor> Make##type##Accessor (T1 a1, T2 a2)	\
    17   {									\
    16   {									\
    18     return MakeAccessorHelper<type##Accessor,type##Value> (a1, a2);	\
    17     return MakeAccessorHelper<type##Value> (a1, a2);	\
    19   }
    18   }
    20 
    19 
    21 #define ATTRIBUTE_VALUE_DEFINE(type)					\
    20 #define ATTRIBUTE_VALUE_DEFINE(type)					\
    22   class type##Value : public AttributeValue				\
    21   class type##Value : public AttributeValue				\
    23   {									\
    22   {									\