Code_TYMPAN  4.4.0
Industrial site acoustic simulation
Public Member Functions | Private Attributes | List of all members
TYRoute::TrafficHalfer Class Reference

This helper class halves and restore the traffic flow of the road. More...

Collaboration diagram for TYRoute::TrafficHalfer:
Collaboration graph
[legend]

Public Member Functions

 TrafficHalfer (TYRoute &road)
 
 ~TrafficHalfer ()
 

Private Attributes

TYRouteroad
 

Detailed Description

This helper class halves and restore the traffic flow of the road.

Because the traffic flow is halved as part of the emission computation and must be restored whatever happens we use an helper class which halves the traffic on construction and restore it on destruction. This is akin to the RAII idiom or the context managers in Python.

Definition at line 349 of file TYRoute.h.

Constructor & Destructor Documentation

◆ TrafficHalfer()

TYRoute::TrafficHalfer::TrafficHalfer ( TYRoute road)

Definition at line 651 of file TYRoute.cpp.

Here is the call graph for this function:

◆ ~TrafficHalfer()

TYRoute::TrafficHalfer::~TrafficHalfer ( )

Definition at line 664 of file TYRoute.cpp.

Member Data Documentation

◆ road

TYRoute& TYRoute::TrafficHalfer::road
private

Definition at line 356 of file TYRoute.h.


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