#ifndef PKMNLIB_SPECIESLIBRARY_HPP #define PKMNLIB_SPECIESLIBRARY_HPP #include #include "PokemonSpecies.hpp" namespace PkmnLib::Library { class SpeciesLibrary : public CreatureLib::Library::SpeciesLibrary { ArbUt::Dictionary, ArbUt::BorrowedPtr> _preEvolutionCache; public: inline bool TryGet(const ArbUt::BasicStringView& name, ArbUt::BorrowedPtr& outSpecies) const { auto v = outSpecies.As(); auto res = CreatureLib::Library::SpeciesLibrary::TryGet(name, v); outSpecies = v.As(); return res; } inline ArbUt::BorrowedPtr Get(const ArbUt::BasicStringView& name) const { return CreatureLib::Library::SpeciesLibrary::Get(name).As(); } ArbUt::BorrowedPtr operator[](const ArbUt::BasicStringView& name) const { return Get(name); } ArbUt::BorrowedPtr FindPreEvolution(const ArbUt::BorrowedPtr& species) const noexcept; }; } #endif // PKMNLIB_SPECIESLIBRARY_HPP