[219] | 1 | #ifndef __XMLIO_DECLARE_ATTRIBUTE__ |
---|
| 2 | #define __XMLIO_DECLARE_ATTRIBUTE__ |
---|
| 3 | |
---|
| 4 | /// ///////////////////////////// Macros ///////////////////////////// /// |
---|
| 5 | |
---|
| 6 | #define DECLARE_ATTRIBUTE(type, name) \ |
---|
| 7 | class name##att : public CAttributeTemplate<type>{ \ |
---|
| 8 | public : \ |
---|
| 9 | name##att(void) \ |
---|
| 10 | : CAttributeTemplate<type> \ |
---|
| 11 | (#name, *CAttributeMap::Current) \ |
---|
| 12 | { /* Ne rien faire de plus */ } \ |
---|
| 13 | type operator=(const type & value) \ |
---|
| 14 | { return (CAttributeTemplate<type>::operator=(value)); } \ |
---|
| 15 | virtual ~name##att(void) \ |
---|
| 16 | { /* Ne rien faire de plus */ } \ |
---|
| 17 | } name; |
---|
| 18 | |
---|
| 19 | #define DECLARE_ATTRIBUTE_DEF(type, name, def) \ |
---|
| 20 | class name##att : public CAttributeTemplate<type>{ \ |
---|
| 21 | public : \ |
---|
| 22 | name##att(void) \ |
---|
| 23 | : CAttributeTemplate<type> \ |
---|
| 24 | (#name, def, *CAttributeMap::Current) \ |
---|
| 25 | { /* Ne rien faire de plus */ } \ |
---|
| 26 | type operator=(const type & value) \ |
---|
| 27 | { return (CAttributeTemplate<type>::operator=(value)); } \ |
---|
| 28 | virtual ~name##att(void) \ |
---|
| 29 | { /* Ne rien faire de plus */ } \ |
---|
| 30 | } name; |
---|
| 31 | |
---|
| 32 | #define BEGIN_DECLARE_ATTRIBUTE_MAP(type) \ |
---|
| 33 | class type##Attributes : public virtual CAttributeMap { \ |
---|
| 34 | public : |
---|
| 35 | |
---|
| 36 | #define END_DECLARE_ATTRIBUTE_MAP(type) \ |
---|
| 37 | type##Attributes (void) : CAttributeMap() \ |
---|
| 38 | { /* Ne rien faire de plus */ } \ |
---|
| 39 | virtual ~type##Attributes (void) \ |
---|
| 40 | { /* Ne rien faire de plus */ } \ |
---|
| 41 | }; |
---|
| 42 | |
---|
| 43 | #endif // __XMLIO_DECLARE_ATTRIBUTE__ |
---|