Changeset 126 for XMLIO_V2/dev/dev_rv/src/XMLIO/declare_attribut.hpp
- Timestamp:
- 10/07/10 10:29:38 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XMLIO_V2/dev/dev_rv/src/XMLIO/declare_attribut.hpp
r120 r126 6 6 #define Array(x,y) Array<x,y> 7 7 8 #define DECLARE_ATTR(att_name, att_type)\9 class attr_##att_name : public Attribut<att_type> \8 #define DECLARE_ATTR(att_name, att_type) \ 9 class Attr_##att_name : public Attribut<att_type> \ 10 10 { \ 11 11 public: \ 12 virtual string getName(void) const { return #att_name ;} \ 13 virtual const char * getType(void) const { return #att_type ;} \ 14 attr_##att_name(void) : Attribut<att_type>() {} \ 15 attr_##att_name(const att_type& value_) : Attribut<att_type>(value_) {} \ 16 attr_##att_name(const attr_##att_name & att) : Attribut<att_type>(att) {} \ 17 } att_name 12 \ 13 virtual string getName(void) const { return (#att_name) ;} \ 14 virtual const char * getType(void) const { return (#att_type) ;} \ 15 \ 16 Attr_##att_name(void) : Attribut<att_type>() \ 17 { /* Ne rien faire de plus */ } \ 18 Attr_##att_name(const att_type& _value) : Attribut<att_type>(_value) \ 19 { /* Ne rien faire de plus */ } \ 20 Attr_##att_name(const Attr_##att_name & att) : Attribut<att_type>(att) \ 21 { /* Ne rien faire de plus */ } \ 22 \ 23 virtual ~Attr_##att_name() \ 24 { /* Ne rien faire de plus */ } \ 25 }; \ 26 \ 27 const Attr_##att_name& getAttr_##att_name(void) const { return (att_name); } \ 28 const Attr_##att_name& get_##att_name(void) const { return (att_name); } \ 29 \ 30 void setAttr##att_name(const Attr_##att_name& _newattr) { att_name = _newattr; } \ 31 void set_##att_name (const Attr_##att_name& _newattr) { att_name = _newattr; }\ 32 \ 33 void setAttr##att_name(const att_type& _newattr) { att_name.setValue(_newattr); }\ 34 void set_##att_name (const att_type& _newattr) { att_name.setValue(_newattr); }\ 35 Attr_##att_name att_name 18 36 19 37 #endif // __DECLARE_ATTRIBUT__
Note: See TracChangeset
for help on using the changeset viewer.