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