#include <SoccerTypes.h>
Public Methods | |
Time (int iTime=-1, int iStopped=0) | |
bool | updateTime (int iTime) |
bool | setTimeStopped (int iTime) |
int | getTime () |
int | getTimeStopped () |
int | getTimeDifference (Time t) |
bool | isStopped () |
Time | getTimeAddedWith (int iCycles) |
bool | addToTime (int iCycles) |
void | show (ostream &os=cout) |
Time | operator+ (const int &i) |
Time | operator+ (Time t) |
Time | operator- (const int &i) |
int | operator- (Time t) |
void | operator= (const int &i) |
void | operator+= (Time t) |
void | operator+= (const int &i) |
void | operator-= (Time t) |
void | operator-= (const int &i) |
bool | operator!= (Time t) |
bool | operator!= (const int &i) |
bool | operator== (Time t) |
bool | operator== (const int &i) |
bool | operator< (Time t) |
bool | operator< (const int &i) |
bool | operator<= (Time t) |
bool | operator<= (const int &i) |
bool | operator> (Time t) |
bool | operator> (const int &i) |
bool | operator>= (Time t) |
bool | operator>= (const int &i) |
Private Attributes | |
int | m_iTime |
int | m_iStopped |
Friends | |
ostream & | operator<< (ostream &os, Time t) |
Definition at line 413 of file SoccerTypes.h.
|
This is the constructor for the Time class, it receives two arguments. The actual time and how long the time has stopped.
Definition at line 69 of file SoccerTypes.C. References m_iStopped, and m_iTime. Referenced by getTimeAddedWith(), operator!=(), operator+(), and operator<(). |
|
This method adds 'iCycles' to the current time. The current values are updated. The method getTimeAddedWith is used to calculated the new time.
Definition at line 188 of file SoccerTypes.C. References getTimeAddedWith(). Referenced by operator+=(), and operator-=(). |
|
This method returns the actual time, that is the number of cycles that have passed.
Definition at line 106 of file SoccerTypes.C. References m_iTime. Referenced by SenseHandler::analyzeSeeMessage(), SenseHandler::analyzeSenseMessage(), Object::getConfidence(), WorldModel::getCurrentCycle(), getTimeAddedWith(), getTimeDifference(), WorldModel::getTimeSinceLastCatch(), operator+(), operator+=(), operator-=(), operator<<(), WorldModel::show(), show(), WorldModel::showObjects(), WorldModel::updateAfterSeeMessage(), and WorldModel::updateAgentAndBallAfterSense(). |
|
This method returns a new time class denoting the time when 'iCycles' are added to the current time. There are different situations possible. When the added time is positive and the time stands still, the cycles are added to the stopped time, otherwise they are added to the actual time. When the added time is negative and the time stands still, the cycles are subtracted from the stopped time. Otherwise the time is subtracted from the actual time.
Definition at line 154 of file SoccerTypes.C. References getTime(), getTimeStopped(), and Time(). |
|
This method returns the time difference between two time objects. When the time is stopped, but the actual time differens the value -1 is returned otherwise the difference in stopped time is returned. When the time is not stopped, the difference in the actual time is returned.
Definition at line 125 of file SoccerTypes.C. References getTime(), and getTimeStopped(). Referenced by SenseHandler::analyzeSeeMessage(), SenseHandler::analyzeSenseMessage(), Object::getConfidence(), operator!=(), operator-(), and operator<(). |
|
This method returns the time the time has stopped, that is the number of cycles the time stood on the current value.
Definition at line 114 of file SoccerTypes.C. References m_iStopped. Referenced by getTimeAddedWith(), getTimeDifference(), operator+(), operator+=(), operator<<(), and show(). |
|
This method returns a boolean value indicating whether the time currently is stopped.
Definition at line 138 of file SoccerTypes.C. References m_iStopped. Referenced by WorldModel::isTimeStopped(). |
|
This method returns a boolean indicating whether the current time is inequal to the time specified by the integer 'i'. 'i' is first converted to the time object (i,0). When the time difference returned by getTimeDifference between these two time objects is inequal to zero true is returned, false otherwise
Definition at line 298 of file SoccerTypes.C. References getTimeDifference(), and Time(). |
|
This method returns a boolean indicating whether the current time is inequal to the time t. When the time difference returned by getTimeDifference between these two time objects is inequal to zero true is returned, false otherwise.
Definition at line 309 of file SoccerTypes.C. References getTimeDifference(). |
|
This method returns the result of adding time 't' to the current time. No changes are made to the current object. It is defined by (t1,s1) + (t2,s2) = (t1+t2,s2). The stopped time of the first time tuple is neglected, since this has already been passed.
Definition at line 219 of file SoccerTypes.C. References getTime(), getTimeStopped(), and Time(). |
|
This method returns the time as if 'i' cycles would be added to the current time. The method getTimeAddedWith is used for this. No changes are made to the current object.
Definition at line 208 of file SoccerTypes.C. References getTimeAddedWith(). |
|
This method updates the time by adding 'i' cycles to the current time. The method addToTime is used for this.
Definition at line 256 of file SoccerTypes.C. References addToTime(). |
|
This method updates the time by adding the time 't' to the current time. It is defined by (t1,s1) + (t2,s2) = (t1+t2,s2). The stopped time of the first time tuple is neglected, since this has already been passed.
Definition at line 266 of file SoccerTypes.C. References getTime(), getTimeStopped(), setTimeStopped(), and updateTime(). |
|
This method returns the result the difference between the two times and is equal to the method getTimeDifference.
Definition at line 238 of file SoccerTypes.C. References getTimeDifference(). |
|
This method returns the time as if 'i' cycles would be subtracted from the current time. The method getTimeAddedWith is used for this. No changes are made to the current object.
Definition at line 229 of file SoccerTypes.C. References getTimeAddedWith(). |
|
This method updates the time by subtractign 'i' cycles from the current time. The method addToTime is used for this with '-i' as its argument.
Definition at line 276 of file SoccerTypes.C. References addToTime(). |
|
This method updates the time by subtracting time 't' from the current time. It is defined by (t1,s1) + (t2,s2) = (t1-t2,0). The stopped time is set to zero.
Definition at line 285 of file SoccerTypes.C. References getTime(), setTimeStopped(), and updateTime(). |
|
This method returns a boolean indicating whether the current time is smaller than the time denoted by the integer 'i'. Herefore first a time object (i,0) is created.
Definition at line 350 of file SoccerTypes.C. References Time(). |
|
This method returns a boolean indicating whether the current time is smaller than the time t. When the time difference returned by getTimeDifference is smaller than zero, true is returned, false otherwise
Definition at line 340 of file SoccerTypes.C. References getTimeDifference(). |
|
This method returns a boolean indicating whether the current time is smaller than or equal to the time denoted by the integer 'i'. Herefore first a time object (i,0) is created.
Definition at line 371 of file SoccerTypes.C. |
|
This method returns a boolean indicating whether the current time is smaller than or equal to the time t.
Definition at line 360 of file SoccerTypes.C. |
|
This method returns a new time object (i,0). The argument 'i' is thus denoted as the actual time.
Definition at line 247 of file SoccerTypes.C. References setTimeStopped(), and updateTime(). |
|
This method returns a boolean indicating whether the current time equals the time as specified by the integer 'i'. 'i' is first converted to the time object (i,0). When the time difference returned by getTimeDifference between these two time objects equals zero, true is returned, false otherwise
Definition at line 320 of file SoccerTypes.C. |
|
This method returns a boolean indicating whether the current time equals the time t. When the time difference returned by getTimeDifference between these two time objects equals zero, true is returned, false otherwise
Definition at line 330 of file SoccerTypes.C. |
|
This method returns a boolean indicating whether the current time is larger than the time denoted by the integer 'i'. Herefore first a time object (i,0) is created.
Definition at line 390 of file SoccerTypes.C. |
|
This method returns a boolean indicating whether the current time is larger than the time t, that is it is not smaller than or equal to 't'.
Definition at line 380 of file SoccerTypes.C. |
|
This method returns a boolean indicating whether the current time is larger than or equal to the time denoted by the integer 'i'. Herefore first a time object (i,0) is created.
Definition at line 411 of file SoccerTypes.C. |
|
This method returns a boolean indicating whether the current time is larger than or equal to than the time t, that is it is not smaller than 't'.
Definition at line 399 of file SoccerTypes.C. |
|
This methods sets the stopped time, which denotes the number of cycles time stood still.
Definition at line 97 of file SoccerTypes.C. References m_iStopped. Referenced by operator+=(), operator-=(), and operator=(). |
|
This method prints the time to the specified output stream. Time is printed as the two tuple (t,s) where t denotes the actual time and s the number of stopped cycles.
Definition at line 198 of file SoccerTypes.C. References getTime(), and getTimeStopped(). |
|
This method updates the time to 'iTime'. When the actual time was already 'iTime' the current time is kept unchanged and the time stopped is raised with one. Otherwise the actual time is changed to 'iTime' and the stopped time is set to 0.
Definition at line 81 of file SoccerTypes.C. References m_iStopped, and m_iTime. Referenced by SenseHandler::analyzeSeeGlobalMessage(), SenseHandler::analyzeSenseMessage(), operator+=(), operator-=(), operator=(), and WorldModel::updateAgentAndBallAfterSense(). |
|
Overloaded version of the C++ output operator for a Time class. This operator makes it possible to use Time objects in output statements (e.g. cout << t). The current cycle and the stopped time are printed in the format (t1,t2).
Definition at line 423 of file SoccerTypes.C. |
|
Number of cycles stopped at m_iTime Definition at line 416 of file SoccerTypes.h. Referenced by getTimeStopped(), isStopped(), setTimeStopped(), Time(), and updateTime(). |
|
Number of cycles, denoting the time Definition at line 415 of file SoccerTypes.h. Referenced by getTime(), Time(), and updateTime(). |