source: XIOS/trunk/src/declare_group.hpp @ 895

Last change on this file since 895 was 591, checked in by rlacroix, 9 years ago

Remove leftovers from the XMLIO age.

  • Property copyright set to
    Software name : XIOS (Xml I/O Server)
    http://forge.ipsl.jussieu.fr/ioserver
    Creation date : January 2009
    Licence : CeCCIL version2
    see license file in root directory : Licence_CeCILL_V2-en.txt
    or http://www.cecill.info/licences/Licence_CeCILL_V2-en.html
    Holder : CEA/LSCE (Laboratoire des Sciences du CLimat et de l'Environnement)
    CNRS/IPSL (Institut Pierre Simon Laplace)
    Project Manager : Yann Meurdesoif
    yann.meurdesoif@cea.fr
File size: 3.7 KB
Line 
1#ifndef __XIOS_DECLARE_GROUP__
2#define __XIOS_DECLARE_GROUP__
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
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
57
58#endif // __XIOS_DECLARE_GROUP__
Note: See TracBrowser for help on using the repository browser.