source: XMLIO_V2/dev/dev_rv/src/attribute_template.hpp @ 141

Last change on this file since 141 was 141, checked in by hozdoba, 13 years ago

Mise à jour depuis un autre dépôt

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