Salome HOME
PR: new python function getShortHostName() in Utils_Identity.py, based on socket...
[modules/yacs.git] / src / Batch / Batch_BoolType.cxx
1 /*
2  * BoolType.cxx : 
3  *
4  * Auteur : Ivan DUTKA-MALEN - EDF R&D
5  * Date   : Septembre 2003
6  * Projet : SALOME 2
7  *
8  */
9
10 #include <string>
11 #include "Batch_BoolType.hxx"
12 using namespace std;
13
14 namespace Batch {
15
16         // Conversion en chaine
17   string BoolType::affiche() const
18   {
19                 return _data ? string("true") : string("false");
20   }
21
22         // Operateur d'affectation
23   BoolType & BoolType::operator =(bool b)
24   {
25     _data = b;
26     return *this;
27   }
28
29         // Conversion en bool
30   BoolType::operator bool() const
31   {
32     return this->_data;
33   }
34
35         // Clone duplique l'objet et en fabrique un nouveau a l'aide de new
36         // qu'il faudra detruire ensuite manuellement
37   GenericType * BoolType::clone() const
38   {
39     BoolType * pB = new BoolType(this->_data);
40     assert(pB != 0);
41     return pB;
42   }
43
44 }