26 #ifndef _UCOMMON_NUMBERS_H_
27 #define _UCOMMON_NUMBERS_H_
29 #ifndef _UCOMMON_CONFIG_H_
58 Number(
char *buffer,
unsigned size);
70 inline const char *
c_str()
const
90 inline operator long()
97 inline operator char*()
105 long operator=(
long value);
112 long operator=(
const Number& number);
119 long operator+=(
const long value);
126 long operator-=(
const long value);
140 inline bool operator==(
const long value)
const
141 {
return get() == value;}
143 inline bool operator!=(
const long value)
const
144 {
return get() != value;}
146 inline bool operator<(
const long value)
const
147 {
return get() < value;}
149 inline bool operator>(
const long value)
const
150 {
return get() > value;}
152 inline bool operator<=(
const long value)
const
153 {
return get() <= value;}
155 inline bool operator>=(
const long value)
const
156 {
return get() >= value;}
180 void set(
long value);
206 inline const T
abs(
const T& value)
221 inline const T (
min)(
const T& v1,
const T& v2)
223 return ((v1 < v2) ? v1 : v2);
233 inline const T (
max)(
const T& v1,
const T& v2)
235 return ((v1 > v2) ? v1 : v2);
long operator=(long value)
Assign a value to the number.
const char * c_str() const
Get string buffer representing the number.
A number manipulation class that maintains a zero lead filled string.
Number number_t
A convenience type for number.
void set(long value)
Set string based on a new value.
Generic smart pointer class.
long operator()()
Get value of string buffer as expression of object.
ZNumber znumber_t
A convenience type for znumber.
const T() max(const T &v1, const T &v2)
Template for max value of a type.
A number manipulation class.
Various miscellaneous platform specific headers and defines.
const T() min(const T &v1, const T &v2)
Template for min value of a type.
const T abs(const T &value)
Template for absolute value of a type.