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 { \ |