source: XMLIO_V2/dev/dev_rv/src/node/file.hpp @ 141

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

Mise à jour depuis un autre dépôt

File size: 3.0 KB
Line 
1#ifndef __XMLIO_CFile__
2#define __XMLIO_CFile__
3
4/// xmlioserver headers ///
5#include "xmlioserver_spl.hpp"
6#include "field.hpp"
7#include "declare_group.hpp"
8
9#include "data_output.hpp"
10
11namespace xmlioserver
12{
13   namespace tree
14   {
15      /// ////////////////////// Déclarations ////////////////////// ///
16
17      class CFileGroup;
18      class CFileAttributes;
19      class CFile;
20
21      ///--------------------------------------------------------------
22
23      // Declare/Define CFileAttribute
24      BEGIN_DECLARE_ATTRIBUTE_MAP(CFile)
25      #include "../config/file_attribute.conf"
26      END_DECLARE_ATTRIBUTE_MAP(CFile)
27
28      ///--------------------------------------------------------------
29
30      class CFile
31         : public CObjectTemplate<CFile>
32         , public CFileAttributes
33      {
34            /// typedef ///
35            typedef CObjectTemplate<CFile>   SuperClass;
36            typedef CFileAttributes SuperClassAttribute;
37
38         public :
39
40            typedef CFileAttributes RelAttributes;
41            typedef CFileGroup      RelGroup;
42
43            /// Constructeurs ///
44            CFile(void);
45            explicit CFile(const StdString & id);
46            CFile(const CFile & file);       // Not implemented yet.
47            CFile(const CFile * const file); // Not implemented yet.
48
49            /// Accesseurs ///
50            boost::shared_ptr<CFieldGroup> getVirtualFieldGroup(void) const;
51            std::vector<boost::shared_ptr<CField> > getAllFields(void) const;
52
53            std::vector<boost::shared_ptr<CField> >
54               getEnabledFields(int default_outputlevel = 5,
55                                int default_level = 1,
56                                bool default_enabled = true);
57
58            /// Mutateurs ///
59            void setVirtualFieldGroup(boost::shared_ptr<CFieldGroup> newVFieldGroup);
60            void setVirtualFieldGroup(const StdString & newVFieldGroupId);
61
62            void initializeDataOutput(boost::shared_ptr<io::CDataOutput> dout);
63
64            /// Traitements ///
65            virtual void solveDescInheritance(const CAttributeMap * const parent = 0);
66            void solveFieldRefInheritance(void);
67            void solveEFGridRef(void);
68            void solveEFOperation(void);
69
70            /// Destructeur ///
71            virtual ~CFile(void);
72
73            /// Autres ///
74            virtual void parse(xml::CXMLNode & node);
75            virtual StdString toString(void) const;
76
77            /// Accesseurs statiques ///
78            static StdString GetName(void);
79            static StdString GetDefName(void);
80
81         private :
82
83            /// Propriétés privées ///
84            boost::shared_ptr<CFieldGroup> vFieldGroup;
85            boost::shared_ptr<io::CDataOutput> data_out;
86            std::vector<boost::shared_ptr<CField> > enabledFields;
87
88      }; // class CFile
89
90      ///--------------------------------------------------------------
91
92      // Declare/Define CFileGroup and CFileDefinition
93      DECLARE_GROUP(CFile);
94
95   } // namespace tree
96} // namespace xmlioserver
97
98#endif // __XMLIO_CFile__
Note: See TracBrowser for help on using the repository browser.