source: XMLIO_V2/dev/trunk/src/XMLIO/declare_attribut.hpp @ 98

Last change on this file since 98 was 98, checked in by ymipsl, 14 years ago
File size: 784 bytes
Line 
1#ifndef __DECLARE_ATTRIBUT__
2#define __DECLARE_ATTRIBUT__
3
4#include "attribut.hpp"
5
6#define DECLARE_ATTR(att_name,att_type)               \
7   class attr_##att_name : public Attribut<att_type>  \
8   {                                                  \
9      public:                                         \
10         const char * getName(void) const { return #att_name ;}                     \
11         virtual const char * getType(void) const { return #att_type ;}             \
12         attr_##att_name(void) : Attribut<att_type>() {}                            \
13         attr_##att_name(const att_type& value_) : Attribut<att_type>(value_) {}    \
14         attr_##att_name(const attr_##att_name & att) : Attribut<att_type>(att) {}  \
15   } att_name
16
17#endif // __DECLARE_ATTRIBUT__
Note: See TracBrowser for help on using the repository browser.