source: XIOS/dev/dev_olga/src/group_factory.hpp @ 1132

Last change on this file since 1132 was 591, checked in by rlacroix, 9 years ago

Remove leftovers from the XMLIO age.

  • Property copyright set to
    Software name : XIOS (Xml I/O Server)
    http://forge.ipsl.jussieu.fr/ioserver
    Creation date : January 2009
    Licence : CeCCIL version2
    see license file in root directory : Licence_CeCILL_V2-en.txt
    or http://www.cecill.info/licences/Licence_CeCILL_V2-en.html
    Holder : CEA/LSCE (Laboratoire des Sciences du CLimat et de l'Environnement)
    CNRS/IPSL (Institut Pierre Simon Laplace)
    Project Manager : Yann Meurdesoif
    yann.meurdesoif@cea.fr
File size: 2.5 KB
Line 
1#ifndef __XIOS_CGroupFactory__
2#define __XIOS_CGroupFactory__
3
4/// boost headers ///
5#include <boost/shared_ptr.hpp>
6
7/// XIOS headers ///
8#include "xios_spl.hpp"
9#include "exception.hpp"
10#include "object_factory.hpp"
11#include "group_template.hpp"
12#include "xml_parser.hpp"
13
14namespace xios
15{
16   /// ////////////////////// Déclarations ////////////////////// ///
17   class CGroupFactory
18   {
19      public :
20
21         /// Mutateurs ///
22         static void SetCurrentContextId(const StdString & context);
23
24         template <typename U>
25            static void AddGroup(boost::shared_ptr<U> pgroup,
26                                        boost::shared_ptr<U> cgroup);
27
28         template <typename U>
29            static void AddChild(boost::shared_ptr<U> group,
30                                        boost::shared_ptr<typename U::RelChild> child);
31
32         /// Accesseurs ///
33         static StdString & GetCurrentContextId(void);
34
35         template <typename U>
36            static boost::shared_ptr<U>
37               GetGroup(boost::shared_ptr<U> group, const StdString & id);
38
39         template <typename U>
40            static boost::shared_ptr<typename U::RelChild>
41               GetChild(boost::shared_ptr<U> group, const StdString & id);
42
43         template <typename U>
44            static int GetGroupNum(boost::shared_ptr<U> group);
45         template <typename U>
46            static int GetGroupIdNum(boost::shared_ptr<U> group);
47         template <typename U>
48            static int GetChildNum(boost::shared_ptr<U> group);
49         template <typename U>
50            static int GetChildIdNum(boost::shared_ptr<U> group);
51
52         /// Tests ///
53         template <typename U>
54            static bool HasGroup(boost::shared_ptr<U> group, const StdString & id);
55
56         template <typename U>
57            static bool HasChild(boost::shared_ptr<U> group, const StdString & id);
58
59         /// Instanciateur ///
60         template <typename U>
61            static boost::shared_ptr<U>
62               CreateGroup(boost::shared_ptr<U> group, const StdString & id = StdString(""));
63
64         template <typename U>
65            static boost::shared_ptr<typename U::RelChild>
66               CreateChild(boost::shared_ptr<U> group, const StdString & id = StdString(""));
67
68      private :
69
70         /// Propriétés statiques ///
71         static StdString CurrContext;
72
73   }; // class CGroupFactory
74} // namespace xios
75
76//#include "group_factory_impl.hpp"
77//#include "group_parser.hpp"
78
79#endif // __XIOS_CGroupFactory__
Note: See TracBrowser for help on using the repository browser.