#include <tstamp.h>
Public Types | |
enum | resolution_type { resolution_year, resolution_month, resolution_day, resolution_hour, resolution_minute, resolution_second } |
Public Member Functions | |
timestamp () | |
C'tor. | |
timestamp (const timestamp &a_t) | |
C'tor. | |
timestamp (const int a_year, const int a_month, const int a_day, const int a_hour, const int a_minute, const int a_second) | |
C'tor. | |
timestamp (const std::string &a_s) | |
C'tor. | |
void | set (void) |
Set the timestamp to the current time and date. | |
void | assign (const timestamp &a_t) |
Set the timestamp to the value of another timestamp. | |
void | assign (const int a_year, const int a_month, const int a_day, const int a_hour, const int a_minute, const int a_second) |
Set the timestamp. | |
void | assign (const std::string &a_s) |
Set the timestamp from a string. | |
void | clear (void) |
Clear the timestamp. | |
void | resolution (resolution_type a_r) |
Set the timestamp resolution. | |
resolution_type | resolution (void) const |
Return the timestamp resolution. | |
const std::string | str (void) const |
Generate a string. | |
const std::string | str (const resolution_type a_resolution) const |
Generate a string. | |
int | second (void) const |
Return the timestamp second. | |
int | minute (void) const |
Return the timestamp minute. | |
int | hour (void) const |
Return the timestamp hour. | |
int | day (void) const |
Return the timestamp day. | |
int | month (void) const |
Return the timestamp month. | |
int | year (void) const |
Return the timestamp year. | |
timestamp & | operator= (const timestamp &a_t) |
Assignment. | |
timestamp & | operator= (const std::string &a_s) |
Assignment. | |
bool | operator< (const timestamp &a_t) const |
Comparison. | |
bool | operator> (const timestamp &a_t) const |
Comparison. | |
bool | operator== (const timestamp &a_t) const |
Comparison. | |
Private Member Functions | |
const std::string | make_str_ (const int a_resolution) const |
Generate a string. | |
Private Attributes | |
int | m_year |
int | m_month |
int | m_day |
int | m_hour |
int | m_minute |
int | m_second |
resolution_type | m_resolution |
Definition at line 13 of file tstamp.h.
|
|
|
C'tor.
Definition at line 23 of file tstamp.cc. References clear(), and set(). Here is the call graph for this function: |
|
C'tor.
Definition at line 30 of file tstamp.cc. References assign(), and clear(). Here is the call graph for this function: |
|
C'tor.
Definition at line 37 of file tstamp.cc. References assign(), and clear(). Here is the call graph for this function: |
|
C'tor.
Definition at line 51 of file tstamp.cc. References assign(), and clear(). Here is the call graph for this function: |
|
Set the timestamp from a string.
Definition at line 158 of file tstamp.cc. References assign(), ERROR, is_timestamp(), resolution(), resolution_day, resolution_hour, resolution_minute, resolution_month, resolution_second, resolution_year, str(), TRY, and TRY_nomem. Here is the call graph for this function: |
|
Set the timestamp.
Definition at line 91 of file tstamp.cc. References ERROR, m_day, m_hour, m_minute, m_month, m_second, m_year, and TRY_nomem. |
|
Set the timestamp to the value of another timestamp.
Definition at line 79 of file tstamp.cc. References day(), hour(), m_day, m_hour, m_minute, m_month, m_resolution, m_second, m_year, minute(), month(), resolution(), second(), and year(). Referenced by assign(), configuration_manager::init(), operator=(), test3(), and timestamp(). Here is the call graph for this function: |
|
Clear the timestamp.
Definition at line 290 of file tstamp.cc. References m_day, m_hour, m_minute, m_month, m_resolution, m_second, m_year, and resolution_day. Referenced by timestamp(). |
|
Return the timestamp day.
Definition at line 426 of file tstamp.cc. References m_day. Referenced by assign(), make_str_(), test1(), test2(), and test3(). |
|
Return the timestamp hour.
Definition at line 420 of file tstamp.cc. References m_hour. Referenced by assign(), make_str_(), test1(), test2(), and test3(). |
|
Generate a string.
Definition at line 308 of file tstamp.cc. References estring::align(), day(), estring::fmt_str(), hour(), estring::left_fillchar(), minute(), month(), estring::reset(), resolution_day, resolution_hour, resolution_minute, resolution_month, resolution_second, resolution_year, estring::right, second(), str(), TRY, TRY_nomem, estring::width(), and year(). Referenced by str(). Here is the call graph for this function: |
|
Return the timestamp minute.
Definition at line 414 of file tstamp.cc. References m_minute. Referenced by assign(), make_str_(), test1(), test2(), and test3(). |
|
Return the timestamp month.
Definition at line 432 of file tstamp.cc. References m_month. Referenced by assign(), make_str_(), test1(), test2(), and test3(). |
|
Comparison.
Definition at line 466 of file tstamp.cc. References m_resolution, resolution(), and str(). Here is the call graph for this function: |
|
Assignment.
Definition at line 458 of file tstamp.cc. References assign(). Here is the call graph for this function: |
|
Assignment.
Definition at line 450 of file tstamp.cc. References assign(). Here is the call graph for this function: |
|
Comparison.
Definition at line 490 of file tstamp.cc. References m_resolution, and str(). Here is the call graph for this function: |
|
Comparison.
Definition at line 478 of file tstamp.cc. References m_resolution, and str(). Here is the call graph for this function: |
|
Return the timestamp resolution.
Definition at line 444 of file tstamp.cc. References m_resolution. Referenced by assign(). |
|
Set the timestamp resolution.
Definition at line 302 of file tstamp.cc. References m_resolution. Referenced by assign(), operator<(), global_parser::parse_timestamp_resolution(), test3(), and configuration_manager::timestamp_resolution(). |
|
Return the timestamp second.
Definition at line 408 of file tstamp.cc. References m_second. Referenced by assign(), make_str_(), test1(), test2(), and test3(). |
|
Set the timestamp to the current time and date.
Definition at line 58 of file tstamp.cc. References ERROR, m_day, m_hour, m_minute, m_month, m_resolution, m_second, m_year, and resolution_day. Referenced by configuration_manager::clear(), test2(), and timestamp(). |
|
Generate a string.
Definition at line 397 of file tstamp.cc. References make_str_(), str(), and TRY_nomem. Here is the call graph for this function: |
|
Generate a string.
Definition at line 387 of file tstamp.cc. References m_resolution, make_str_(), and TRY_nomem. Referenced by assign(), make_str_(), operator<(), operator==(), operator>(), job_parser::parse_clear(), global_parser::parse_delete_old_log_files(), global_parser::parse_delete_old_report_files(), global_parser::parse_error_logging_level(), global_parser::parse_logging_level(), job_parser::parse_rsync_behavior(), job_parser::parse_rsync_connection_type(), job_parser::parse_rsync_hardlink(), job_parser::parse_rsync_remote_port(), job_parser::parse_rsync_retry_count(), job_parser::parse_rsync_timeout(), global_parser::parse_timestamp_resolution(), global_parser::parse_vault_locking(), global_parser::parse_vault_overflow_behavior(), global_parser::parse_vault_selection_behavior(), str(), and test1(). Here is the call graph for this function: |
|
Return the timestamp year.
Definition at line 438 of file tstamp.cc. References m_year. Referenced by assign(), make_str_(), test1(), test2(), and test3(). |
|
|
|
|
|
|
|
|
|
Definition at line 74 of file tstamp.h. Referenced by assign(), clear(), operator<(), operator==(), operator>(), resolution(), set(), and str(). |
|
|
|
|