source: XIOS/trunk/src/object_factory.hpp @ 620

Last change on this file since 620 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: 1.9 KB
RevLine 
[591]1#ifndef __XIOS_CObjectFactory__
2#define __XIOS_CObjectFactory__
[219]3
4/// boost headers ///
5#include <boost/shared_ptr.hpp>
6
[591]7/// XIOS headers ///
8#include "xios_spl.hpp"
[219]9#include "exception.hpp"
10#include "object_template.hpp"
11
[335]12namespace xios
[219]13{
14   /// ////////////////////// Déclarations ////////////////////// ///
15   class CObjectFactory
16   {
17      public :
18
19         /// Mutateurs ///
20         static void SetCurrentContextId(const StdString & context);
21
22         /// Accesseurs ///
23         static StdString & GetCurrentContextId(void);
24
25         template <typename U>
[352]26            static  boost::shared_ptr<U> GetObject(const StdString & id);
[219]27
28         template <typename U>
[352]29            static  boost::shared_ptr<U> GetObject(const StdString& context,const StdString & id);
[286]30
31         template <typename U>
[352]32            static  boost::shared_ptr<U> GetObject(const U * const object);
[219]33
34         template <typename U>
[352]35            static  int GetObjectNum(void);
[219]36         template <typename U>
[352]37            static  int GetObjectIdNum(void);
[219]38
39         template <typename U>
[352]40            static  const std::vector<boost::shared_ptr<U> > &
[219]41               GetObjectVector(const StdString & context = CObjectFactory::GetCurrentContextId());
42
43         /// Tests ///
44         template <typename U>
[352]45            static  bool HasObject(const StdString & id);
[219]46
[286]47         template <typename U>
[352]48            static  bool HasObject(const StdString& context,const StdString & id);
[286]49
[219]50         /// Instanciateur ///
51         template <typename U>
[352]52            static  boost::shared_ptr<U> CreateObject(const StdString & id = StdString(""));
[219]53
[352]54         template <typename U> static  StdString GenUId(void) ; 
[219]55
56      private :
57
58         /// Propriétés statiques ///
59         static StdString CurrContext;
60
61   }; // class CObjectFactory
[335]62} // namespace xios
[219]63
[352]64//#include "object_factory_impl.hpp"
[219]65
[591]66#endif // __XIOS_CObjectFactory__
Note: See TracBrowser for help on using the repository browser.