![]() |
FireSTARR
|
Provides ability to look up a fuel type based on name or code. More...
#include <FuelLookup.h>
Public Member Functions | |
FuelLookup (const char *filename) | |
Construct by reading from a file. | |
FuelLookup (const FuelLookup &rhs) noexcept=default | |
Copy constructor. | |
FuelLookup (FuelLookup &&rhs) noexcept=default | |
Move constructor. | |
FuelLookup & | operator= (const FuelLookup &rhs) noexcept=default |
Copy assignment. | |
FuelLookup & | operator= (FuelLookup &&rhs) noexcept=default |
Move assignment. | |
const FuelType * | codeToFuel (FuelSize value, FuelSize nodata) const |
Look up a FuelType based on the given code. | |
void | listFuels () const |
List all fuels and their codes. | |
FuelSize | fuelToCode (const FuelType *fuel) const |
Look up the original code for the given FuelType. | |
const FuelType * | operator() (FuelSize value, FuelSize nodata) const |
Look up a FuelType ba1ed on the given code. | |
set< const FuelType * > | usedFuels () const |
Retrieve set of FuelTypes that are used in the lookup table. | |
const FuelType * | byName (const string &name) const |
Look up a FuelType based on the given name. | |
const FuelType * | bySimplifiedName (const string &name) const |
Look up a FuelType based on the given simplified name. | |
Static Public Attributes | |
static const array< const FuelType *, NUMBER_OF_FUELS > | Fuels |
Array of all FuelTypes available to be used in simulations. | |
Private Attributes | |
shared_ptr< FuelLookupImpl > | impl_ |
Implementation class for FuelLookup. | |
Provides ability to look up a fuel type based on name or code.
|
explicit |
Construct by reading from a file.
filename | File to read from. Uses .lut format from Prometheus |
|
defaultnoexcept |
Copy constructor.
rhs | FuelLookup to copy from |
|
defaultnoexcept |
Move constructor.
rhs | FuelLookup to move from |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
nodiscard |
|
defaultnoexcept |
|
defaultnoexcept |
|
nodiscard |
Retrieve set of FuelTypes that are used in the lookup table.