Salome HOME
Increment version number (2.2.3)
[modules/kernel.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 <assert.h>
12 #include "Batch_BoolType.hxx"
13 using namespace std;
14
15 namespace Batch {
16
17         // Conversion en chaine
18   string BoolType::affiche() const
19   {
20                 return _data ? string("true") : string("false");
21   }
22
23         // Operateur d'affectation
24   BoolType & BoolType::operator =(bool b)
25   {
26     _data = b;
27     return *this;
28   }
29
30         // Conversion en bool
31   BoolType::operator bool() const
32   {
33     return this->_data;
34   }
35
36         // Clone duplique l'objet et en fabrique un nouveau a l'aide de new
37         // qu'il faudra detruire ensuite manuellement
38   GenericType * BoolType::clone() const
39   {
40     BoolType * pB = new BoolType(this->_data);
41     assert(pB != 0);
42     return pB;
43   }
44
45 }