source: XMLIO_V2/dev/dev_rv/src/xmlio/node/context.hpp @ 187

Last change on this file since 187 was 173, checked in by hozdoba, 13 years ago
File size: 2.5 KB
Line 
1#ifndef __XMLIO_CContext__
2#define __XMLIO_CContext__
3
4/// xmlioserver headers ///
5#include "xmlioserver_spl.hpp"
6#include "node_type.hpp"
7
8#include "declare_group.hpp"
9
10namespace xmlioserver {
11namespace tree {
12   
13   /// ////////////////////// Déclarations ////////////////////// ///
14   class CContextGroup;
15   class CContextAttributes;
16   class CContext;
17
18   ///--------------------------------------------------------------
19
20   // Declare/Define CFileAttribute
21   BEGIN_DECLARE_ATTRIBUTE_MAP(CContext)
22#  include "context_attribute.conf"
23   END_DECLARE_ATTRIBUTE_MAP(CContext)
24
25   ///--------------------------------------------------------------
26
27   class CContext
28      : public CObjectTemplate<CContext>
29      , public CContextAttributes
30   {
31         /// typedef ///
32         typedef CObjectTemplate<CContext>   SuperClass;
33         typedef CContextAttributes SuperClassAttribute;
34
35      public :
36
37         typedef CContextAttributes RelAttributes;
38         typedef CContext           RelGroup;
39
40         //---------------------------------------------------------
41
42         /// Constructeurs ///
43         CContext(void);
44         explicit CContext(const StdString & id);
45         CContext(const CContext & context);       // Not implemented yet.
46         CContext(const CContext * const context); // Not implemented yet.
47
48         /// Destructeur ///
49         virtual ~CContext(void);
50
51         //---------------------------------------------------------
52
53         /// Accesseurs statiques ///
54         static StdString GetName(void);
55         static StdString GetDefName(void);
56         
57         static ENodeType GetType(void);
58
59         static boost::shared_ptr<CContextGroup> GetContextGroup(void);
60
61         /// Traitements ///
62         virtual void solveDescInheritance(const CAttributeMap * const parent = 0);
63         void solveFieldRefInheritance(void);
64
65         /// Autres méthodes statiques ///
66         static void ShowTree(StdOStream & out = std::clog);
67
68         /// Test ///
69         virtual bool hasChild(void) const;
70
71         /// Autres ///
72         virtual void parse(xml::CXMLNode & node);
73
74         virtual StdString toString(void) const;
75         virtual void toBinary  (StdOStream & os) const;
76         virtual void fromBinary(StdIStream & is);
77
78   }; // class CContext
79
80   ///--------------------------------------------------------------
81
82   // Declare/Define CContextGroup and CContextDefinition
83   DECLARE_GROUP(CContext);
84
85   ///--------------------------------------------------------------
86
87} // namespace tree
88} // namespace xmlioserver
89
90#endif // __XMLIO_CContext__
Note: See TracBrowser for help on using the repository browser.