Salome HOME
PR: mergefrom_BR_CCRT_11Nov04
[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 using namespace std;
15
16
17 namespace Batch {
18
19         // Conversion en chaine
20   string IntType::affiche() const
21   {
22     //MEDMEM::STRING sst;
23     ostringstream sst;
24     sst << _data;
25     return sst.str();
26   }
27
28         // Operateur d'affectation
29   IntType & IntType::operator =(int i)
30   {
31     _data = i;
32     return *this;
33   }
34
35         // Conversion en int
36   IntType::operator int()  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 * IntType::clone() const
44   {
45     IntType * pI = new IntType(this->_data);
46     assert(pI != 0);
47     return pI;
48   }
49
50 }