Changeset 1870 in Sophya for trunk/SophyaLib/BaseTools/dvlist.cc


Ignore:
Timestamp:
Jan 18, 2002, 12:25:29 PM (24 years ago)
Author:
ansari
Message:

Adaptations pour compil avec g++ 3.0 - Reza 18/01/2002

File:
1 edited

Legend:

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

    r1607 r1870  
    163163    {
    164164    case MuTyV::MTVInteger :
    165       SetI((*it).first, (*it).second.elval.iv);
     165      SetI((*it).first, (*it).second.elval.GetIntPart());
    166166      break;
    167167    case  MuTyV::MTVFloat :
    168       SetD((*it).first, (*it).second.elval.dv);
     168      SetD((*it).first, (*it).second.elval.GetRealPart());
    169169      break;
    170170    case MuTyV::MTVComplex :
    171       SetZ((*it).first, complex<r_8>((*it).second.elval.dv, (*it).second.elval.dv_im));
     171      SetZ((*it).first, complex<r_8>((*it).second.elval.GetRealPart(), (*it).second.elval.GetImagPart()));
    172172      break;
    173173    case MuTyV::MTVString :
    174       SetS((*it).first, *((*it).second.elval.strv));
     174      SetS((*it).first, *((*it).second.elval.GetStringPointer()));
    175175      break;
    176176    default :
     
    223223if (it == mvlist.end())  return(def);
    224224#if defined(__GNUG__)
    225 complex<r_8> z;
    226 z = (*it).second.elval;
    227 return(z);
     225// complex<r_8> z;
     226// z = (*it).second.elval;
     227return((*it).second.elval.ToComplexD());
    228228#else
    229229return( (complex<r_8>)(*it).second.elval );
     
    407407    case MuTyV::MTVInteger :
    408408      sprintf(buff, "%s = %ld (int) %s\n", (*it).first.substr(0,64).c_str(),
    409               (long)((*it).second.elval.iv), (*it).second.elcomm.substr(0,128).c_str());
     409              (long)((*it).second.elval.GetIntPart()), (*it).second.elcomm.substr(0,128).c_str());
    410410      break;
    411411    case MuTyV::MTVFloat :
    412412      sprintf(buff, "%s = %.20g (double) %s\n", (*it).first.substr(0,64).c_str(),
    413               (*it).second.elval.dv, (*it).second.elcomm.substr(0,128).c_str());
     413              (*it).second.elval.GetRealPart(), (*it).second.elcomm.substr(0,128).c_str());
    414414      break;
    415415    case MuTyV::MTVComplex :
    416416      sprintf(buff, "%s = %.20g %.20g i (complex) %s\n", (*it).first.substr(0,64).c_str(),
    417               (*it).second.elval.dv, (*it).second.elval.dv_im, (*it).second.elcomm.substr(0,128).c_str());
     417              (*it).second.elval.GetRealPart(), (*it).second.elval.GetImagPart(), (*it).second.elcomm.substr(0,128).c_str());
    418418      break;
    419419    case MuTyV::MTVString :
    420420      sprintf(buff, "%s = %s (string) %s\n", (*it).first.substr(0,64).c_str(),
    421               (*it).second.elval.strv->substr(0,800).c_str(), (*it).second.elcomm.substr(0,128).c_str());
     421              (*it).second.elval.GetStringPointer()->substr(0,800).c_str(), (*it).second.elcomm.substr(0,128).c_str());
    422422      break;
    423423    default :
     
    490490  switch ((*it).second.elval.Type()) {
    491491    case MuTyV::MTVInteger :
    492       sprintf(buf,"I %s %ld\n", (*it).first.substr(0,64).c_str(), (long)((*it).second.elval.iv) );
     492      sprintf(buf,"I %s %ld\n", (*it).first.substr(0,64).c_str(), (long)((*it).second.elval.GetIntPart()) );
    493493      sfw = buf;  s.PutStr(sfw);
    494494      break;
    495495    case MuTyV::MTVFloat :
    496       sprintf(buf,"F %s %.20g\n", (*it).first.substr(0,64).c_str(), (*it).second.elval.dv );
     496      sprintf(buf,"F %s %.20g\n", (*it).first.substr(0,64).c_str(), (*it).second.elval.GetRealPart() );
    497497      sfw = buf;  s.PutStr(sfw);
    498498      break;
    499499    case MuTyV::MTVComplex :
    500       sprintf(buf,"Z %s %.20g %.20g\n", (*it).first.substr(0,64).c_str(), (*it).second.elval.dv,
    501                                       (*it).second.elval.dv_im);
     500      sprintf(buf,"Z %s %.20g %.20g\n", (*it).first.substr(0,64).c_str(), (*it).second.elval.GetRealPart(),
     501                                      (*it).second.elval.GetImagPart());
    502502      sfw = buf;  s.PutStr(sfw);
    503503      break;
    504504    case MuTyV::MTVString :
    505       sprintf(buf,"S %s %s\n", (*it).first.substr(0,64).c_str(), (*it).second.elval.strv->substr(0,960).c_str() );
     505      sprintf(buf,"S %s %s\n", (*it).first.substr(0,64).c_str(), (*it).second.elval.GetStringPointer()->substr(0,960).c_str() );
    506506      sfw = buf;  s.PutStr(sfw);
    507507      break;
Note: See TracChangeset for help on using the changeset viewer.