Implementation class for FuelLookup.
More...
|
array< const FuelType *, numeric_limits< FuelSize >::max()> * | fuel_types_ |
| Array of all possible fuel types.
|
|
unordered_map< const FuelType *, FuelSize > | fuel_grid_codes_ {} |
| Map of FuelType to (first) original grid value.
|
|
unordered_map< string, const FuelType * > | fuel_by_name_ {} |
| Map of fuel name to FuelType.
|
|
unordered_map< string, const FuelType * > | fuel_by_simplified_name_ {} |
| Map of simplified fuel name to FuelType.
|
|
unordered_map< string, bool > | used_by_name_ {} |
| Map of fuel name to whether or not it is used in this simulation.
|
|
unordered_map< FuelSize, vector< string > > | fuel_good_values_ {} |
| Codes from input .lut that were for fuel types that are implemented.
|
|
unordered_map< FuelSize, vector< string > > | fuel_bad_values_ {} |
| Codes from input .lut that were for fuel types that are not implemented.
|
|
Implementation class for FuelLookup.
◆ FuelLookupImpl()
fs::fuel::FuelLookupImpl::FuelLookupImpl |
( |
const char * | filename | ) |
|
|
inlineexplicit |
Construct by reading from a file.
- Parameters
-
filename | File to read from. Uses .lut format from Prometheus |
◆ byName()
const FuelType * fs::fuel::FuelLookupImpl::byName |
( |
const string & | name | ) |
const |
|
inline |
Look up a FuelType based on the given name.
- Parameters
-
name | Name of the fuel to find |
- Returns
- FuelType based on the given name
◆ bySimplifiedName()
const FuelType * fs::fuel::FuelLookupImpl::bySimplifiedName |
( |
const string & | name | ) |
const |
|
inline |
Look up a FuelType based on the given simplified name.
- Parameters
-
name | Simplified name of the fuel to find |
- Returns
- FuelType based on the given name
◆ codeToFuel()
const FuelType * fs::fuel::FuelLookupImpl::codeToFuel |
( |
const FuelSize | value, |
|
|
const FuelSize | nodata ) const |
|
inline |
Look up a FuelType based on the given code.
- Parameters
-
value | Value to use for lookup |
nodata | Value that represents no data |
- Returns
- FuelType based on the given code
◆ emplaceFuel() [1/2]
void fs::fuel::FuelLookupImpl::emplaceFuel |
( |
const FuelType * | fuel | ) |
|
|
inline |
Put fuel into lookup table based on name.
- Parameters
-
fuel | FuelType to put into lookup table based on its name |
◆ emplaceFuel() [2/2]
void fs::fuel::FuelLookupImpl::emplaceFuel |
( |
const string & | name, |
|
|
const FuelType * | fuel ) |
|
inline |
Put fuel into lookup table based on name.
- Parameters
-
name | Name to use for FuelType in lookup table |
fuel | FuelType to put into lookup table |
◆ fuelToCode()
FuelSize fs::fuel::FuelLookupImpl::fuelToCode |
( |
const FuelType *const | value | ) |
const |
|
inline |
Look up the original grid code for a FuelType.
- Parameters
-
value | Value to use for lookup |
- Returns
- Original grid code for the FuelType
◆ usedFuels()
set< const FuelType * > fs::fuel::FuelLookupImpl::usedFuels |
( |
| ) |
const |
|
inline |
Create a set of all FuelTypes used in this lookup table.
- Returns
- Set of all FuelTypes used in this lookup table
The documentation for this class was generated from the following file:
- firestarr/src/cpp/FuelLookup.cpp