Last change
on this file since 6607 was
6607,
checked in by acosce, 10 months ago
|
XIOS used for ICOLMDZORINCA_CO2_Transport_GMD_2023
|
File size:
1.5 KB
|
Rev | Line | |
---|
[6607] | 1 | #ifndef __XIOS_CObject__ |
---|
| 2 | #define __XIOS_CObject__ |
---|
| 3 | |
---|
| 4 | /// XIOS headers /// |
---|
| 5 | #include "xios_spl.hpp" |
---|
| 6 | |
---|
| 7 | namespace 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() const; |
---|
| 20 | |
---|
| 21 | virtual StdString dumpClassAttributes(void); |
---|
| 22 | |
---|
| 23 | /// Mutateurs /// |
---|
| 24 | void resetId(void); |
---|
| 25 | void setId(const StdString& id, bool idAutoGenerated = false); |
---|
| 26 | |
---|
| 27 | /// Tests /// |
---|
| 28 | bool hasId(void) const; |
---|
| 29 | bool hasAutoGeneratedId(void) const; |
---|
| 30 | |
---|
| 31 | /// Opérateurs /// |
---|
| 32 | // bool operator==(const CObject& other) const; |
---|
| 33 | // bool operator!=(const CObject& other) const; |
---|
| 34 | |
---|
| 35 | /// Flux /// |
---|
| 36 | friend StdOStream& operator<<(StdOStream& os, const CObject& object); |
---|
| 37 | |
---|
| 38 | /// Autres /// |
---|
| 39 | virtual StdString toString(void) const = 0; |
---|
| 40 | virtual void fromString(const StdString& str) = 0; |
---|
| 41 | |
---|
| 42 | protected: |
---|
| 43 | /// Constructeurs /// |
---|
| 44 | CObject(void); |
---|
| 45 | explicit CObject(const StdString& id, bool idAutoGenerated = false); |
---|
| 46 | CObject(const CObject& object); |
---|
| 47 | CObject(const CObject* const object); // Not implemented. |
---|
| 48 | |
---|
| 49 | private: |
---|
| 50 | /// Propriétés /// |
---|
| 51 | StdString id; // identifiant de l'Object |
---|
| 52 | bool idDefined; // true si l'object est identifié, false sinon. |
---|
| 53 | bool idAutoGenerated; //!< true if and only the id was automatically generated |
---|
| 54 | }; // class CObject |
---|
| 55 | } // namespace xios |
---|
| 56 | |
---|
| 57 | #endif // __XIOS_CObject__ |
---|
Note: See
TracBrowser
for help on using the repository browser.