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
200 static int toInt(
const OdString& sValue,
int nMinValid = INT_MIN,
int nMaxValid = INT_MAX);
205 static double number(
const OdChar*& buf,
bool* pHasDot = 0,
bool* pHasExponent = 0);
209 value = double(floor(
value * denominator + 0.5)) / double(denominator);
210 entier = int(floor(
value));
211 numerator = int((
value - entier) *
double(denominator));
212 while((numerator % 2) == 0 && (numerator != 0))
222 for(
int i = 0; i < prec; ++i)
229 return base_denominator(prec, 10.);
234 return (c >=
'0' && c <=
'9');
244 for(
int i = prec; i >= 5; i--)
267 static void decomp(
double v,
int& degs,
int& mins,
double& secs,
int prec);
313 const OdChar *pBuffer =
string.c_str();
316 if (*pBuffer >=
'0' && *pBuffer <=
'9')
318 else if (*pBuffer ==
'+' || *pBuffer ==
'-')
324 else if (*pBuffer == delim && nDigits > 0 && nSpec <= 1)
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,...)
const OdChar * c_str() const
OdString spanExcluding(const OdChar *charSet) const
GLenum GLint GLint * precision
GLsizei const GLfloat * value