#include <QdTime.h>
Public Types | |
enum | Sense_e { TIME_SENSE_NEGATIVE, NO_TIME_SENSE, TIME_SENSE_POSITIVE } |
enum | SetOption_e { START_TIME, END_TIME, CENTER_TIME, CENTRE_TIME = CENTER_TIME, SAME_START_TIME, SAME_END_TIME, SAME_CENTER_TIME, SAME_DURATION } |
typedef enum QDOS::TimeInterval::Sense_e | Sense |
typedef enum QDOS::TimeInterval::SetOption_e | SetOption |
Public Member Functions | |
TimeInterval () | |
TimeInterval (const TimeInterval &tint) | |
TimeInterval (const Time &st, const Time &ed, Sense option=NO_TIME_SENSE) | |
Time | start () const |
Time | end () const |
Time | start_abs () const |
Time | end_abs () const |
Time | duration () const |
Time | duration_abs () const |
Sense | get_sense () const |
TimeInterval & | operator= (const TimeInterval &tint) |
void | set (const Time &st, const Time &ed, Sense option=NO_TIME_SENSE) |
void | force_sense (Sense option=TIME_SENSE_POSITIVE) |
void | set_start (const Time &st, SetOption option=SAME_END_TIME) |
void | set_end (const Time &ed, SetOption option=SAME_START_TIME) |
void | set_duration (const Time &d, SetOption option=SAME_START_TIME) |
void | set_duration (const Time &t, const Time &d, SetOption option=START_TIME) |
void | reverse () |
TimeInterval & | operator>> (const Time &ttime) |
TimeInterval & | operator<< (const Time &ttime) |
void | shift_forward (double factor=1.0) |
void | shift_back (double factor=1.0) |
TimeInterval | int_intersect (const TimeInterval &ti) const |
TimeInterval | int_union (const TimeInterval &ti) const |
bool | contains (const Time &t) const |
bool | empty () const |
bool | operator== (const TimeInterval &ti) const |
bool | operator!= (const TimeInterval &ti) const |
string | iso_srep (const string &t_str=" ", const string &z_str="") const |
void | display () const |
Private Attributes | |
Time | _t1 |
Time | _t2 |
Friends | |
Vostream & | operator<< (Vostream &, const TimeInterval &) |
Vistream & | operator>> (Vistream &, TimeInterval &) |
typedef enum QDOS::TimeInterval::Sense_e QDOS::TimeInterval::Sense |
QDOS::TimeInterval::TimeInterval | ( | ) | [inline] |
QDOS::TimeInterval::TimeInterval | ( | const TimeInterval & | tint | ) | [inline] |
QDOS::TimeInterval::TimeInterval | ( | const Time & | st, | |
const Time & | ed, | |||
Sense | option = NO_TIME_SENSE | |||
) | [inline] |
bool QDOS::TimeInterval::contains | ( | const Time & | t | ) | const |
void QDOS::TimeInterval::display | ( | ) | const [inline] |
Time QDOS::TimeInterval::duration | ( | ) | const [inline] |
Time QDOS::TimeInterval::duration_abs | ( | ) | const [inline] |
bool QDOS::TimeInterval::empty | ( | ) | const [inline] |
Time QDOS::TimeInterval::end | ( | ) | const [inline] |
Time QDOS::TimeInterval::end_abs | ( | ) | const [inline] |
void QDOS::TimeInterval::force_sense | ( | Sense | option = TIME_SENSE_POSITIVE |
) | [inline] |
Sense QDOS::TimeInterval::get_sense | ( | ) | const [inline] |
TimeInterval QDOS::TimeInterval::int_intersect | ( | const TimeInterval & | ti | ) | const |
TimeInterval QDOS::TimeInterval::int_union | ( | const TimeInterval & | ti | ) | const |
string QDOS::TimeInterval::iso_srep | ( | const string & | t_str = " " , |
|
const string & | z_str = "" | |||
) | const [inline] |
bool QDOS::TimeInterval::operator!= | ( | const TimeInterval & | ti | ) | const [inline] |
TimeInterval& QDOS::TimeInterval::operator<< | ( | const Time & | ttime | ) | [inline] |
TimeInterval& QDOS::TimeInterval::operator= | ( | const TimeInterval & | tint | ) | [inline] |
Reimplemented in QDOS::QdTimeInterval.
bool QDOS::TimeInterval::operator== | ( | const TimeInterval & | ti | ) | const [inline] |
TimeInterval& QDOS::TimeInterval::operator>> | ( | const Time & | ttime | ) | [inline] |
void QDOS::TimeInterval::reverse | ( | ) | [inline] |
void QDOS::TimeInterval::set | ( | const Time & | st, | |
const Time & | ed, | |||
Sense | option = NO_TIME_SENSE | |||
) | [inline] |
void QDOS::TimeInterval::set_duration | ( | const Time & | t, | |
const Time & | d, | |||
SetOption | option = START_TIME | |||
) |
void QDOS::TimeInterval::shift_back | ( | double | factor = 1.0 |
) | [inline] |
void QDOS::TimeInterval::shift_forward | ( | double | factor = 1.0 |
) | [inline] |
Time QDOS::TimeInterval::start | ( | ) | const [inline] |
Time QDOS::TimeInterval::start_abs | ( | ) | const [inline] |
Vostream& operator<< | ( | Vostream & | v_os, | |
const TimeInterval & | tint | |||
) | [friend] |
Vistream& operator>> | ( | Vistream & | v_is, | |
TimeInterval & | tint | |||
) | [friend] |
Time QDOS::TimeInterval::_t1 [private] |
Time QDOS::TimeInterval::_t2 [private] |