Salome HOME
Porting to Mandrake 10.1 and new products:
[modules/kernel.git] / src / Batch / Batch_LongType.cxx
1 /*
2  * LongType.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 <sstream>
12 #include <assert.h>
13 //#include "MEDMEM_STRING.hxx"
14 #include "Batch_LongType.hxx"
15 using namespace std;
16
17 namespace Batch {
18
19         // Conversion en chaine
20   string LongType::affiche() const
21   {
22     //MEDMEM::STRING sst;
23     ostringstream sst;
24     sst << _data;
25     return sst.str();
26   }
27
28         // Operateur d'affectation
29   LongType & LongType::operator =(long l)
30   {
31     _data = l;
32     return *this;
33   }
34
35         // Conversion en long
36   LongType::operator long() const
37   {
38     return this->_data;
39   }
40
41         // Clone duplique l'objet et en fabrique un nouveau a l'aide de new
42         // qu'il faudra detruire ensuite manuellement
43   GenericType * LongType::clone() const
44   {
45     LongType * pL = new LongType(this->_data);
46     assert(pL != 0);
47     return pL;
48   }
49
50 }