source: XMLIO_V2/dev/dev_rv/src/xmlio/node/variable.hpp @ 272

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

Suite nouvelle interface fortran

File size: 2.5 KB
Line 
1#ifndef __XMLIO_CVariable__
2#define __XMLIO_CVariable__
3
4/// xmlioserver headers ///
5#include "xmlioserver_spl.hpp"
6#include "declare_group.hpp"
7
8#include "data_output.hpp"
9
10namespace xmlioserver
11{
12   namespace tree
13   {
14      /// ////////////////////// Déclarations ////////////////////// ///
15
16      class CVariableGroup;
17      class CVariableAttributes;
18      class CVariable;
19
20      ///--------------------------------------------------------------
21
22      // Declare/Define CVarAttribute
23      BEGIN_DECLARE_ATTRIBUTE_MAP(CVariable)
24#include "var_attribute.conf"
25      END_DECLARE_ATTRIBUTE_MAP(CVariable)
26
27      ///--------------------------------------------------------------
28
29      class CVariable
30         : public CObjectTemplate<CVariable>
31         , public CVariableAttributes
32      {
33            /// typedef ///
34            typedef CObjectTemplate<CVariable>   SuperClass;
35            typedef CVariableAttributes SuperClassAttribute;
36
37            friend class CVariableGroup;
38
39         public :
40
41            typedef CVariableAttributes RelAttributes;
42            typedef CVariableGroup      RelGroup;
43
44            /// Constructeurs ///
45            CVariable(void);
46            explicit CVariable(const StdString & id);
47            CVariable(const CVariable & var);       // Not implemented yet.
48            CVariable(const CVariable * const var); // Not implemented yet.
49
50            /// Destructeur ///
51            virtual ~CVariable(void);
52
53         public :
54         
55            /// Autres ///
56            virtual void parse(xml::CXMLNode & node);
57            virtual StdString toString(void) const;
58
59            //virtual void toBinary  (StdOStream & os) const;
60            //virtual void fromBinary(StdIStream & is);
61
62            /// Accesseur ///
63            const StdString & getContent (void) const;
64
65           
66            template <typename T> inline void getData(T & _data) const;
67            template <typename T, StdSize N>
68               inline void getData(ARRAY(T, N) _data_array) const;
69
70         public :
71         
72            /// Accesseurs statiques ///
73            static StdString GetName(void);
74            static StdString GetDefName(void);
75            static ENodeType GetType(void);
76
77         private :
78
79            StdString content;
80
81      }; // class CVar
82
83      ///--------------------------------------------------------------
84
85      // Declare/Define CVarGroup and CVarDefinition
86      DECLARE_GROUP_PARSE_REDEF(CVariable);
87
88
89
90   } // namespace tree
91} // namespace xmlioserver
92
93#endif // __XMLIO_CVariable__
Note: See TracBrowser for help on using the repository browser.