Salome HOME
PR: new python function getShortHostName() in Utils_Identity.py, based on socket...
[modules/yacs.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 "MEDMEM_STRING.hxx"
13 #include "Batch_LongType.hxx"
14 using namespace std;
15
16 namespace Batch {
17
18         // Conversion en chaine
19   string LongType::affiche() const
20   {
21     //MEDMEM::STRING sst;
22     ostringstream sst;
23     sst << _data;
24     return sst.str();
25   }
26
27         // Operateur d'affectation
28   LongType & LongType::operator =(long l)
29   {
30     _data = l;
31     return *this;
32   }
33
34         // Conversion en long
35   LongType::operator long() 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 * LongType::clone() const
43   {
44     LongType * pL = new LongType(this->_data);
45     assert(pL != 0);
46     return pL;
47   }
48
49 }