CFx SDK Documentation
2020SP3
|
Go to the documentation of this file.
24 #ifndef _OD_UNITSFORMATTER_H_INCLUDED_
25 #define _OD_UNITSFORMATTER_H_INCLUDED_
58 kSuppressesZeroFeetAndPreciselyZeroInches = 0,
59 kIncludesZeroFeetAndPreciselyZeroInches = 1,
60 kIncludesZeroFeetAndSuppressesZeroInches = 2,
61 kIncludesZeroInchesAndSuppressesZeroFeet = 3,
63 kSuppressesLeadingZeros = 4,
64 kSuppressesTrailingZeros = 8,
65 kSuppressesBothLeadingAndTrailingZeros = 12
198 static int toInt(
const OdString& sValue,
int nMinValid = INT_MIN,
int nMaxValid = INT_MAX);
206 value = double(floor(
value * denominator + 0.5)) / double(denominator);
207 entier = int(floor(
value));
208 numerator = int((
value - entier) *
double(denominator));
209 while((numerator % 2) == 0 && (numerator != 0))
219 for(
int i = 0; i < prec; ++i)
226 return base_denominator(prec, 10.);
231 return (c >=
'0' && c <=
'9');
241 for(
int i = prec; i >= 5; i--)
264 static void decomp(
double v,
int& degs,
int& mins,
double& secs,
int prec);
310 const OdChar *pBuffer =
string.c_str();
313 if (*pBuffer >=
'0' && *pBuffer <=
'9')
315 else if (*pBuffer ==
'+' || *pBuffer ==
'-')
321 else if (*pBuffer == delim && nDigits > 0 && nSpec <= 1)
334 #endif //#ifndef _OD_UNITSFORMATTER_H_INCLUDED_
GLenum GLint GLint * precision
FIRSTDLL_EXPORT void odDToStr(char *dst, double val, char fmt, int prec, int cropzeros=0)
OdString mid(int startIndex, int length) const
OdString & format(const OdChar *formatString,...)
GLsizei const GLfloat * value
const OdChar * c_str() const
OdString spanExcluding(const OdChar *charSet) const