source: XIOS/dev/dev_ym/XIOS_COUPLING/src/object.cpp @ 2142

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

Supress unusefull idServer context variable that create some trouble when sending context attribute to server.

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#include "object.hpp"
2
3namespace xios
4{
5  /// ////////////////////// Définitions ////////////////////// ///
6
7  CObject::CObject(void)
8    : id(), idDefined(false), idAutoGenerated(false)
9  { /* Ne rien faire de plus */ }
10
11  CObject::CObject(const StdString& id, bool idAutoGenerated /*= false*/)
12    : id(id)
13    , idDefined(true)
14    , idAutoGenerated(idAutoGenerated)
15  { /* Ne rien faire de plus */ }
16
17  CObject::CObject(const CObject& object)
18    : id(object.id)
19    , idDefined(object.idDefined)
20    , idAutoGenerated(object.idAutoGenerated)
21  { /* Ne rien faire de plus */ }
22
23  CObject::~CObject(void)
24  { /* Ne rien faire de plus */ }
25
26  const StdString& CObject::getId(void) const
27  {
28    return this->id;
29  }
30
31  StdString CObject::dumpClassAttributes(void)
32  {
33    return "";
34  }
35
36  bool CObject::hasId(void) const
37  {
38    return this->idDefined;
39  }
40
41  bool CObject::hasAutoGeneratedId(void) const
42  {
43    return this->idAutoGenerated;
44  }
45
46  void CObject::resetId(void)
47  {
48    this->idDefined = false;
49  }
50
51  void CObject::setId(const StdString& id, bool idAutoGenerated /*= false*/)
52  {
53    this->id = id;
54    this->idDefined = true;
55    this->idAutoGenerated = idAutoGenerated;
56  }
57
58  /*
59  bool CObject::operator==(const CObject& other) const
60  {
61    if(!this->hasId() || !other.hasId())
62    return false;
63    return this->id.compare(other.id) == 0;
64  }
65
66  bool CObject::operator!=(const CObject& other) const
67  {
68    return !(*this == other);
69  }
70  */
71
72  StdOStream& operator<<(StdOStream& os, const CObject& object)
73  {
74    os << object.toString();
75    return os;
76  }
77} // namespace xios
Note: See TracBrowser for help on using the repository browser.