source: XIOS/trunk/src/attribute_map.hpp @ 335

Last change on this file since 335 was 335, checked in by ymipsl, 12 years ago

Change namespace xmlioserver -> xios

YM

File size: 2.7 KB
Line 
1#ifndef __XMLIO_CAttributeMap__
2#define __XMLIO_CAttributeMap__
3
4/// xios 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 xios
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            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            void clearAllAttributes(void);
36
37            /// Destructeur ///
38            virtual ~CAttributeMap(void);
39
40            /// Flux ///
41            // Debug only //
42            // friend StdOStream & operator << (StdOStream & os, const CAttributeMap & attributmap);
43
44            /// Autre ///
45            virtual StdString toString(void) const;
46            virtual void fromString(const StdString & str);
47           
48            virtual void toBinary  (StdOStream & os) const;
49            virtual void fromBinary(StdIStream & is);
50            virtual void generateCInterface(ostream& oss, const string& className) ;
51            virtual void generateFortran2003Interface(ostream& oss, const string& className) ;
52            virtual void generateFortranInterface_hdl_(ostream& oss, const string& className) ;
53            virtual void generateFortranInterface_hdl(ostream& oss, const string& className) ;
54            virtual void generateFortranInterface_id(ostream& oss, const string& className) ;
55            virtual void generateFortranInterfaceGet_hdl_(ostream& oss, const string& className) ;
56            virtual void generateFortranInterfaceGet_hdl(ostream& oss, const string& className) ;
57            virtual void generateFortranInterfaceGet_id(ostream& oss, const string& className) ;
58
59         protected :
60
61            /// Constructeurs ///
62            CAttributeMap(void);
63            CAttributeMap(const xios_map<StdString, CAttribute*> & umap);       // Never implemented.
64            CAttributeMap(const xios_map<StdString, CAttribute*> * const umap); // Not implemented.
65
66            /// Propriété statique ///
67            static CAttributeMap * Current;
68
69      };  // class CAttributeMap
70
71   } // namespace tree
72} // namespace xios
73
74#endif // __XMLIO_CAttributeMap__
Note: See TracBrowser for help on using the repository browser.