Changeset 2884 in Sophya for trunk/SophyaLib/BaseTools/mutyv.cc
- Timestamp:
- Jan 4, 2006, 2:30:31 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/BaseTools/mutyv.cc
r2826 r2884 150 150 151 151 /* --Methode-- */ 152 string & 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-- */ 152 168 MuTyV::operator TimeStamp() const 153 169 { 154 170 return TimeStamp(dv); 171 } 172 173 /* --Methode-- */ 174 TimeStamp& MuTyV::Convert(TimeStamp& x) const 175 { 176 x = TimeStamp(dv); 177 return x; 155 178 } 156 179
Note:
See TracChangeset
for help on using the changeset viewer.