MSPerson::MSPersonStage Class Reference

#include <MSPerson.h>

Inheritance diagram for MSPerson::MSPersonStage:

MSPerson::MSPersonStage_Driving MSPerson::MSPersonStage_Waiting MSPerson::MSPersonStage_Walking

Detailed Description

The "abstract" class for a single stage of a persons movement Contains the destination of the current movement step

Definition at line 61 of file MSPerson.h.


Public Member Functions

const MSEdgegetDestination () const
 returns the destination edge
virtual bool isWaitingFor (const std::string &line) const
 Whether the person waits for a vehicle of the line specified.
 MSPersonStage (const MSEdge &destination)
 constructor
virtual void proceed (MSNet *net, MSPerson *person, SUMOTime now, const MSEdge &previousEdge)=0
 proceeds to the next step
void setArrived (SUMOTime now)
 logs end of the step
void setDeparted (SUMOTime now)
 logs end of the step
virtual void tripInfoOutput (OutputDevice &os) const =0 throw (IOError)
 Called on writing tripinfo output.
virtual ~MSPersonStage ()
 destructor

Protected Attributes

SUMOTime myArrived
 the time at which this stage ended
SUMOTime myDeparted
 the time at which this stage started
const MSEdgemyDestination
 the next edge to reach (either by walking or driving)

Private Member Functions

 MSPersonStage (const MSPersonStage &)
 Invalidated copy constructor.
MSPersonStageoperator= (const MSPersonStage &)
 Invalidated assignment operator.

Constructor & Destructor Documentation

MSPerson::MSPersonStage::MSPersonStage ( const MSEdge destination  ) 

constructor

Definition at line 52 of file MSPerson.cpp.

00053         : myDestination(destination), myDeparted(-1) {}

MSPerson::MSPersonStage::~MSPersonStage (  )  [virtual]

destructor

Definition at line 56 of file MSPerson.cpp.

00056 {}

MSPerson::MSPersonStage::MSPersonStage ( const MSPersonStage  )  [private]

Invalidated copy constructor.


Member Function Documentation

const MSEdge & MSPerson::MSPersonStage::getDestination (  )  const

returns the destination edge

Definition at line 60 of file MSPerson.cpp.

References myDestination.

00060                                             {
00061     return myDestination;
00062 }

bool MSPerson::MSPersonStage::isWaitingFor ( const std::string &  line  )  const [virtual]

Whether the person waits for a vehicle of the line specified.

Reimplemented in MSPerson::MSPersonStage_Driving.

Definition at line 80 of file MSPerson.cpp.

00080                                                                {
00081     return false;
00082 }

MSPersonStage& MSPerson::MSPersonStage::operator= ( const MSPersonStage  )  [private]

Invalidated assignment operator.

virtual void MSPerson::MSPersonStage::proceed ( MSNet net,
MSPerson person,
SUMOTime  now,
const MSEdge previousEdge 
) [pure virtual]

void MSPerson::MSPersonStage::setArrived ( SUMOTime  now  ) 

logs end of the step

Definition at line 74 of file MSPerson.cpp.

References myArrived.

00074                                               {
00075     myArrived = now;
00076 }

void MSPerson::MSPersonStage::setDeparted ( SUMOTime  now  ) 

logs end of the step

Definition at line 66 of file MSPerson.cpp.

References myDeparted.

00066                                                {
00067     if (myDeparted < 0) {
00068         myDeparted = now;
00069     }
00070 }

virtual void MSPerson::MSPersonStage::tripInfoOutput ( OutputDevice os  )  const throw (IOError) [pure virtual]

Called on writing tripinfo output.

Parameters:
[in] os The stream to write the information into
Exceptions:
IOError not yet implemented

Implemented in MSPerson::MSPersonStage_Walking, MSPerson::MSPersonStage_Driving, and MSPerson::MSPersonStage_Waiting.


Field Documentation

the time at which this stage started

Definition at line 97 of file MSPerson.h.

Referenced by setDeparted(), and MSPerson::MSPersonStage_Driving::tripInfoOutput().

the next edge to reach (either by walking or driving)

Definition at line 94 of file MSPerson.h.

Referenced by getDestination().


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

Generated on Wed May 5 00:06:49 2010 for Sumo - Simulation of Urban MObility by  doxygen 1.5.6