New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
attribute_map.hpp in vendors/XIOS/current/src – NEMO

source: vendors/XIOS/current/src/attribute_map.hpp @ 3408

Last change on this file since 3408 was 3408, checked in by rblod, 12 years ago

importing initial XIOS vendor drop

  • Property svn:keywords set to Id
File size: 2.6 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      /// ////////////////////// Déclarations ////////////////////// ///
14      class CAttributeMap
15         : public xios_map<StdString, CAttribute*>
16      {
17            typedef xios_map<StdString, CAttribute*> SuperClassMap;
18
19         public :
20
21            /// Tests ///
22            inline bool hasAttribute(const StdString & key) const;
23
24            /// Accesseurs ///
25            CAttribute * operator[](const StdString & key);
26
27            /// Mutateurs ///
28            void setAttribute(const StdString & key, CAttribute * const attr);
29
30            void setAttributes(const xml::THashAttributes & attributes);
31            void setAttributes(const CAttributeMap * const _parent);
32
33            void clearAllAttributes(void);
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            virtual void generateCInterface(ostream& oss, const string& className) ;
49            virtual void generateFortran2003Interface(ostream& oss, const string& className) ;
50            virtual void generateFortranInterface_hdl_(ostream& oss, const string& className) ;
51            virtual void generateFortranInterface_hdl(ostream& oss, const string& className) ;
52            virtual void generateFortranInterface_id(ostream& oss, const string& className) ;
53            virtual void generateFortranInterfaceGet_hdl_(ostream& oss, const string& className) ;
54            virtual void generateFortranInterfaceGet_hdl(ostream& oss, const string& className) ;
55            virtual void generateFortranInterfaceGet_id(ostream& oss, const string& className) ;
56
57         protected :
58
59            /// Constructeurs ///
60            CAttributeMap(void);
61            CAttributeMap(const xios_map<StdString, CAttribute*> & umap);       // Never implemented.
62            CAttributeMap(const xios_map<StdString, CAttribute*> * const umap); // Not implemented.
63
64            /// Propriété statique ///
65            static CAttributeMap * Current;
66
67      };  // class CAttributeMap
68
69} // namespace xios
70
71#endif // __XMLIO_CAttributeMap__
Note: See TracBrowser for help on using the repository browser.