source: XMLIO_V2/dev/dev_rv/src/xmlio/attribute_template.hpp @ 172

Last change on this file since 172 was 152, checked in by hozdoba, 13 years ago
File size: 2.0 KB
Line 
1#ifndef __XMLIO_CAttributeTemplate__
2#define __XMLIO_CAttributeTemplate__
3
4/// boost headers ///
5#include <boost/lexical_cast.hpp>
6
7/// xmlioserver headers ///
8#include "xmlioserver_spl.hpp"
9#include "exception.hpp"
10#include "array.hpp"
11#include "attribute.hpp"
12
13namespace xmlioserver
14{
15   namespace tree
16   {
17      /// ////////////////////// Déclarations ////////////////////// ///
18      template <class T>
19         class CAttributeTemplate : public CAttribute
20      {
21            typedef CAttribute SuperClass;
22
23         public :
24
25            /// Typedef ///
26            typedef T ValueType;
27
28            /// Constructeurs ///
29            explicit CAttributeTemplate(const StdString & id);
30            CAttributeTemplate(const StdString & id,
31                               xios_map<StdString, CAttribute*> & umap);
32            CAttributeTemplate(const StdString & id, const ValueType & value);
33            CAttributeTemplate(const StdString & id, const ValueType & value,
34                               xios_map<StdString, CAttribute*> & umap);
35            CAttributeTemplate(const CAttribute & attribut) throw (CException);
36            CAttributeTemplate(const CAttribute * const attribut); // Not implemented.
37
38            /// Accesseur ///
39            inline ValueType getValue(void) const;
40
41            /// Mutateurs ///
42            inline void setValue(const ValueType & value);
43
44            /// Destructeur ///
45            virtual ~CAttributeTemplate(void);
46
47            /// Operateur ///
48            ValueType operator=(const ValueType & value);
49
50            /// Autre ///
51            virtual StdString toString(void) const;
52            virtual void fromString(const StdString & str);
53
54            virtual void toBinary  (StdOStream & os) const;
55            virtual void fromBinary(StdIStream & is);
56
57         protected :
58
59            /// Constructeurs ///
60            CAttributeTemplate(void); // Not implemented.
61
62      }; // class CAttribute
63
64   } // namespace tree
65} // namespace xmlioserver
66
67#endif // __XMLIO_CAttributeTemplate__
Note: See TracBrowser for help on using the repository browser.