Changeset 108 for XMLIO_V2/dev/dev_rv/src/XMLIO/base_attribut.hpp
- Timestamp:
- 06/18/10 14:33:19 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XMLIO_V2/dev/dev_rv/src/XMLIO/base_attribut.hpp
r104 r108 13 13 { 14 14 public: 15 16 virtual const char * getName(void) const = 0 ;15 16 virtual string getName(void) const = 0 ; 17 17 virtual ostream & print(ostream& o) const = 0 ; 18 18 19 19 friend ostream& operator <<(ostream& o,const BaseAttribut& Attr) 20 20 {return Attr.print(o) ; } 21 21 22 22 virtual void assignValue(const BaseAttribut*) = 0; 23 24 virtual const char * getId(void){return getName();} ;23 24 virtual string getId(void) const {return getName();} ; 25 25 bool hasId(void){return (true);} 26 26 27 27 virtual void setFromString(const std::string str) = 0; 28 28 29 29 #define SETTER_AND_GETTER(TYPE) \ 30 30 virtual void setValue(const TYPE & value) { error_set() ; }\ … … 36 36 virtual void getValue(Array<TYPE,2>& value) const { error_get() ; }\ 37 37 virtual void getValue(Array<TYPE,3>& value) const { error_get() ; } 38 38 39 39 SETTER_AND_GETTER(int) 40 40 SETTER_AND_GETTER(bool) … … 42 42 SETTER_AND_GETTER(char) 43 43 SETTER_AND_GETTER(string) 44 44 45 45 #undef SETTER_AND_GETTER 46 46 47 48 virtual bool _hasValue() = 0;47 48 virtual bool _hasValue() const = 0; 49 49 50 50 static void error_set(void) … … 53 53 static void error_get(void) 54 54 { throw XMLIOIncompatibleTypeException("BaseAttribut::set<type> >Getting value type is incompatible with attribut type"); } 55 55 56 56 }; //class BaseAttribut 57 57 } // namespace XMLIOSERVER 58 58 59 59 #endif //__BASE_ATTRIBUT__ 60 60
Note: See TracChangeset
for help on using the changeset viewer.