This class encapsulates a time interval. More...
#include <DwmTimeInterval64.hh>
Public Member Functions | |
| TimeInterval64 () | |
| Contructor. | |
| TimeInterval64 (const TimeValue64 &start, const TimeValue64 &end) | |
| Construct from a start and end time. | |
| TimeInterval64 (const TimeInterval64 &timeInterval) | |
| Copy constructor. | |
| TimeInterval64 (const TimeInterval &timeInterval) | |
| const TimeValue64 & | Start () const |
| Returns the start time. | |
| const TimeValue64 & | Start (const TimeValue64 &start) |
| Sets and returns the start time. | |
| const TimeValue64 & | End () const |
| Returns the end time. | |
| const TimeValue64 & | End (const TimeValue64 &end) |
| Sets and returns the end time. | |
| bool | operator== (const TimeInterval64 &ti) const |
| operator == | |
| TimeValue64 | Duration () const |
| bool | Contains (const TimeValue64 &tv) const |
Returns true if the TimeValue64 tv falls within the time interval, i.e. | |
| bool | Contains (const TimeInterval64 &ti) const |
Returns true if the TimeInterval ti is completely contained within our time interval. | |
| bool | Overlaps (const TimeInterval64 &ti) const |
Returns true if ti overlaps the time interval. | |
| bool | Adjacent (const TimeInterval64 &ti) const |
Returns true if ti is immediately adjacent our time interval, i.e. | |
| uint64_t | StreamedLength () const |
| Returns the length of the time insterval, in bytes. | |
| std::istream & | Read (std::istream &is) |
| Reads the time interval from an istream. Returns the istream. | |
| std::ostream & | Write (std::ostream &os) const |
| Writes the time interval to an ostream. Returns the ostream. | |
| size_t | Read (FILE *f) |
| Reads the time interval from a FILE pointer. | |
| size_t | Write (FILE *f) const |
| Writes the time interval to a FILE pointer. | |
| ssize_t | Read (int fd) |
| Reads the time interval from a file descriptor. | |
| ssize_t | Write (int fd) const |
| Wries the time interval to a file descriptor. | |
| int | Read (gzFile gzf) |
| Reads the time interval from a gzFile. | |
| int | Write (gzFile gzf) const |
| Writes the time interval to a gzFile. | |
| int | BZRead (BZFILE *bzf) |
| Reads the time interval from a BZFILE pointer. | |
| int | BZWrite (BZFILE *bzf) const |
| Writes the time interval to a BZFILE pointer. | |
This class encapsulates a time interval.
| bool Dwm::TimeInterval64::Adjacent | ( | const TimeInterval64 & | ti | ) | const |
Returns true if ti is immediately adjacent our time interval, i.e.
our start is equal to ti.End() or our end is equal to ti.Start()
| int Dwm::TimeInterval64::BZRead | ( | BZFILE * | bzf | ) |
Reads the time interval from a BZFILE pointer.
Returns the number of bytes read on success, -1 on failure.
| int Dwm::TimeInterval64::BZWrite | ( | BZFILE * | bzf | ) | const |
Writes the time interval to a BZFILE pointer.
Returns the number of bytes written on success, -1 on failure.
| bool Dwm::TimeInterval64::Contains | ( | const TimeValue64 & | tv | ) | const |
Returns true if the TimeValue64 tv falls within the time interval, i.e.
\tv is greater than or equal to the start and less than or equal to the end.
| size_t Dwm::TimeInterval64::Read | ( | FILE * | f | ) |
Reads the time interval from a FILE pointer.
Returns 1 on success, 0 on failure.
| int Dwm::TimeInterval64::Read | ( | gzFile | gzf | ) |
Reads the time interval from a gzFile.
Returns the number of bytes read on success, -1 on failure.
| ssize_t Dwm::TimeInterval64::Read | ( | int | fd | ) |
Reads the time interval from a file descriptor.
Returns the number of bytes read on success, -1 on failure.
| uint64_t Dwm::TimeInterval64::StreamedLength | ( | ) | const |
Returns the length of the time insterval, in bytes.
This is used for some I/O functions.
| size_t Dwm::TimeInterval64::Write | ( | FILE * | f | ) | const |
Writes the time interval to a FILE pointer.
Returns 1 on success, 0 on failure.
| int Dwm::TimeInterval64::Write | ( | gzFile | gzf | ) | const |
Writes the time interval to a gzFile.
Returns the number of bytes written on success, -1 on failure.
| ssize_t Dwm::TimeInterval64::Write | ( | int | fd | ) | const |
Wries the time interval to a file descriptor.
Returns the number of bytes written on success, -1 on failure.