[591] | 1 | #ifndef __XIOS_DECLARE_GROUP__ |
---|
| 2 | #define __XIOS_DECLARE_GROUP__ |
---|
[219] | 3 | |
---|
| 4 | /// ///////////////////////////// Macros ///////////////////////////// /// |
---|
| 5 | |
---|
| 6 | #define DECLARE_GROUP(type) \ |
---|
| 7 | class type##Group \ |
---|
| 8 | : public CGroupTemplate<type, type##Group, type##Attributes> \ |
---|
| 9 | { \ |
---|
| 10 | public: \ |
---|
| 11 | typedef type RelChild; \ |
---|
| 12 | typedef type##Group RelGroup; \ |
---|
| 13 | typedef type##Attributes RelAttributes; \ |
---|
| 14 | \ |
---|
| 15 | type##Group(void) \ |
---|
| 16 | : CGroupTemplate<RelChild, RelGroup, RelAttributes> () \ |
---|
| 17 | { /* Ne rien faire de plus */ } \ |
---|
| 18 | type##Group(const StdString& _id) \ |
---|
| 19 | : CGroupTemplate<RelChild, RelGroup, RelAttributes> (_id) \ |
---|
| 20 | { /* Ne rien faire de plus */ } \ |
---|
| 21 | \ |
---|
| 22 | static ENodeType GetType(void) \ |
---|
| 23 | { return static_cast<ENodeType>(RelChild::GetType()+1); } \ |
---|
| 24 | \ |
---|
| 25 | virtual ~type##Group(void) \ |
---|
| 26 | { /* Ne rien faire de plus */ } \ |
---|
| 27 | }; \ |
---|
| 28 | typedef type##Group type##Definition |
---|
[274] | 29 | |
---|
| 30 | #define DECLARE_GROUP_PARSE_REDEF(type) \ |
---|
| 31 | class type##Group \ |
---|
| 32 | : public CGroupTemplate<type, type##Group, type##Attributes> \ |
---|
| 33 | { \ |
---|
| 34 | public: \ |
---|
| 35 | typedef type RelChild; \ |
---|
| 36 | typedef type##Group RelGroup; \ |
---|
| 37 | typedef type##Attributes RelAttributes; \ |
---|
| 38 | typedef CGroupTemplate<type, type##Group, type##Attributes> \ |
---|
| 39 | SuperClass; \ |
---|
| 40 | \ |
---|
| 41 | type##Group(void) \ |
---|
| 42 | : CGroupTemplate<RelChild, RelGroup, RelAttributes> () \ |
---|
| 43 | { /* Ne rien faire de plus */ } \ |
---|
| 44 | type##Group(const StdString& _id) \ |
---|
| 45 | : CGroupTemplate<RelChild, RelGroup, RelAttributes> (_id) \ |
---|
| 46 | { /* Ne rien faire de plus */ } \ |
---|
| 47 | \ |
---|
| 48 | static ENodeType GetType(void) \ |
---|
| 49 | { return static_cast<ENodeType>(RelChild::GetType()+1); } \ |
---|
| 50 | \ |
---|
| 51 | virtual void parse(xml::CXMLNode & node, bool withAttr = true); \ |
---|
| 52 | \ |
---|
| 53 | virtual ~type##Group(void) \ |
---|
| 54 | { /* Ne rien faire de plus */ } \ |
---|
| 55 | }; \ |
---|
| 56 | typedef type##Group type##Definition |
---|
[219] | 57 | |
---|
[591] | 58 | #endif // __XIOS_DECLARE_GROUP__ |
---|