EPANET-RTX  1.1
real-time extension for the EPANET toolkit
Public Types | Public Member Functions | List of all members
RTX::IrregularClock Class Reference
Inheritance diagram for RTX::IrregularClock:
[legend]
Collaboration diagram for RTX::IrregularClock:
[legend]

Public Types

typedef boost::shared_ptr
< IrregularClock
sharedPointer
 
- Public Types inherited from RTX::Clock
typedef boost::shared_ptr< ClocksharedPointer
 

Public Member Functions

 IrregularClock (PointRecord::sharedPointer pointRecord, std::string name)
 
virtual bool isCompatibleWith (Clock::sharedPointer clock)
 Test for compatibility (passed clock parameter may be faster, but must fall on even steps) More...
 
virtual bool isValid (time_t time)
 Test for validity of time value (if the passed value falls on this clock's regular steps) More...
 
virtual time_t timeAfter (time_t time)
 The next time step in this clock's regular pattern. More...
 
virtual time_t timeBefore (time_t time)
 The previous time step in this clock's regular pattern. More...
 
virtual std::vector< time_t > timeValuesInRange (time_t start, time_t end)
 Get a list of time values that are valid within a range. More...
 
virtual std::ostream & toStream (std::ostream &stream)
 
- Public Member Functions inherited from RTX::Clock
 Clock (int period, time_t start=0)
 Constructor for Clock. Takes a period and offset time. More...
 
std::string name ()
 
void setName (std::string name)
 
virtual time_t validTime (time_t time)
 
bool isRegular ()
 Test for regularity (period greater than zero) More...
 
int period ()
 The period of the time series. More...
 
void setPeriod (int p)
 
time_t start ()
 The starting point for the clock. More...
 
void setStart (time_t startTime)
 

Member Function Documentation

bool IrregularClock::isCompatibleWith ( Clock::sharedPointer  clock)
virtual

Test for compatibility (passed clock parameter may be faster, but must fall on even steps)

Parameters
clockA shared pointer to another clock object.
Returns
Boolean true/false value.

Reimplemented from RTX::Clock.

bool IrregularClock::isValid ( time_t  time)
virtual

Test for validity of time value (if the passed value falls on this clock's regular steps)

Parameters
timeA time value.
Returns
Boolean true/false value

Reimplemented from RTX::Clock.

time_t IrregularClock::timeAfter ( time_t  time)
virtual

The next time step in this clock's regular pattern.

Parameters
timeA time value.
Returns
A unix-time value representing the next step in the pattern.
See also
http://www.youtube.com/watch?v=VdQY7BusJNU

Reimplemented from RTX::Clock.

time_t IrregularClock::timeBefore ( time_t  time)
virtual

The previous time step in this clock's regular pattern.

Parameters
timeA time value.
Returns
A unix-time value representing the previous step in the pattern.

Reimplemented from RTX::Clock.

vector< time_t > IrregularClock::timeValuesInRange ( time_t  start,
time_t  end 
)
virtual

Get a list of time values that are valid within a range.

Parameters
startA range start time.
endA range end time.
Returns
A vector of time_t values that are valid for this clock within the specified range.

Reimplemented from RTX::Clock.


The documentation for this class was generated from the following files: