#include <MSPerson.h>
Definition at line 55 of file MSPerson.h.
Public Types | |
| typedef std::vector < MSPersonStage * > | MSPersonPlan |
| the structure holding the plan of a person | |
Public Member Functions | |
| SUMOTime | getDesiredDepart () const throw () |
| Returns the desired departure time. | |
| const MSEdge & | getDestination () const |
| Returns the current destination. | |
| const std::string & | getID () const throw () |
| returns the person id | |
| bool | isWaitingFor (const std::string &line) const |
| Whether the person waits for a vehicle of the line specified. | |
| MSPerson (const SUMOVehicleParameter *pars, MSPersonPlan *plan) | |
| constructor | |
| void | proceed (MSNet *net, SUMOTime time) |
| proceeds to the next step of the route | |
| void | setDeparted (SUMOTime now) |
| logs end of the step | |
| void | tripInfoOutput (OutputDevice &os) const throw (IOError) |
| Called on writing tripinfo output. | |
| ~MSPerson () | |
| destructor | |
Private Member Functions | |
| MSPerson (const MSPerson &) | |
| Invalidated copy constructor. | |
| MSPerson & | operator= (const MSPerson &) |
| Invalidated assignment operator. | |
Private Attributes | |
| const SUMOVehicleParameter * | myParameter |
| the plan of the person | |
| MSPersonPlan * | myPlan |
| the plan of the person | |
| MSPersonPlan::iterator | myStep |
| the iterator over the route | |
Data Structures | |
| class | MSPersonStage |
| class | MSPersonStage_Driving |
| class | MSPersonStage_Waiting |
| class | MSPersonStage_Walking |
| typedef std::vector<MSPersonStage*> MSPerson::MSPersonPlan |
| MSPerson::MSPerson | ( | const SUMOVehicleParameter * | pars, | |
| MSPersonPlan * | plan | |||
| ) |
constructor
Definition at line 193 of file MSPerson.cpp.
References myPlan, and myStep.
00194 : myParameter(pars), myPlan(plan) { 00195 myStep = myPlan->begin(); 00196 }
| MSPerson::~MSPerson | ( | ) |
destructor
Definition at line 199 of file MSPerson.cpp.
References myPlan.
00199 { 00200 delete myPlan; 00201 }
| MSPerson::MSPerson | ( | const MSPerson & | ) | [private] |
Invalidated copy constructor.
| SUMOTime MSPerson::getDesiredDepart | ( | ) | const throw () |
Returns the desired departure time.
Definition at line 224 of file MSPerson.cpp.
References SUMOVehicleParameter::depart, and myParameter.
Referenced by MSPersonControl::erase().
00224 { 00225 return myParameter->depart; 00226 }
| const MSEdge & MSPerson::getDestination | ( | ) | const |
| const std::string & MSPerson::getID | ( | ) | const throw () |
returns the person id
Definition at line 205 of file MSPerson.cpp.
References SUMOVehicleParameter::id, and myParameter.
Referenced by MSPersonControl::erase().
00205 { 00206 return myParameter->id; 00207 }
| bool MSPerson::isWaitingFor | ( | const std::string & | line | ) | const |
Whether the person waits for a vehicle of the line specified.
Definition at line 250 of file MSPerson.cpp.
proceeds to the next step of the route
Definition at line 211 of file MSPerson.cpp.
References MSPersonControl::erase(), MSNet::getPersonControl(), myPlan, and myStep.
00211 { 00212 const MSEdge &arrivedAt = (*myStep)->getDestination(); 00213 (*myStep)->setArrived(time); 00214 myStep++; 00215 if (myStep != myPlan->end()) { 00216 (*myStep)->proceed(net, this, time, arrivedAt); 00217 } else { 00218 net->getPersonControl().erase(this); 00219 } 00220 }
| void MSPerson::setDeparted | ( | SUMOTime | now | ) |
| void MSPerson::tripInfoOutput | ( | OutputDevice & | os | ) | const throw (IOError) |
Called on writing tripinfo output.
| [in] | os | The stream to write the information into |
| IOError | not yet implemented |
Definition at line 242 of file MSPerson.cpp.
References myPlan.
Referenced by MSPersonControl::erase().
00242 { 00243 for (MSPersonPlan::const_iterator i=myPlan->begin(); i!=myPlan->end(); ++i) { 00244 (*i)->tripInfoOutput(os); 00245 } 00246 }
const SUMOVehicleParameter* MSPerson::myParameter [private] |
the plan of the person
Definition at line 230 of file MSPerson.h.
Referenced by getDesiredDepart(), and getID().
MSPersonPlan* MSPerson::myPlan [private] |
the plan of the person
Definition at line 233 of file MSPerson.h.
Referenced by MSPerson(), proceed(), tripInfoOutput(), and ~MSPerson().
MSPersonPlan::iterator MSPerson::myStep [private] |
the iterator over the route
Definition at line 236 of file MSPerson.h.
Referenced by MSPerson(), and proceed().
1.5.6