New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
group_factory.hpp in branches/2012/dev_r3406_LOCEAN4_XIOS/NEMOGCM/EXTERNAL/XIOS/src – NEMO

source: branches/2012/dev_r3406_LOCEAN4_XIOS/NEMOGCM/EXTERNAL/XIOS/src/group_factory.hpp @ 3474

Last change on this file since 3474 was 3474, checked in by rblod, 12 years ago

Update IOSERVER to revision 357

File size: 2.5 KB
Line 
1#ifndef __XMLIO_CGroupFactory__
2#define __XMLIO_CGroupFactory__
3
4/// boost headers ///
5#include <boost/shared_ptr.hpp>
6
7/// xios headers ///
8#include "xmlioserver_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 // __XMLIO_CGroupFactory__
Note: See TracBrowser for help on using the repository browser.