Go to the documentation of this file.
43 #ifndef CCXX_NUMBERS_H_
44 #define CCXX_NUMBERS_H_
46 #ifndef CCXX_THREAD_H_
50 #ifndef CCXX_MISSING_H_
54 #ifndef CCXX_STRCHAR_H_
58 #ifndef CCXX_STRING_H_
62 #ifndef CCXX_THREAD_H_
68 #ifdef CCXX_NAMESPACES
96 Number(
char *buffer,
unsigned size);
98 void setValue(
long value);
99 const char *getBuffer()
const
102 long getValue()
const;
105 {
return getValue();};
108 {
return getValue();};
113 long operator=(
const long value);
114 long operator+=(
const long value);
115 long operator-=(
const long value);
118 int operator==(
const Number &num);
119 int operator!=(
const Number &num);
120 int operator<(
const Number &num);
121 int operator<=(
const Number &num);
122 int operator>(
const Number &num);
123 int operator>=(
const Number &num);
125 friend long operator+(
const Number &num,
const long val);
126 friend long operator+(
const long val,
const Number &num);
127 friend long operator-(
const Number &num,
long val);
128 friend long operator-(
const long val,
const Number &num);
134 ZNumber(
char *buf,
unsigned size);
135 void setValue(
long value);
136 long operator=(
long value);
153 void toJulian(
long year,
long month,
long day);
154 void fromJulian(
char *buf)
const;
160 virtual void update(
void);
166 Date(
char *str,
size_t size = 0);
167 Date(
int year,
unsigned month,
unsigned day);
171 int getYear(
void)
const;
172 unsigned getMonth(
void)
const;
173 unsigned getDay(
void)
const;
174 unsigned getDayOfWeek(
void)
const;
175 char *getDate(
char *buffer)
const;
176 time_t getDate(
void)
const;
177 time_t getDate(tm *buf)
const;
178 long getValue(
void)
const;
179 void setDate(
const char *str,
size_t size = 0);
180 bool isValid(
void)
const;
182 friend Date operator+(
const Date &date,
const long val);
183 friend Date operator-(
const Date &date,
const long val);
184 friend Date operator+(
const long val,
const Date &date);
185 friend Date operator-(
const long val,
const Date &date);
187 operator long()
const
188 {
return getValue();};
190 String operator()()
const;
193 Date& operator+=(
const long val);
194 Date& operator-=(
const long val);
195 int operator==(
const Date &date);
196 int operator!=(
const Date &date);
197 int operator<(
const Date &date);
198 int operator<=(
const Date &date);
199 int operator>(
const Date &date);
200 int operator>=(
const Date &date);
201 bool operator!()
const
202 {
return !isValid();};
220 void toSeconds(
int hour,
int minute,
int second);
221 void fromSeconds(
char *buf)
const;
222 virtual void update(
void);
227 Time(
char *str,
size_t size = 0);
228 Time(
int hour,
int minute,
int second);
232 long getValue(
void)
const;
233 int getHour(
void)
const;
234 int getMinute(
void)
const;
235 int getSecond(
void)
const;
236 char *getTime(
char *buffer)
const;
237 time_t getTime(
void)
const;
238 tm *getTime(tm *buf)
const;
239 void setTime(
char *str,
size_t size = 0);
240 bool isValid(
void)
const;
242 friend Time operator+(
const Time &time1,
const Time &time2);
243 friend Time operator-(
const Time &time1,
const Time &time2);
244 friend Time operator+(
const Time &time,
const int val);
245 friend Time operator-(
const Time &time,
const int val);
246 friend Time operator+(
const int val,
const Time &time);
247 friend Time operator-(
const int val,
const Time &time);
250 {
return getValue();};
252 String operator()()
const;
255 Time& operator+=(
const int val);
256 Time& operator-=(
const int val);
257 int operator==(
const Time &time);
258 int operator!=(
const Time &time);
259 int operator<(
const Time &time);
260 int operator<=(
const Time &time);
261 int operator>(
const Time &time);
262 int operator>=(
const Time &time);
263 bool operator!()
const
264 {
return !isValid();};
282 Datetime(
const char *str,
size_t size = 0);
283 Datetime(
int year,
unsigned month,
unsigned day,
284 int hour,
int minute,
int second);
288 char *getDatetime(
char *buffer)
const;
289 time_t getDatetime(
void)
const;
290 bool isValid(
void)
const;
304 bool operator!()
const;
306 String strftime(
const char *format)
const;
319 {fromJulian(buffer);};
326 #ifdef CCXX_NAMESPACES