source: XIOS/dev/branch_yushan/src/cxios.hpp @ 1037

Last change on this file since 1037 was 1037, checked in by yushan, 7 years ago

initialize the branch

  • 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.1 KB
Line 
1#ifndef __XIOS_HPP__
2#define __XIOS_HPP__
3
4#include "xios_spl.hpp"
5#include "mpi.hpp"
6#include "registry.hpp"
7#ifdef _usingEP
8//#include "ep_declaration.hpp"
9#endif
10
11
12namespace xios
13{
14  /*!
15  \class CXios
16  */
17  class CXios
18  {
19    public:
20     static void initialize(void) ;
21     static void initClientSide(const string & codeId, MPI_Comm& localComm, MPI_Comm& returnComm) ;
22     static void initServerSide(void) ;
23     static void clientFinalize(void) ;
24     static void parseFile(const string& filename) ;
25
26     template <typename T>
27     static T getin(const string& id,const T& defaultValue) ;
28
29     template <typename T>
30     static T getin(const string& id) ;
31
32    public:
33     static string rootFile ; //!< Configuration filename
34     static string xiosCodeId ; //!< Identity for XIOS
35     static string clientFile; //!< Filename template for client
36     static string serverFile; //!< Filename template for server
37
38     static bool isClient ; //!< Check if xios is client
39     static bool isServer ; //!< Check if xios is server
40
41     static MPI_Comm globalComm ; //!< Global communicator
42
43     static bool printLogs2Files; //!< Printing out logs into files
44     static bool usingOasis ; //!< Using Oasis
45     static bool usingServer ; //!< Using server (server mode)
46     static double bufferSizeFactor; //!< Factor used to tune the buffer size
47     static const double defaultBufferSizeFactor; //!< Default factor value
48     static StdSize minBufferSize; //!< Minimum buffer size
49     static bool isOptPerformance; //!< Check if buffer size is for performance (as large as possible)
50     static CRegistry* globalRegistry ; //!< global registry which is wrote by the root process of the servers
51
52    public:
53     //! Setting xios to use server mode
54     static void setUsingServer();
55
56     //! Setting xios NOT to use server mode
57     static void setNotUsingServer();
58
59     //! Initialize server (if any)
60     static  void initServer();
61
62    private:
63      //! Parse only Xios part of configuration file
64      static void parseXiosConfig();
65  } ;
66}
67
68//#include "cxios_impl.hpp"
69#endif // __XIOS_HPP__
Note: See TracBrowser for help on using the repository browser.