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

Last change on this file since 172 was 168, checked in by hozdoba, 13 years ago
File size: 3.0 KB
Line 
1#ifndef __XMLIO_CField__
2#define __XMLIO_CField__
3
4/// xmlioserver headers ///
5#include "xmlioserver_spl.hpp"
6#include "group_factory.hpp"
7
8#include "functor.hpp"
9#include "functor_type.hpp"
10
11#include "declare_group.hpp"
12
13namespace xmlioserver {
14namespace tree {
15   
16   /// ////////////////////// Déclarations ////////////////////// ///
17
18   class CFieldGroup;
19   class CFieldAttributes;
20   class CField;
21
22   class CFile;
23   class CGrid;
24
25   ///--------------------------------------------------------------
26
27   // Declare/Define CFieldAttribute
28   BEGIN_DECLARE_ATTRIBUTE_MAP(CField)
29   #include "field_attribute.conf"
30   END_DECLARE_ATTRIBUTE_MAP(CField)
31
32   ///--------------------------------------------------------------
33   class CField
34      : public CObjectTemplate<CField>
35      , public CFieldAttributes
36   {
37         /// friend ///
38         friend class CFile;
39
40         /// typedef ///
41         typedef CObjectTemplate<CField>   SuperClass;
42         typedef CFieldAttributes SuperClassAttribute;
43
44      public :
45
46         typedef CFieldAttributes RelAttributes;
47         typedef CFieldGroup      RelGroup;
48
49         /// Constructeurs ///
50         CField(void);
51         explicit CField(const StdString & id);
52         CField(const CField & field);       // Not implemented yet.
53         CField(const CField * const field); // Not implemented yet.
54
55         /// Accesseurs ///
56         boost::shared_ptr<CField> getDirectFieldReference(void) const;
57         const boost::shared_ptr<CField> getBaseFieldReference(void) const;
58         const std::vector<boost::shared_ptr<CField> > & getAllReference(void) const;
59
60         boost::shared_ptr<CGrid> getRelGrid(void) const ;
61         boost::shared_ptr<CFile> getRelFile(void) const ;
62
63         const StdString & getBaseFieldId(void) const;
64
65         /// Mutateur ///
66         void setRelFile(const boost::shared_ptr<CFile> _file);
67
68      public :
69
70         /// Test ///
71         bool hasDirectFieldReference(void) const;
72
73         /// Traitements ///
74         void solveRefInheritance(void);
75         void solveGridReference(void);
76         void solveOperation(void);
77
78         /// Destructeur ///
79         virtual ~CField(void);
80
81         /// Accesseurs statiques ///
82         static StdString GetName(void);
83         static StdString GetDefName(void);
84         
85         static ENodeType GetType(void);
86
87      private :
88
89         /// Propriétés privées ///
90         boost::shared_ptr<CField> baseRefObject;
91         std::vector<boost::shared_ptr<CField> > refObject;
92
93         boost::shared_ptr<CGrid> grid ;
94         boost::shared_ptr<CFile> file;
95
96         func::CFunctor * foperation;
97
98   }; // class CField
99
100   ///--------------------------------------------------------------
101
102   // Declare/Define CFieldGroup and CFieldDefinition
103   DECLARE_GROUP(CField);
104
105   } // namespace tree
106
107   ///-----------------------------------------------------------------
108
109   template <>
110      void CGroupTemplate<CField, CFieldGroup, CFieldAttributes>::solveRefInheritance(void);
111
112} // namespace xmlioserver
113
114#endif // __XMLIO_CField__
Note: See TracBrowser for help on using the repository browser.