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

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