17string simplify_fuel_name(
const string& fuel);
81 [[nodiscard]] set<const FuelType*>
usedFuels()
const;
97 static const array<const FuelType*, NUMBER_OF_FUELS>
Fuels;
109[[nodiscard]]
constexpr const FuelType* fuel_by_code(
const FuelCodeSize& code)
118[[nodiscard]]
constexpr const FuelType* check_fuel(
const topo::Cell& cell)
120 return fuel_by_code(cell.
fuelCode());
127[[nodiscard]]
constexpr bool is_null_fuel(
const FuelType* fuel)
136[[nodiscard]]
constexpr bool is_null_fuel(
const topo::Cell& cell)
138 return is_null_fuel(fuel_by_code(cell.fuelCode()));
Provides ability to look up a fuel type based on name or code.
Definition FuelLookup.h:23
const FuelType * byName(const string &name) const
Look up a FuelType based on the given name.
Definition FuelLookup.cpp:653
const FuelType * codeToFuel(FuelSize value, FuelSize nodata) const
Look up a FuelType based on the given code.
Definition FuelLookup.cpp:633
FuelLookup & operator=(FuelLookup &&rhs) noexcept=default
Move assignment.
void listFuels() const
List all fuels and their codes.
Definition FuelLookup.cpp:637
FuelLookup(FuelLookup &&rhs) noexcept=default
Move constructor.
set< const FuelType * > usedFuels() const
Retrieve set of FuelTypes that are used in the lookup table.
Definition FuelLookup.cpp:649
const FuelType * bySimplifiedName(const string &name) const
Look up a FuelType based on the given simplified name.
Definition FuelLookup.cpp:657
static const array< const FuelType *, NUMBER_OF_FUELS > Fuels
Array of all FuelTypes available to be used in simulations.
Definition FuelLookup.h:97
shared_ptr< FuelLookupImpl > impl_
Implementation class for FuelLookup.
Definition FuelLookup.h:102
FuelLookup(const char *filename)
Construct by reading from a file.
Definition FuelLookup.cpp:661
FuelLookup & operator=(const FuelLookup &rhs) noexcept=default
Copy assignment.
const FuelType * operator()(FuelSize value, FuelSize nodata) const
Look up a FuelType ba1ed on the given code.
Definition FuelLookup.cpp:645
FuelSize fuelToCode(const FuelType *fuel) const
Look up the original code for the given FuelType.
Definition FuelLookup.cpp:641
FuelLookup(const FuelLookup &rhs) noexcept=default
Copy constructor.
An FBP fuel type.
Definition FuelType.h:55
static constexpr FuelCodeSize safeCode(const FuelType *fuel)
Convert FuelType to its code, or 0 if nullptr.
Definition FuelType.h:62
A Position with a Slope, Aspect, and Fuel.
Definition Cell.h:20
static constexpr FuelCodeSize fuelCode(const SpreadKey value) noexcept
Fuel.
Definition Cell.h:136