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

Last change on this file since 172 was 171, checked in by hozdoba, 13 years ago
File size: 1.9 KB
Line 
1#ifndef __XMLIO_CAttributeMap__
2#define __XMLIO_CAttributeMap__
3
4/// xmlioserver headers ///
5#include "xmlioserver_spl.hpp"
6#include "attribute.hpp"
7#include "attribute_template.hpp"
8#include "exception.hpp"
9#include "xml_node.hpp"
10
11namespace xmlioserver
12{
13   namespace tree
14   {
15      /// ////////////////////// Déclarations ////////////////////// ///
16      class CAttributeMap
17         : public xios_map<StdString, CAttribute*>
18      {
19            typedef xios_map<StdString, CAttribute*> SuperClassMap;
20
21         public :
22
23            /// Tests ///
24            inline bool hasAttribute(const StdString & key) const;
25
26            /// Accesseurs ///
27            inline CAttribute * operator[](const StdString & key);
28
29            /// Mutateurs ///
30            void setAttribute(const StdString & key, CAttribute * const attr);
31
32            void setAttributes(const xml::THashAttributes & attributes);
33            void setAttributes(const CAttributeMap * const _parent);
34
35            /// Destructeur ///
36            virtual ~CAttributeMap(void);
37
38            /// Flux ///
39            // Debug only //
40            // friend StdOStream & operator << (StdOStream & os, const CAttributeMap & attributmap);
41
42            /// Autre ///
43            virtual StdString toString(void) const;
44            virtual void fromString(const StdString & str);
45           
46            virtual void toBinary  (StdOStream & os) const;
47            virtual void fromBinary(StdIStream & is);
48
49         protected :
50
51            /// Constructeurs ///
52            CAttributeMap(void);
53            CAttributeMap(const xios_map<StdString, CAttribute*> & umap);       // Never implemented.
54            CAttributeMap(const xios_map<StdString, CAttribute*> * const umap); // Not implemented.
55
56            /// Propriété statique ///
57            static CAttributeMap * Current;
58
59      };  // class CAttributeMap
60
61   } // namespace tree
62} // namespace xmlioserver
63
64#endif // __XMLIO_CAttributeMap__
Note: See TracBrowser for help on using the repository browser.