Changeset 369 for XIOS/trunk/src/attribute_template.hpp
- Timestamp:
- 10/16/12 13:04:44 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/attribute_template.hpp
r354 r369 8 8 #include "xmlioserver_spl.hpp" 9 9 #include "exception.hpp" 10 #include "array.hpp"11 10 #include "attribute.hpp" 12 11 #include "buffer_in.hpp" 13 12 #include "buffer_out.hpp" 13 #include "type.hpp" 14 14 15 15 … … 18 18 /// ////////////////////// Déclarations ////////////////////// /// 19 19 template <class T> 20 class CAttributeTemplate : public CAttribute 20 class CAttributeTemplate : public CAttribute, public CType<T> 21 21 { 22 22 typedef CAttribute SuperClass; … … 34 34 CAttributeTemplate(const StdString & id, const ValueType & value, 35 35 xios_map<StdString, CAttribute*> & umap); 36 CAttributeTemplate(const CAttribute & attribut) throw (CException);37 CAttributeTemplate(const CAttribute * const attribut); // Not implemented.36 // CAttributeTemplate(const CAttribute & attribut) throw (CException); 37 // CAttributeTemplate(const CAttribute * const attribut); // Not implemented. 38 38 39 39 public : … … 41 41 /// Accesseur /// 42 42 ValueType getValue(void) const; 43 ValueType* getRef(void) ;43 // ValueType* getRef(void) ; 44 44 45 45 /// Mutateurs /// 46 46 void setValue(const ValueType & value); 47 47 48 void set(const CAttribute& attr) ; 49 void set(const CAttributeTemplate& attr) ; 50 48 51 /// Destructeur /// 49 virtual ~CAttributeTemplate(void) ;52 virtual ~CAttributeTemplate(void) { } 50 53 51 54 /// Operateur /// 52 ValueTypeoperator=(const ValueType & value);55 CAttributeTemplate& operator=(const ValueType & value); 53 56 54 57 /// Autre /// 55 virtual StdString toString(void) const; 56 virtual void fromString(const StdString & str); 58 virtual StdString toString(void) const { return _toString();} 59 virtual void fromString(const StdString & str) { _fromString(str);} 60 // virtual CAttributeTemplate* clone() const {} 61 // virtual void toBinary (StdOStream & os) const; 62 // virtual void fromBinary(StdIStream & is); 57 63 58 virtual void toBinary (StdOStream & os) const; 59 virtual void fromBinary(StdIStream & is); 60 61 virtual bool toBuffer (CBufferOut& buffer) const; 62 virtual bool fromBuffer(CBufferIn& buffer) ; 63 virtual size_t size(void) const; 64 virtual bool toBuffer (CBufferOut& buffer) const { return _toBuffer(buffer);} 65 virtual bool fromBuffer(CBufferIn& buffer) { return _fromBuffer(buffer); } 66 // virtual size_t size(void) const; 64 67 virtual void generateCInterface(ostream& oss,const string& className) ; 65 68 virtual void generateFortran2003Interface(ostream& oss,const string& className) ; … … 75 78 76 79 /// Constructeurs /// 77 CAttributeTemplate(void); // Not implemented. 78 80 // CAttributeTemplate(void); // Not implemented. 81 private : 82 StdString _toString(void) const; 83 void _fromString(const StdString & str); 84 bool _toBuffer (CBufferOut& buffer) const; 85 bool _fromBuffer(CBufferIn& buffer) ; 79 86 }; // class CAttribute 80 87
Note: See TracChangeset
for help on using the changeset viewer.