Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
AGWorkPosition Class Reference

#include <AGWorkPosition.h>

Collaboration diagram for AGWorkPosition:
[legend]

Public Member Functions

 AGWorkPosition (AGDataAndStatistics *ds, const AGStreet &inStreet)
 
 AGWorkPosition (AGDataAndStatistics *ds, const AGStreet &inStreet, double pos)
 
int getClosing () const
 
int getOpening () const
 
AGPosition getPosition () const
 
bool isTaken () const
 
void let ()
 
void print () const
 
void take (AGAdult *ad)
 
 ~AGWorkPosition ()
 

Static Private Member Functions

static int generateClosingTime (const AGDataAndStatistics &ds)
 
static int generateOpeningTime (const AGDataAndStatistics &ds)
 

Private Attributes

AGAdultmyAdult
 
int myClosingTime
 
AGPosition myLocation
 
int myOpeningTime
 
AGDataAndStatisticsmyStatData
 

Detailed Description

Definition at line 46 of file AGWorkPosition.h.

Constructor & Destructor Documentation

◆ AGWorkPosition() [1/2]

AGWorkPosition::AGWorkPosition ( AGDataAndStatistics ds,
const AGStreet inStreet 
)

Definition at line 40 of file AGWorkPosition.cpp.

References AGDataAndStatistics::workPositions.

◆ AGWorkPosition() [2/2]

AGWorkPosition::AGWorkPosition ( AGDataAndStatistics ds,
const AGStreet inStreet,
double  pos 
)

Definition at line 50 of file AGWorkPosition.cpp.

References AGDataAndStatistics::workPositions.

◆ ~AGWorkPosition()

AGWorkPosition::~AGWorkPosition ( )

Definition at line 59 of file AGWorkPosition.cpp.

Member Function Documentation

◆ generateClosingTime()

int AGWorkPosition::generateClosingTime ( const AGDataAndStatistics ds)
staticprivate

Definition at line 90 of file AGWorkPosition.cpp.

References AGDataAndStatistics::endWorkHours, and RandHelper::rand().

◆ generateOpeningTime()

int AGWorkPosition::generateOpeningTime ( const AGDataAndStatistics ds)
staticprivate

Definition at line 73 of file AGWorkPosition.cpp.

References AGDataAndStatistics::beginWorkHours, and RandHelper::rand().

◆ getClosing()

int AGWorkPosition::getClosing ( ) const

Definition at line 139 of file AGWorkPosition.cpp.

References myClosingTime.

◆ getOpening()

int AGWorkPosition::getOpening ( ) const

Definition at line 145 of file AGWorkPosition.cpp.

References myOpeningTime.

◆ getPosition()

AGPosition AGWorkPosition::getPosition ( ) const

Definition at line 133 of file AGWorkPosition.cpp.

References myLocation.

◆ isTaken()

bool AGWorkPosition::isTaken ( ) const

Definition at line 106 of file AGWorkPosition.cpp.

References myAdult.

Referenced by print().

Here is the caller graph for this function:

◆ let()

void AGWorkPosition::let ( )

Definition at line 112 of file AGWorkPosition.cpp.

References AGAdult::lostWorkPosition(), myAdult, myStatData, and AGDataAndStatistics::workPositions.

Referenced by AGAdult::resignFromWorkPosition(), and AGAdult::tryToWork().

Here is the caller graph for this function:

◆ print()

void AGWorkPosition::print ( ) const

Definition at line 65 of file AGWorkPosition.cpp.

References isTaken(), myClosingTime, myLocation, myOpeningTime, and AGPosition::print().

◆ take()

void AGWorkPosition::take ( AGAdult ad)

Definition at line 122 of file AGWorkPosition.cpp.

References myAdult, myStatData, TL, and AGDataAndStatistics::workPositions.

Referenced by AGAdult::tryToWork().

Here is the caller graph for this function:

Field Documentation

◆ myAdult

AGAdult* AGWorkPosition::myAdult
private

Definition at line 69 of file AGWorkPosition.h.

Referenced by isTaken(), let(), and take().

◆ myClosingTime

int AGWorkPosition::myClosingTime
private

Definition at line 71 of file AGWorkPosition.h.

Referenced by getClosing(), and print().

◆ myLocation

AGPosition AGWorkPosition::myLocation
private

Definition at line 68 of file AGWorkPosition.h.

Referenced by getPosition(), and print().

◆ myOpeningTime

int AGWorkPosition::myOpeningTime
private

Definition at line 70 of file AGWorkPosition.h.

Referenced by getOpening(), and print().

◆ myStatData

AGDataAndStatistics* AGWorkPosition::myStatData
private

Definition at line 67 of file AGWorkPosition.h.

Referenced by let(), and take().


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