27 #ifndef _UCOMMON_NUMBERS_H_ 28 #define _UCOMMON_NUMBERS_H_ 30 #ifndef _UCOMMON_CONFIG_H_ 59 Number(
char *buffer,
unsigned size);
71 inline const char *
c_str()
const {
93 inline operator long()
const {
101 inline operator char*()
const {
110 long operator=(
long value);
117 long operator=(
const Number& number);
124 long operator+=(
const long value);
131 long operator-=(
const long value);
145 inline bool operator==(
const long value)
const {
146 return get() == value;
149 inline bool operator!=(
const long value)
const {
150 return get() != value;
153 inline bool operator<(
const long value)
const {
154 return get() < value;
157 inline bool operator>(
const long value)
const {
158 return get() > value;
161 inline bool operator<=(
const long value)
const {
162 return get() <= value;
165 inline bool operator>=(
const long value)
const {
166 return get() >= value;
191 void set(
long value);
198 long operator=(
long value);
217 inline const T
abs(
const T& value)
232 inline const T (
min)(
const T& v1,
const T& v2)
234 return ((v1 < v2) ? v1 : v2);
244 inline const T (
max)(
const T& v1,
const T& v2)
246 return ((v1 > v2) ? v1 : v2);
T &() max(T &o1, T &o2)
Convenience function to return max of two objects.
const char * c_str() const
Get string buffer representing the number.
A number manipulation class that maintains a zero lead filled string.
const T abs(const T &value)
Template for absolute value of a type.
T &() min(T &o1, T &o2)
Convenience function to return min of two objects.
Various miscellaneous platform specific headers and defines.
Common namespace for all ucommon objects.
long operator()() const
Get value of string buffer as expression of object.
Number number_t
A convenience type for number.
A number manipulation class.
ZNumber znumber_t
A convenience type for znumber.
Generic smart pointer class.