#ifndef PKMNLIB_SPECIESLIBRARY_HPP #define PKMNLIB_SPECIESLIBRARY_HPP #include #include "PokemonSpecies.hpp" namespace PkmnLib::Library { class SpeciesLibrary : public CreatureLib::Library::SpeciesLibrary { public: inline bool TryGet(const ArbUt::CaseInsensitiveConstString& 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::CaseInsensitiveConstString& name) const { return CreatureLib::Library::SpeciesLibrary::Get(name).As(); } ArbUt::BorrowedPtr operator[](const ArbUt::CaseInsensitiveConstString& name) const { return Get(name); } void Insert(const ArbUt::CaseInsensitiveConstString& name, const PokemonSpecies* species) { CreatureLib::Library::SpeciesLibrary::Insert(name, species); } }; } #endif // PKMNLIB_SPECIESLIBRARY_HPP