Salome HOME
66197f84c8cb6182309880723adae2c0ea0769bd
[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
13 namespace Batch {
14
15         // Conversion en chaine
16   string CharType::affiche() const
17   {
18     return string(1, _data);
19   }
20
21         // Operateur d'affectation
22   CharType & CharType::operator =(char c)
23   {
24     _data = c;
25     return *this;
26   }
27
28         // Conversion en char
29   CharType::operator char() const
30   {
31     return this->_data;
32   }
33
34         // Clone duplique l'objet et en fabrique un nouveau a l'aide de new
35         // qu'il faudra detruire ensuite manuellement
36   GenericType * CharType::clone() const
37   {
38     CharType * pC = new CharType(this->_data);
39     assert(pC != 0);
40     return pC;
41   }
42
43 }