source: XMLIO_V2/dev/dev_rv/src/XMLIO/declare_group.hpp @ 126

Last change on this file since 126 was 126, checked in by hozdoba, 14 years ago

Amélioration de quelques portions de code.
Ajout de contructeurs par copie.

File size: 1.8 KB
Line 
1#ifndef __DECLARE_GROUP__
2#define __DECLARE_GROUP__
3
4#define DECLARE_GROUP(child_type)                                          \
5   namespace XMLIOSERVER                                                   \
6   {                                                                       \
7      class child_type##Group                                              \
8         : public GroupTemplate<C##child_type, child_type##Attribut>       \
9      {                                                                    \
10         public:                                                           \
11                                                                           \
12            child_type##Group(void)                                        \
13               : GroupTemplate<C##child_type, child_type##Attribut>()      \
14            { /* Ne rien faire de plus */ }                                \
15                                                                           \
16            child_type##Group(const string& _id)                           \
17               : GroupTemplate<C##child_type, child_type##Attribut>(_id)   \
18            { /* Ne rien faire de plus */ }                                \
19                                                                           \
20            void parse (XMLNode& _node, bool _withAttr = true)             \
21            { _parse<child_type##Group>(_node, _withAttr); }               \
22                                                                           \
23            virtual ~child_type##Group(void){}                             \
24      };                                                                   \
25                                                                           \
26      typedef child_type##Group child_type##Definition;                    \
27   }
28
29#endif // __DECLARE_GROUP__
Note: See TracBrowser for help on using the repository browser.