![]() |
SUMO - Simulation of Urban MObility
|
#include <AGTime.h>
Public Member Functions | |
void | addDays (int days) |
addition of days to the current moment More... | |
void | addHours (int hours) |
addition of hours to the current moment More... | |
void | addMinutes (int min) |
addition of minutes to the current moment More... | |
void | addSeconds (int sec) |
addition of seconds to the current moment More... | |
AGTime () | |
AGTime (int seconds) | |
AGTime (int hour, int minutes) | |
AGTime (int day, int hour, int min) | |
AGTime (int day, int hour, int min, int sec) | |
AGTime (const AGTime &time) | |
int | getDay () |
int | getHour () |
int | getMinute () |
int | getSecond () |
int | getSecondsInCurrentDay () |
int | getSecondsOf (SUMOReal minutes) |
computes the number of seconds in the given minutes More... | |
int | getTime () |
: returns the number of seconds from the beginning of the first day of simulation this includes More... | |
AGTime | operator+ (const AGTime &time) |
void | operator+= (const AGTime &time) |
void | operator+= (int seconds) |
void | operator-= (const AGTime &time) |
bool | operator< (const AGTime &time) |
bool | operator<= (const AGTime &time) |
bool | operator== (const AGTime &time) |
void | setDay (int d) |
void | setHour (int h) |
void | setMinute (int m) |
void | setSecond (int s) |
void | setTime (int sec) |
: sets the time from the beginning of the first day of simulation in seconds More... | |
Private Member Functions | |
int | convert (int days, int hours, int minutes, int seconds) |
converts days, hours and minutes to seconds More... | |
Private Attributes | |
int | sec |
|
inline |
Definition at line 53 of file AGTime.h.
References addDays(), addHours(), addMinutes(), addSeconds(), AGTime(), convert(), getDay(), getHour(), getMinute(), getSecond(), getSecondsInCurrentDay(), getSecondsOf(), getTime(), min, operator+(), operator+=(), operator-=(), operator<(), operator<=(), operator==(), sec, setDay(), setHour(), setMinute(), setSecond(), setTime(), and SUMOReal.
AGTime::AGTime | ( | const AGTime & | time | ) |
Definition at line 42 of file AGTime.cpp.
References sec.
void AGTime::addDays | ( | int | days | ) |
addition of days to the current moment
[in] | days | the number of days to add |
Definition at line 173 of file AGTime.cpp.
References sec.
Referenced by AGTime(), and AGFreeTime::whenBeginActivityNextDay().
void AGTime::addHours | ( | int | hours | ) |
addition of hours to the current moment
[in] | hours | the number of hours to add |
Definition at line 178 of file AGTime.cpp.
References sec.
Referenced by AGTime().
void AGTime::addMinutes | ( | int | min | ) |
addition of minutes to the current moment
[in] | min | the number of minutes |
Definition at line 183 of file AGTime.cpp.
References sec.
Referenced by AGTime(), and AGBusLine::getReady().
void AGTime::addSeconds | ( | int | sec | ) |
addition of seconds to the current moment
[in] | sec | the number of seconds |
Definition at line 188 of file AGTime.cpp.
References sec.
Referenced by AGTime(), AGBusLine::getReady(), and main().
|
private |
converts days, hours and minutes to seconds
Definition at line 47 of file AGTime.cpp.
References sec.
Referenced by AGTime().
int AGTime::getDay | ( | ) |
Definition at line 106 of file AGTime.cpp.
References sec.
Referenced by AGTime(), AGActivityGen::generateOutputFile(), main(), setDay(), and AGFreeTime::typeFromHomeNight().
int AGTime::getHour | ( | ) |
Definition at line 111 of file AGTime.cpp.
References sec.
Referenced by AGTime(), AGActivityGen::generateOutputFile(), and setHour().
int AGTime::getMinute | ( | ) |
Definition at line 116 of file AGTime.cpp.
References sec.
Referenced by AGTime(), AGActivityGen::generateOutputFile(), and setMinute().
int AGTime::getSecond | ( | ) |
Definition at line 121 of file AGTime.cpp.
References sec.
Referenced by AGTime(), AGActivityGen::generateOutputFile(), and setSecond().
int AGTime::getSecondsInCurrentDay | ( | ) |
int AGTime::getSecondsOf | ( | SUMOReal | minutes | ) |
computes the number of seconds in the given minutes
[in] | minutes,can | be fraction of minutes |
Definition at line 53 of file AGTime.cpp.
Referenced by AGTime().
int AGTime::getTime | ( | ) |
: returns the number of seconds from the beginning of the first day of simulation this includes
Definition at line 131 of file AGTime.cpp.
References sec.
Referenced by AGTime(), AGBusLine::getReady(), main(), AGFreeTime::possibleTypeOfTrip(), AGFreeTime::typeFromHomeNight(), and AGFreeTime::whenBeginActivityNextDay().
void AGTime::operator+= | ( | const AGTime & | time | ) |
void AGTime::operator+= | ( | int | seconds | ) |
Definition at line 90 of file AGTime.cpp.
References sec.
void AGTime::operator-= | ( | const AGTime & | time | ) |
bool AGTime::operator< | ( | const AGTime & | time | ) |
bool AGTime::operator<= | ( | const AGTime & | time | ) |
bool AGTime::operator== | ( | const AGTime & | time | ) |
void AGTime::setDay | ( | int | d | ) |
Definition at line 136 of file AGTime.cpp.
Referenced by AGTime(), main(), and AGFreeTime::typeFromHomeNight().
void AGTime::setHour | ( | int | h | ) |
void AGTime::setMinute | ( | int | m | ) |
void AGTime::setSecond | ( | int | s | ) |
void AGTime::setTime | ( | int | sec | ) |
: sets the time from the beginning of the first day of simulation in seconds
Definition at line 168 of file AGTime.cpp.
References sec.
Referenced by AGTime(), and AGFreeTime::whenBeginActivityNextDay().
|
private |
Definition at line 137 of file AGTime.h.
Referenced by addDays(), addHours(), addMinutes(), addSeconds(), AGTime(), convert(), getDay(), getHour(), getMinute(), getSecond(), getSecondsInCurrentDay(), getTime(), operator+(), operator+=(), operator-=(), operator<(), operator<=(), operator==(), setDay(), setHour(), setMinute(), setSecond(), and setTime().