1 | #ifndef __XIOS_CScalar__ |
---|
2 | #define __XIOS_CScalar__ |
---|
3 | |
---|
4 | /// XIOS headers /// |
---|
5 | #include "xios_spl.hpp" |
---|
6 | #include "declare_group.hpp" |
---|
7 | #include "declare_ref_func.hpp" |
---|
8 | #include "group_template.hpp" |
---|
9 | #include "array_new.hpp" |
---|
10 | #include "attribute_enum.hpp" |
---|
11 | #include "attribute_enum_impl.hpp" |
---|
12 | #include "attribute_array.hpp" |
---|
13 | #include "transformation.hpp" |
---|
14 | #include "transformation_enum.hpp" |
---|
15 | |
---|
16 | namespace xios |
---|
17 | { |
---|
18 | /// ////////////////////// Déclarations ////////////////////// /// |
---|
19 | |
---|
20 | class CScalarGroup; |
---|
21 | class CScalarAttributes; |
---|
22 | class CScalar; |
---|
23 | ///-------------------------------------------------------------- |
---|
24 | |
---|
25 | // Declare/Define CVarAttribute |
---|
26 | BEGIN_DECLARE_ATTRIBUTE_MAP(CScalar) |
---|
27 | #include "scalar_attribute.conf" |
---|
28 | END_DECLARE_ATTRIBUTE_MAP(CScalar) |
---|
29 | |
---|
30 | ///-------------------------------------------------------------- |
---|
31 | |
---|
32 | class CScalar |
---|
33 | : public CObjectTemplate<CScalar> |
---|
34 | , public CScalarAttributes |
---|
35 | { |
---|
36 | /// typedef /// |
---|
37 | typedef CObjectTemplate<CScalar> SuperClass; |
---|
38 | typedef CScalarAttributes SuperClassAttribute; |
---|
39 | |
---|
40 | friend class CScalarGroup; |
---|
41 | |
---|
42 | public : |
---|
43 | |
---|
44 | typedef CScalarAttributes RelAttributes; |
---|
45 | typedef CScalarGroup RelGroup; |
---|
46 | typedef CTransformation<CScalar>::TransformationMapTypes TransMapTypes; |
---|
47 | |
---|
48 | /// Constructeurs /// |
---|
49 | CScalar(void); |
---|
50 | explicit CScalar(const StdString & id); |
---|
51 | CScalar(const CScalar & var); // Not implemented yet. |
---|
52 | CScalar(const CScalar * const var); // Not implemented yet. |
---|
53 | |
---|
54 | /// Destructeur /// |
---|
55 | virtual ~CScalar(void); |
---|
56 | |
---|
57 | public : |
---|
58 | /// Accesseurs statiques /// |
---|
59 | static StdString GetName(void); |
---|
60 | static StdString GetDefName(void); |
---|
61 | static ENodeType GetType(void); |
---|
62 | |
---|
63 | public: |
---|
64 | static CScalar* createScalar(); |
---|
65 | |
---|
66 | public: |
---|
67 | void checkAttributes(void); |
---|
68 | void addRelFile(const StdString& filename); |
---|
69 | bool IsWritten(const StdString& filename) const; |
---|
70 | void checkAttributesOnClient(); |
---|
71 | virtual void parse(xml::CXMLNode & node); |
---|
72 | |
---|
73 | public: |
---|
74 | bool hasTransformation(); |
---|
75 | void solveInheritanceTransformation(); |
---|
76 | TransMapTypes getAllTransformations(); |
---|
77 | void duplicateTransformation(CScalar*); |
---|
78 | CTransformation<CScalar>* addTransformation(ETranformationType transType, const StdString& id=""); |
---|
79 | bool isEqual(CScalar* scalar); |
---|
80 | |
---|
81 | private: |
---|
82 | std::set<StdString> relFiles; |
---|
83 | TransMapTypes transformationMap_; |
---|
84 | |
---|
85 | void setTransformations(const TransMapTypes&); |
---|
86 | |
---|
87 | private: |
---|
88 | static bool initializeTransformationMap(std::map<StdString, ETranformationType>& m); |
---|
89 | static std::map<StdString, ETranformationType> transformationMapList_; |
---|
90 | static bool dummyTransformationMapList_; |
---|
91 | |
---|
92 | |
---|
93 | DECLARE_REF_FUNC(Scalar,scalar) |
---|
94 | |
---|
95 | }; // class CVar |
---|
96 | ///-------------------------------------------------------------- |
---|
97 | |
---|
98 | // Declare/Define CScalarGroup and CScalarDefinition |
---|
99 | DECLARE_GROUP(CScalar); |
---|
100 | } // namespace xios |
---|
101 | |
---|
102 | #endif // __XIOS_CScalar__ |
---|