Ignore:
Timestamp:
10/07/10 10:29:38 (14 years ago)
Author:
hozdoba
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XMLIO_V2/dev/dev_rv/src/XMLIO/declare_attribut.hpp

    r120 r126  
    66#define Array(x,y) Array<x,y> 
    77 
    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>  \ 
    1010   {                                                  \ 
    1111      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 
    1836 
    1937#endif // __DECLARE_ATTRIBUT__ 
Note: See TracChangeset for help on using the changeset viewer.