[152] | 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 | |
---|
[168] | 10 | namespace xmlioserver { |
---|
| 11 | namespace tree { |
---|
| 12 | |
---|
| 13 | /// ////////////////////// Déclarations ////////////////////// /// |
---|
| 14 | class CContextGroup; |
---|
| 15 | class CContextAttributes; |
---|
| 16 | class CContext; |
---|
[152] | 17 | |
---|
[168] | 18 | ///-------------------------------------------------------------- |
---|
[152] | 19 | |
---|
[168] | 20 | // Declare/Define CFileAttribute |
---|
| 21 | BEGIN_DECLARE_ATTRIBUTE_MAP(CContext) |
---|
[173] | 22 | # include "context_attribute.conf" |
---|
[168] | 23 | END_DECLARE_ATTRIBUTE_MAP(CContext) |
---|
[152] | 24 | |
---|
[168] | 25 | ///-------------------------------------------------------------- |
---|
[152] | 26 | |
---|
[168] | 27 | class CContext |
---|
| 28 | : public CObjectTemplate<CContext> |
---|
| 29 | , public CContextAttributes |
---|
| 30 | { |
---|
| 31 | /// typedef /// |
---|
| 32 | typedef CObjectTemplate<CContext> SuperClass; |
---|
| 33 | typedef CContextAttributes SuperClassAttribute; |
---|
[152] | 34 | |
---|
[168] | 35 | public : |
---|
[152] | 36 | |
---|
[168] | 37 | typedef CContextAttributes RelAttributes; |
---|
| 38 | typedef CContext RelGroup; |
---|
[152] | 39 | |
---|
[168] | 40 | //--------------------------------------------------------- |
---|
[152] | 41 | |
---|
[168] | 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. |
---|
[152] | 47 | |
---|
[168] | 48 | /// Destructeur /// |
---|
| 49 | virtual ~CContext(void); |
---|
[152] | 50 | |
---|
[168] | 51 | //--------------------------------------------------------- |
---|
[152] | 52 | |
---|
[168] | 53 | /// Accesseurs statiques /// |
---|
| 54 | static StdString GetName(void); |
---|
| 55 | static StdString GetDefName(void); |
---|
| 56 | |
---|
| 57 | static ENodeType GetType(void); |
---|
[152] | 58 | |
---|
[168] | 59 | static boost::shared_ptr<CContextGroup> GetContextGroup(void); |
---|
[152] | 60 | |
---|
[168] | 61 | /// Traitements /// |
---|
| 62 | virtual void solveDescInheritance(const CAttributeMap * const parent = 0); |
---|
| 63 | void solveFieldRefInheritance(void); |
---|
[152] | 64 | |
---|
[168] | 65 | /// Autres méthodes statiques /// |
---|
| 66 | static void ShowTree(StdOStream & out = std::clog); |
---|
[152] | 67 | |
---|
[168] | 68 | /// Test /// |
---|
| 69 | virtual bool hasChild(void) const; |
---|
[152] | 70 | |
---|
[168] | 71 | /// Autres /// |
---|
| 72 | virtual void parse(xml::CXMLNode & node); |
---|
[152] | 73 | |
---|
[168] | 74 | virtual StdString toString(void) const; |
---|
[173] | 75 | virtual void toBinary (StdOStream & os) const; |
---|
| 76 | virtual void fromBinary(StdIStream & is); |
---|
[152] | 77 | |
---|
[168] | 78 | }; // class CContext |
---|
[152] | 79 | |
---|
[168] | 80 | ///-------------------------------------------------------------- |
---|
[152] | 81 | |
---|
[168] | 82 | // Declare/Define CContextGroup and CContextDefinition |
---|
| 83 | DECLARE_GROUP(CContext); |
---|
[152] | 84 | |
---|
[168] | 85 | ///-------------------------------------------------------------- |
---|
| 86 | |
---|
| 87 | } // namespace tree |
---|
[152] | 88 | } // namespace xmlioserver |
---|
| 89 | |
---|
| 90 | #endif // __XMLIO_CContext__ |
---|