Salome HOME
52f64146d9c2369f003570ccfae1bcf65e9e6710
[modules/kernel.git] / src / Batch / Batch_CharType.cxx
1 /*
2  * CharType.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_CharType.hxx"
12 using namespace std;
13
14 namespace Batch {
15
16         // Conversion en chaine
17   string CharType::affiche() const
18   {
19     return string(1, _data);
20   }
21
22         // Operateur d'affectation
23   CharType & CharType::operator =(char c)
24   {
25     _data = c;
26     return *this;
27   }
28
29         // Conversion en char
30   CharType::operator char() 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 * CharType::clone() const
38   {
39     CharType * pC = new CharType(this->_data);
40     assert(pC != 0);
41     return pC;
42   }
43
44 }