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

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