source: XIOS/dev/dev_ym/XIOS_SERVICES/src/object.hpp @ 1761

Last change on this file since 1761 was 1761, checked in by ymipsl, 5 years ago

implementing first guess for service functionnalities.

YM

  • 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.6 KB
Line 
1#ifndef __XIOS_CObject__
2#define __XIOS_CObject__
3
4/// XIOS headers ///
5#include "xios_spl.hpp"
6
7namespace xios
8{
9  /// ////////////////////// Déclarations ////////////////////// ///
10
11  class CObject
12  {
13    public:
14      /// Destructeur ///
15      virtual ~CObject(void);
16
17      /// Accesseurs ///
18      const StdString& getId(void) const;
19      virtual const StdString& getIdServer() ;
20      virtual const StdString& getIdServer(int nsrvPool) ;
21
22      virtual StdString dumpClassAttributes(void);
23
24      /// Mutateurs ///
25      void resetId(void);
26      void setId(const StdString& id, bool idAutoGenerated = false);
27
28      /// Tests ///
29      bool hasId(void) const;
30      bool hasAutoGeneratedId(void) const;
31
32      /// Opérateurs ///
33      // bool operator==(const CObject& other) const;
34      // bool operator!=(const CObject& other) const;
35
36      /// Flux ///
37      friend StdOStream& operator<<(StdOStream& os, const CObject& object);
38
39      /// Autres ///
40      virtual StdString toString(void) const = 0;
41      virtual void fromString(const StdString& str) = 0;
42
43    protected:
44      /// Constructeurs ///
45      CObject(void);
46      explicit CObject(const StdString& id, bool idAutoGenerated = false);
47      CObject(const CObject& object);
48      CObject(const CObject* const object); // Not implemented.
49
50    private:
51      /// Propriétés ///
52      StdString id;   // identifiant de l'Object
53      bool idDefined; // true si l'object est identifié, false sinon.
54      bool idAutoGenerated; //!< true if and only the id was automatically generated
55  }; // class CObject
56} // namespace xios
57
58#endif // __XIOS_CObject__
Note: See TracBrowser for help on using the repository browser.