Changeset 2884 in Sophya for trunk/SophyaLib/BaseTools/mutyv.cc


Ignore:
Timestamp:
Jan 4, 2006, 2:30:31 PM (20 years ago)
Author:
ansari
Message:

Modifs pour compilation avec g++ 4 (V >= 3.4) - Reza 4 Jan 2006

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/BaseTools/mutyv.cc

    r2826 r2884  
    150150
    151151/* --Methode-- */
     152string & MuTyV::Convert(string & x) const
     153{
     154  if (typ == MTVString)  x = *strv;
     155  else if (typ == MTVTimeStamp) { x = TimeStamp(dv).ToString(); }
     156  else {
     157    char buff[96];
     158    if (typ == MTVInteger)  sprintf(buff,"%ld", (long)iv);
     159    else if (typ == MTVFloat) sprintf(buff,"%g", dv);
     160    else if (typ == MTVComplex) sprintf(buff,"(%g,%g)", dv, dv_im);
     161    else buff[0] = '\0';
     162    x = buff;
     163  }
     164  return x;
     165}
     166
     167/* --Methode-- */
    152168MuTyV::operator TimeStamp() const
    153169{
    154170  return TimeStamp(dv);
     171}
     172
     173/* --Methode-- */
     174TimeStamp& MuTyV::Convert(TimeStamp& x) const
     175{
     176  x = TimeStamp(dv);
     177  return x;
    155178}
    156179
Note: See TracChangeset for help on using the changeset viewer.