VMime
|
Public Types | |
enum | TimeZones { GMT_12 = -720, GMT_11 = -660, GMT_10 = -600, GMT_9 = -540, GMT_8 = -480, GMT_7 = -420, GMT_6 = -360, GMT_5 = -300, GMT_4 = -240, GMT_3 = -180, GMT_2 = -120, GMT_1 = -60, GMT = 0, GMT1 = 60, GMT2 = 120, GMT3 = 180, GMT4 = 240, GMT5 = 300, GMT6 = 360, GMT7 = 420, GMT8 = 480, GMT9 = 540, GMT10 = 600, GMT11 = 660, GMT12 = 720, UT = GMT, EST = GMT_5, EDT = GMT_4, CST = GMT_6, CDT = GMT_5, MST = GMT_7, MDT = GMT_6, PST = GMT_8, PDT = GMT_7, A = GMT_1, B = GMT_2, C = GMT_3, D = GMT_4, E = GMT_5, F = GMT_6, G = GMT_7, H = GMT_8, I = GMT_9, K = GMT_10, L = GMT_11, M = GMT_12, N = GMT1, O = GMT2, P = GMT3, Q = GMT4, R = GMT5, S = GMT6, T = GMT7, U = GMT8, V = GMT9, W = GMT10, X = GMT11, Y = GMT12, Z = GMT } |
enum | Months { JANUARY = 1, FEBRUARY = 2, MARCH = 3, APRIL = 4, MAY = 5, JUNE = 6, JULY = 7, AUGUST = 8, SEPTEMBER = 9, OCTOBER = 10, NOVEMBER = 11, DECEMBER = 12, JAN = 1, FEB = 2, MAR = 3, APR = 4, JUN = 6, JUL = 7, AUG = 8, SEP = 9, OCT = 10, NOV = 11, DEC = 12 } |
enum | DaysOfWeek { SUNDAY = 0, MONDAY = 1, TUESDAY = 2, WEDNESDAY = 3, THURSDAY = 4, FRIDAY = 5, SATURDAY = 6, SUN = 0, MON = 1, TUE = 2, WED = 3, THU = 4, FRI = 5, SAT = 6 } |
Public Member Functions | |
datetime () | |
datetime (const int year, const int month, const int day) | |
datetime (const int year, const int month, const int day, const int hour, const int minute, const int second, const int zone=GMT) | |
datetime (const datetime &d) | |
datetime (const string &date) | |
datetime (const time_t t, const int zone=GMT) | |
~datetime () | |
int | getYear () const |
int | getMonth () const |
int | getDay () const |
int | getHour () const |
int | getMinute () const |
int | getSecond () const |
int | getZone () const |
int | getWeekDay () const |
int | getWeek () const |
void | getTime (int &hour, int &minute, int &second, int &zone) const |
void | getTime (int &hour, int &minute, int &second) const |
void | getDate (int &year, int &month, int &day) const |
void | setYear (const int year) |
void | setMonth (const int month) |
void | setDay (const int day) |
void | setHour (const int hour) |
void | setMinute (const int minute) |
void | setSecond (const int second) |
void | setZone (const int zone) |
void | setTime (const int hour=0, const int minute=0, const int second=0, const int zone=GMT) |
void | setDate (const int year, const int month, const int day) |
datetime & | operator= (const datetime &other) |
datetime & | operator= (const string &s) |
void | copyFrom (const component &other) |
shared_ptr< component > | clone () const |
bool | operator== (const datetime &other) const |
bool | operator!= (const datetime &other) const |
bool | operator< (const datetime &other) const |
bool | operator<= (const datetime &other) const |
bool | operator> (const datetime &other) const |
bool | operator>= (const datetime &other) const |
const std::vector< shared_ptr < component > > | getChildComponents () |
Public Member Functions inherited from headerFieldValue | |
size_t | getGeneratedSize (const generationContext &ctx) |
Public Member Functions inherited from component | |
component () | |
virtual | ~component () |
void | parse (const string &buffer) |
void | parse (const parsingContext &ctx, const string &buffer) |
void | parse (shared_ptr< utility::inputStream > inputStream, const size_t length) |
void | parse (const string &buffer, const size_t position, const size_t end, size_t *newPosition=NULL) |
void | parse (const parsingContext &ctx, const string &buffer, const size_t position, const size_t end, size_t *newPosition=NULL) |
void | parse (shared_ptr< utility::inputStream > inputStream, const size_t position, const size_t end, size_t *newPosition=NULL) |
void | parse (const parsingContext &ctx, shared_ptr< utility::inputStream > inputStream, const size_t position, const size_t end, size_t *newPosition=NULL) |
virtual const string | generate (const size_t maxLineLength=lineLengthLimits::infinite, const size_t curLinePos=0) const |
virtual void | generate (utility::outputStream &outputStream, const size_t curLinePos=0, size_t *newLinePos=NULL) const |
virtual void | generate (const generationContext &ctx, utility::outputStream &outputStream, const size_t curLinePos=0, size_t *newLinePos=NULL) const |
size_t | getParsedOffset () const |
size_t | getParsedLength () const |
Static Public Member Functions | |
static const datetime | now () |
Protected Member Functions | |
void | parseImpl (const parsingContext &ctx, const string &buffer, const size_t position, const size_t end, size_t *newPosition=NULL) |
void | generateImpl (const generationContext &ctx, utility::outputStream &os, const size_t curLinePos=0, size_t *newLinePos=NULL) const |
Protected Member Functions inherited from component | |
void | setParsedBounds (const size_t start, const size_t end) |
virtual void | parseImpl (const parsingContext &ctx, shared_ptr< utility::parserInputStreamAdapter > parser, const size_t position, const size_t end, size_t *newPosition=NULL) |
Protected Member Functions inherited from object | |
object () | |
object (const object &) | |
object & | operator= (const object &) |
virtual | ~object () |
Date and time (basic type).
enum DaysOfWeek |
enum Months |
enum TimeZones |
datetime | ( | ) |
datetime | ( | const int | year, |
const int | month, | ||
const int | day | ||
) |
datetime | ( | const int | year, |
const int | month, | ||
const int | day, | ||
const int | hour, | ||
const int | minute, | ||
const int | second, | ||
const int | zone = GMT |
||
) |
References component::parse().
~datetime | ( | ) |
|
virtual |
|
virtual |
Replace data in this component by data in other component.
Both components must be of the same type.
std::bad_cast_exception | if the components are not of the same (dynamic) type |
other | other component to copy data from |
Implements component.
Referenced by datetime::operator=().
|
protectedvirtual |
Implements component.
|
virtual |
Return the list of children of this component.
Implements component.
void getDate | ( | int & | year, |
int & | month, | ||
int & | day | ||
) | const |
int getDay | ( | ) | const |
int getHour | ( | ) | const |
int getMinute | ( | ) | const |
int getMonth | ( | ) | const |
int getSecond | ( | ) | const |
void getTime | ( | int & | hour, |
int & | minute, | ||
int & | second, | ||
int & | zone | ||
) | const |
void getTime | ( | int & | hour, |
int & | minute, | ||
int & | second | ||
) | const |
int getWeek | ( | ) | const |
References datetimeUtils::getWeekOfYear().
int getWeekDay | ( | ) | const |
References datetimeUtils::getDayOfWeek().
int getYear | ( | ) | const |
int getZone | ( | ) | const |
Referenced by datetimeUtils::toLocalTime(), and datetimeUtils::toUniversalTime().
|
static |
bool operator!= | ( | const datetime & | other | ) | const |
References datetimeUtils::toUniversalTime().
bool operator< | ( | const datetime & | other | ) | const |
References datetimeUtils::toUniversalTime().
bool operator<= | ( | const datetime & | other | ) | const |
References datetimeUtils::toUniversalTime().
References datetime::copyFrom().
References component::parse().
bool operator== | ( | const datetime & | other | ) | const |
References datetimeUtils::toUniversalTime().
bool operator> | ( | const datetime & | other | ) | const |
References datetimeUtils::toUniversalTime().
bool operator>= | ( | const datetime & | other | ) | const |
References datetimeUtils::toUniversalTime().
|
protectedvirtual |
Reimplemented from component.
References vmime::begin(), vmime::end(), parserHelpers::isAlpha(), parserHelpers::isDigit(), parserHelpers::isSpace(), and parserHelpers::toLower().
void setDate | ( | const int | year, |
const int | month, | ||
const int | day | ||
) |
void setDay | ( | const int | day | ) |
void setHour | ( | const int | hour | ) |
void setMinute | ( | const int | minute | ) |
void setMonth | ( | const int | month | ) |
References vmime::lineLengthLimits::max.
void setSecond | ( | const int | second | ) |
void setTime | ( | const int | hour = 0 , |
const int | minute = 0 , |
||
const int | second = 0 , |
||
const int | zone = GMT |
||
) |
void setYear | ( | const int | year | ) |
void setZone | ( | const int | zone | ) |
Referenced by datetimeUtils::toLocalTime(), and datetimeUtils::toUniversalTime().