MSVehicle::State Class Reference

#include <MSVehicle.h>


Detailed Description

Container that holds the vehicles driving state (position+speed).

Definition at line 94 of file MSVehicle.h.


Public Member Functions

bool operator!= (const State &state)
 Operator !=.
Stateoperator= (const State &state)
 Assignment operator.
SUMOReal pos () const
 Position of this state.
SUMOReal speed () const
 Speed of this state.
 State (const State &state)
 Copy constructor.
 State (SUMOReal pos, SUMOReal speed)
 Constructor.

Private Attributes

SUMOReal myPos
 the stored position
SUMOReal mySpeed
 the stored speed

Friends

class MSLaneChanger
class MSVehicle
 vehicle sets states directly

Constructor & Destructor Documentation

MSVehicle::State::State ( SUMOReal  pos,
SUMOReal  speed 
)

Constructor.

Definition at line 127 of file MSVehicle.cpp.

00127                                                   :
00128         myPos(pos), mySpeed(speed) {}

MSVehicle::State::State ( const State state  ) 

Copy constructor.

Definition at line 100 of file MSVehicle.cpp.

References myPos, and mySpeed.

00100                                         {
00101     myPos = state.myPos;
00102     mySpeed = state.mySpeed;
00103 }


Member Function Documentation

bool MSVehicle::State::operator!= ( const State state  ) 

Operator !=.

Definition at line 115 of file MSVehicle.cpp.

References myPos, and mySpeed.

00115                                              {
00116     return (myPos   != state.myPos ||
00117             mySpeed != state.mySpeed);
00118 }

MSVehicle::State & MSVehicle::State::operator= ( const State state  ) 

Assignment operator.

Definition at line 107 of file MSVehicle.cpp.

References myPos, and mySpeed.

00107                                             {
00108     myPos   = state.myPos;
00109     mySpeed = state.mySpeed;
00110     return *this;
00111 }

SUMOReal MSVehicle::State::pos (  )  const

SUMOReal MSVehicle::State::speed (  )  const [inline]


Friends And Related Function Documentation

friend class MSLaneChanger [friend]

Definition at line 97 of file MSVehicle.h.

friend class MSVehicle [friend]

vehicle sets states directly

Definition at line 96 of file MSVehicle.h.


Field Documentation

SUMOReal MSVehicle::State::myPos [private]

SUMOReal MSVehicle::State::mySpeed [private]


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

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