44#ifndef CCXX_NUMBERS_H_
45#define CCXX_NUMBERS_H_
51#ifndef CCXX_MISSING_H_
55#ifndef CCXX_STRCHAR_H_
106 {
return getValue();};
109 {
return getValue();};
167 Date(
char *str,
size_t size = 0);
168 Date(
int year,
unsigned month,
unsigned day);
180 void setDate(
const char *str,
size_t size = 0);
188 operator long()
const
189 {
return getValue();};
203 {
return !isValid();};
228 Time(
char *str,
size_t size = 0);
229 Time(
int hour,
int minute,
int second);
251 {
return getValue();};
265 {
return !isValid();};
284 Datetime(
int year,
unsigned month,
unsigned day,
int hour,
int minute,
int second);
319 {fromJulian(buffer);};
326#ifdef CCXX_NAMESPACES
The Date class uses a julian date representation of the current year, month, and day.
Definition numbers.h:149
void setDate(const char *str, size_t size=0)
int operator>=(const Date &date)
friend Date operator-(const long val, const Date &date)
int operator!=(const Date &date)
Date & operator-=(const long val)
long julian
Definition numbers.h:151
int operator<(const Date &date)
friend Date operator-(const Date &date, const long val)
int operator<=(const Date &date)
friend Date operator+(const Date &date, const long val)
unsigned getDayOfWeek(void) const
unsigned getMonth(void) const
unsigned getDay(void) const
Date(int year, unsigned month, unsigned day)
void toJulian(long year, long month, long day)
bool operator!() const
Definition numbers.h:202
long getValue(void) const
String operator()() const
time_t getDate(tm *buf) const
int operator>(const Date &date)
friend Date operator+(const long val, const Date &date)
Date & operator+=(const long val)
virtual void update(void)
A method to use to "post" any changed values when shadowing a mixed object class.
int operator==(const Date &date)
time_t getDate(void) const
char * getDate(char *buffer) const
Date(char *str, size_t size=0)
void fromJulian(char *buf) const
A number class that manipulates a string buffer that is also a date.
Definition numbers.h:316
void update(void)
Definition numbers.h:318
The Datetime class uses a julian date representation of the current year, month, and day and a intege...
Definition numbers.h:279
Datetime & operator+=(const Time &time)
Datetime & operator=(const Datetime datetime)
time_t getDatetime(void) const
Datetime & operator-=(const Time &time)
Datetime & operator-=(const Datetime &datetime)
Datetime(int year, unsigned month, unsigned day, int hour, int minute, int second)
String strftime(const char *format) const
char * getDatetime(char *buffer) const
int operator==(const Datetime &)
int operator<=(const Datetime &)
int operator<(const Datetime &)
Datetime(const char *str, size_t size=0)
Datetime & operator+=(const Datetime &datetime)
int operator>(const Datetime &)
int operator>=(const Datetime &)
int operator!=(const Datetime &)
A number manipulation class.
Definition numbers.h:86
char * buffer
Definition numbers.h:88
friend long operator-(const Number &num, long val)
long operator()()
Definition numbers.h:105
friend long operator+(const long val, const Number &num)
long operator-=(const long value)
int operator>(const Number &num)
friend long operator+(const Number &num, const long val)
int operator<(const Number &num)
unsigned size
Definition numbers.h:89
int operator==(const Number &num)
void setValue(long value)
int operator<=(const Number &num)
const char * getBuffer() const
Definition numbers.h:100
int operator>=(const Number &num)
Number(char *buffer, unsigned size)
Create an instance of a number.
friend long operator-(const long val, const Number &num)
long operator+=(const long value)
long operator=(const long value)
int operator!=(const Number &num)
This is a generic and portable string class.
Definition string.h:81
The Time class uses a integer representation of the current time.
Definition numbers.h:216
Time & operator-=(const int val)
long getValue(void) const
int operator>=(const Time &time)
String operator()() const
bool operator!() const
Definition numbers.h:264
virtual void update(void)
void fromSeconds(char *buf) const
friend Time operator+(const Time &time, const int val)
int getMinute(void) const
int operator<(const Time &time)
int operator!=(const Time &time)
int operator>(const Time &time)
tm * getTime(tm *buf) const
Time & operator+=(const int val)
int getSecond(void) const
int operator==(const Time &time)
char * getTime(char *buffer) const
friend Time operator-(const int val, const Time &time)
friend Time operator+(const Time &time1, const Time &time2)
Time(char *str, size_t size=0)
long seconds
Definition numbers.h:218
time_t getTime(void) const
friend Time operator-(const Time &time1, const Time &time2)
friend Time operator-(const Time &time, const int val)
void toSeconds(int hour, int minute, int second)
int operator<=(const Time &time)
void setTime(char *str, size_t size=0)
friend Time operator+(const int val, const Time &time)
Time(int hour, int minute, int second)
ZNumber(char *buf, unsigned size)
void setValue(long value)
long operator=(long value)
#define __EXPORT
Definition config.h:1045
substitute functions which may be missing in target platform libc.
Common and portable character string related functions.
Common C++ generic string class.
Synchronization and threading services.