TestingStrategy Class Reference
|
CPP API
|
Set of TestingSchemes that are checked for testing. More...
#include <testing_strategy.h>
Classes | |
| struct | LocalStrategy |
| Vector of testing schemes used as an entry for either LocationId or LocationType in TestingStrategy. More... | |
Public Member Functions | |
| void | add_scheme (const LocationId &loc_id, const TestingScheme &scheme) |
| Add a TestingScheme to the set of schemes that are checked for testing at a certain Location for a specific id. More... | |
| void | add_scheme (const LocationType &loc_type, const TestingScheme &scheme) |
| Add a TestingScheme to the set of schemes that are checked for testing at a certain Location. More... | |
| void | add_scheme (const std::vector< LocationType > &loc_type, const TestingScheme &scheme) |
| Add a TestingScheme to the set of schemes that are checked for testing at a certain Location. More... | |
| auto | default_serialize () |
| This method is used by the default serialization feature. More... | |
| bool | run_and_check (PersonalRandomNumberGenerator &rng, Person &person, const Location &location, TimePoint t) |
| Runs the TestingStrategy and potentially tests a Person when entering. More... | |
| TestingStrategy ()=default | |
| Create a TestingStrategy. More... | |
| TestingStrategy (const std::vector< LocalStrategy > &location_to_schemes_id, const std::vector< LocalStrategy > &location_to_schemes_type) | |
Private Attributes | |
| std::vector< LocalStrategy > | m_testing_schemes_at_location_id |
| Set of schemes that are checked for testing in specific locations. More... | |
| std::vector< LocalStrategy > | m_testing_schemes_at_location_type |
| Set of schemes that are checked for testing in overall locations types. More... | |
Detailed Description
Set of TestingSchemes that are checked for testing.
Constructor & Destructor Documentation
◆ TestingStrategy() [1/2]
|
default |
Create a TestingStrategy.
- Parameters
-
[in] testing_schemes Vector of TestingSchemes that are checked for testing. The first vector is for LocationId and the second for LocationType. The index of the vector is the LocationId or LocationType and the value is the vektor of TestingScheme(s).
◆ TestingStrategy() [2/2]
|
explicit |
Member Function Documentation
◆ add_scheme() [1/3]
| void mio::abm::TestingStrategy::add_scheme | ( | const LocationId & | loc_id, |
| const TestingScheme & | scheme | ||
| ) |
Add a TestingScheme to the set of schemes that are checked for testing at a certain Location for a specific id.
- Parameters
-
[in] loc_id LocationId key for TestingScheme to be added. [in] scheme TestingScheme to be added.
◆ add_scheme() [2/3]
| void mio::abm::TestingStrategy::add_scheme | ( | const LocationType & | loc_type, |
| const TestingScheme & | scheme | ||
| ) |
Add a TestingScheme to the set of schemes that are checked for testing at a certain Location.
- Parameters
-
[in] loc_type LocationType key for TestingScheme to add. [in] scheme TestingScheme to be added.
◆ add_scheme() [3/3]
|
inline |
Add a TestingScheme to the set of schemes that are checked for testing at a certain Location.
- Parameters
-
[in] loc_type Vector of LocationType key for TestingScheme to add. [in] scheme TestingScheme to be added.
◆ default_serialize()
|
inline |
This method is used by the default serialization feature.
◆ run_and_check()
| bool mio::abm::TestingStrategy::run_and_check | ( | PersonalRandomNumberGenerator & | rng, |
| Person & | person, | ||
| const Location & | location, | ||
| TimePoint | t | ||
| ) |
Runs the TestingStrategy and potentially tests a Person when entering.
The TestingStrategy runs the TestingSchemes in the order they are added but first IDs and then types. It also decides if one can enter, if there are no positive tests, home is always allowed.
- Parameters
-
[in,out] rng PersonalRandomNumberGenerator of the Person being tested. [in] person Person to check. [in] location Location to check. [in] t TimePoint when to run the strategy.
Member Data Documentation
◆ m_testing_schemes_at_location_id
|
private |
Set of schemes that are checked for testing in specific locations.
◆ m_testing_schemes_at_location_type
|
private |
Set of schemes that are checked for testing in overall locations types.
Generated by