Holds time released latches.
More...
#include <timed_latch.hpp>
|
| TimedLatchCollection (Behaviors::NumericValue value) |
|
void | resize (VIPRA::size latchCnt) |
| Sets the size of the container.
|
|
void | latch (VIPRA::time_s startTime, VIPRA::idx pedIdx) |
| Sets the latch for pedestrian at pedIdx.
|
|
auto | size () const -> VIPRA::size |
|
auto | check (VIPRA::time_s currTime, VIPRA::idx pedIdx) -> bool |
| Checks if the latches duration time has passed since it was latched.
|
|
auto | get_duration (VIPRA::idx pedIdx) -> VIPRA::f_pnt |
| Returns the duration for a pedestrians latch.
|
|
Holds time released latches.
◆ check()
auto VIPRA::Behaviors::TimedLatchCollection::check |
( |
VIPRA::time_s | currTime, |
|
|
VIPRA::idx | pedIdx ) -> bool
|
|
inline |
Checks if the latches duration time has passed since it was latched.
- Parameters
-
currTime | : current simulation time |
pedIdx | : pedestrian index latch to check |
- Returns
- true : if the latch is set and the duration has not elapsed
-
false : if the latch is NOT set or the time has elapsed
◆ get_duration()
auto VIPRA::Behaviors::TimedLatchCollection::get_duration |
( |
VIPRA::idx | pedIdx | ) |
-> VIPRA::f_pnt |
|
inline |
Returns the duration for a pedestrians latch.
- Parameters
-
pedIdx | : pedestrian index to get duration of |
- Returns
- VIPRA::f_pnt
◆ latch()
void VIPRA::Behaviors::TimedLatchCollection::latch |
( |
VIPRA::time_s | startTime, |
|
|
VIPRA::idx | pedIdx ) |
|
inline |
Sets the latch for pedestrian at pedIdx.
- Note
- subsequent calls do not update the latched time, until the latch is unlatched
- Parameters
-
startTime | : current simulation time |
pedIdx | : pedestrian index to latch |
◆ resize()
void VIPRA::Behaviors::TimedLatchCollection::resize |
( |
VIPRA::size | latchCnt | ) |
|
|
inline |
Sets the size of the container.
- Parameters
-
latchCnt | : number of latches |
The documentation for this class was generated from the following file: