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