Go to the documentation of this file.
27 #ifndef _UCOMMON_NUMBERS_H_
28 #define _UCOMMON_NUMBERS_H_
30 #ifndef _UCOMMON_CONFIG_H_
71 inline const char *
c_str()
const {
93 inline operator long()
const {
101 inline operator char*()
const {
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;
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);
ZNumber znumber_t
A convenience type for znumber.
long operator=(long value)
Assign a value to the number.
A number manipulation class that maintains a zero lead filled string.
A number manipulation class.
long operator=(const Number &number)
Assign another number to this number.
T &() min(T &o1, T &o2)
Convenience function to return min of two objects.
Number(char *buffer, unsigned size)
Create an instance of a number.
long operator=(long value)
Assign number from value.
Number number_t
A convenience type for number.
long operator-=(const long value)
Subtract a value from the number.
const T abs(const T &value)
Template for absolute value of a type.
void set(long value)
Set string based on a new value.
T &() max(T &o1, T &o2)
Convenience function to return max of two objects.
long operator+=(const long value)
Add a value to the number.
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.
long operator++()
Increment the number object.
long get() const
Get value of string buffer as a long integer.
long operator--()
Decrement the number object.
const char * c_str() const
Get string buffer representing the number.
ZNumber(char *pointer, unsigned size)
Create a number class for zero fill.
Generic smart pointer class.
void set(long value)
Set value of zero filled number.