Falaise
4.0.1
SuperNEMO Software Toolkit
|
A class to handle time stamp. More...
#include <falaise/snemo/datamodels/timestamp.h>
Public Member Functions | |
int64_t | get_seconds () const |
Return the number of seconds. More... | |
void | set_seconds (int64_t) |
Set the number of seconds. More... | |
int64_t | get_picoseconds () const |
Return the number of picoseconds. More... | |
void | set_picoseconds (int64_t) |
Set the number of picoseconds. More... | |
timestamp () | |
Constructor. More... | |
timestamp (int64_t sec_, int64_t picosec_) | |
Overloaded constructor. More... | |
virtual | ~timestamp () |
Destructor. More... | |
bool | is_valid () const |
Check if the timestamp object is valid. More... | |
void | invalidate () |
Invalidate the timestamp object. More... | |
int | compare (const timestamp &) const |
Compare with another timestamp. More... | |
double | to_real () const |
Convert timestamp to real value (explicit time unit) More... | |
std::string | to_string () const |
Format time stamp as string object and return it. More... | |
void | to_string (std::string &) const |
Format time stamp as string object and return it as reference. More... | |
void | from_string (const std::string &) |
Parse time from string object and set the timestamp object accordingly. More... | |
Public Member Functions inherited from datatools::i_serializable | |
i_serializable () | |
virtual | ~i_serializable () |
virtual const std::string & | get_serial_tag () const=0 |
Static Public Attributes | |
static const int64_t | INVALID_SECONDS |
static const int64_t | INVALID_PICOSECONDS |
static const char | IO_FORMAT_OPEN |
static const char | IO_FORMAT_SEP |
static const char | IO_FORMAT_CLOSE |
static const char | IO_FORMAT_INVALID |
Friends | |
bool | operator== (const timestamp &, const timestamp &) |
bool | operator< (const timestamp &, const timestamp &) |
bool | operator> (const timestamp &, const timestamp &) |
bool | operator<= (const timestamp &, const timestamp &) |
bool | operator>= (const timestamp &, const timestamp &) |
std::ostream & | operator<< (std::ostream &, const timestamp &) |
std::istream & | operator>> (std::istream &, timestamp &) |
A class to handle time stamp.
snemo::datamodel::timestamp::timestamp | ( | ) |
Constructor.
snemo::datamodel::timestamp::timestamp | ( | int64_t | sec_, |
int64_t | picosec_ | ||
) |
Overloaded constructor.
|
virtual |
Destructor.
Compare with another timestamp.
void snemo::datamodel::timestamp::from_string | ( | const std::string & | ) |
Parse time from string object and set the timestamp object accordingly.
int64_t snemo::datamodel::timestamp::get_picoseconds | ( | ) | const |
Return the number of picoseconds.
int64_t snemo::datamodel::timestamp::get_seconds | ( | ) | const |
Return the number of seconds.
void snemo::datamodel::timestamp::invalidate | ( | ) |
Invalidate the timestamp object.
bool snemo::datamodel::timestamp::is_valid | ( | ) | const |
Check if the timestamp object is valid.
void snemo::datamodel::timestamp::set_picoseconds | ( | int64_t | ) |
Set the number of picoseconds.
void snemo::datamodel::timestamp::set_seconds | ( | int64_t | ) |
Set the number of seconds.
double snemo::datamodel::timestamp::to_real | ( | ) | const |
Convert timestamp to real value (explicit time unit)
std::string snemo::datamodel::timestamp::to_string | ( | ) | const |
Format time stamp as string object and return it.
void snemo::datamodel::timestamp::to_string | ( | std::string & | ) | const |
Format time stamp as string object and return it as reference.
|
friend |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |