Changeset 6bef16c in tol
- Timestamp:
- Nov 4, 2009, 6:36:11 PM (17 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- 251e783
- Parents:
- 1908267
- Location:
- tol
- Files:
-
- 3 edited
-
bmath/mathobjects/dat.cpp (modified) (1 diff)
-
bmath/mathobjects/tol_bdat.h (modified) (1 diff)
-
btol/real_type/datgrav.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
tol/bmath/mathobjects/dat.cpp
r1908267 r6bef16c 1198 1198 1199 1199 //-------------------------------------------------------------------- 1200 void BDat::PutValue(const BText& name, const BText& format) 1201 1202 /*! Puts the real value of name in this or unknown if name is not 1203 * a valid real number 1204 * \param name Value thet is assigned to BDat 1205 */ 1206 //-------------------------------------------------------------------- 1207 { 1208 value_ = nan_; 1209 int ret = sscanf(name.String(),format.String(),&value_); 1210 if(ret!=1) 1211 { 1212 value_ = nan_; 1213 } 1214 } 1215 1216 //-------------------------------------------------------------------- 1200 1217 ostream& operator<< (ostream& os, const BArray<BDat>& arr) 1201 1218 -
tol/bmath/mathobjects/tol_bdat.h
r1908267 r6bef16c 192 192 193 193 //! Updates with the values of BChar 194 void PutValue (const BChar* name);194 void PutValue (const BChar* name); 195 195 //! Updates with the values of BText 196 void PutValue (const BText& expr); //dattext.cpp 196 void PutValue (const BText& expr); //dattext.cpp 197 //! Updates with the values of BText and specified format 198 void PutValue(const BText& name, const BText& format); 197 199 //! Updates \a value_ attribute with \a x 198 200 void PutValue (BReal x) { value_ = x; } -
tol/btol/real_type/datgrav.cpp
r1908267 r6bef16c 1680 1680 1681 1681 1682 //-------------------------------------------------------------------- 1683 DeclareContensClass(BDat, BDatTemporary, BDatTextToReal); 1684 DefExtOpr(1, BDatTextToReal, "TextToReal", 1, 2, "Text Text", 1685 "(Text txt [, Text format=\"%lg\"])", 1686 I2("Convers to real a formatted text. You can specify any standard " 1687 "C format for type double.", 1688 "Convierte a real un texto formateado. Se puede especificar un " 1689 "formato estándar cualquiera de C para el tipo double ")+ 1690 I2("\nWARNING: Not all formats are inversible. " 1691 "For example, format strings with literals " 1692 "they must be separated with a specified separator character.", 1693 "\nCUIDADO: No todas las cadenas de formato tienen porqué ser inversibles. " 1694 "Por ejemplo, si usan literales " 1695 "éstos deben estar separados del resto por un caracter especificado."), 1696 BOperClassify::TimeAlgebra_); 1697 //-------------------------------------------------------------------- 1698 void BDatTextToReal::CalcContens() 1699 //-------------------------------------------------------------------- 1700 { 1701 BText& txt = Text(Arg(1)); 1702 if(!Arg(2)) 1703 { 1704 contens_.PutValue(txt); 1705 } 1706 else 1707 { 1708 BText& fmt = Text(Arg(2)); 1709 contens_.PutValue(txt,fmt); 1710 } 1711 } 1682 1712 1683 1713 //--------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.
