source: XMLIO_V2/dev/dev_rv/src/xmlio/object_template.hpp @ 168

Last change on this file since 168 was 168, checked in by hozdoba, 13 years ago
File size: 2.0 KB
Line 
1#ifndef __XMLIO_CObjectTemplate__
2#define __XMLIO_CObjectTemplate__
3
4/// xmlioserver headers ///
5#include "xmlioserver_spl.hpp"
6#include "attribute_map.hpp"
7#include "node_enum.hpp"
8
9namespace xmlioserver
10{
11   /// ////////////////////// Déclarations ////////////////////// ///
12   template <class T>
13      class CObjectTemplate
14         : public CObject
15         , public virtual tree::CAttributeMap
16   {
17
18         /// Friend ///
19         friend class CObjectFactory;
20
21         /// Typedef ///
22         typedef tree::CAttributeMap SuperClassMap;
23         typedef CObject SuperClass;
24         typedef T DerivedType;
25
26      public :
27
28         /// Autres ///
29         virtual StdString toString(void) const;
30         virtual void fromString(const StdString & str);
31
32         virtual void parse(xml::CXMLNode & node);
33         
34         /// Accesseurs ///
35         tree::ENodeType getType(void) const;
36
37         /// Test ///
38         virtual bool hasChild(void) const;
39
40         /// Traitements ///
41         virtual void solveDescInheritance(const CAttributeMap * const parent = 0);
42
43         /// Accesseur statique ///
44         static std::vector<boost::shared_ptr<DerivedType> > &
45            GetAllVectobject(const StdString & contextId);
46
47         /// Destructeur ///
48         virtual ~CObjectTemplate(void);
49
50      protected :
51
52         /// Constructeurs ///
53         CObjectTemplate(void);
54         explicit CObjectTemplate(const StdString & id);
55         CObjectTemplate(const CObjectTemplate<T> & object,
56                         bool withAttrList = true, bool withId = true);
57         CObjectTemplate(const CObjectTemplate<T> * const object); // Not implemented.
58
59      private :
60
61         /// Propriétés statiques ///
62         static xios_map<StdString,
63                xios_map<StdString,
64                boost::shared_ptr<DerivedType> > > AllMapObj;
65         static xios_map<StdString,
66                std::vector<boost::shared_ptr<DerivedType> > > AllVectObj;
67
68   }; // class CObjectTemplate
69} // namespace xmlioserver
70
71#endif // __XMLIO_CObjectTemplate__
Note: See TracBrowser for help on using the repository browser.