28 using namespace ::
ant;
32 phene.present =
false;
33 phene.model =
nullptr;
36 if (
auto element = phene_element.find(
"present");
element != phene_element.end())
37 phene.present =
element->get<
bool>();
42 if (
auto element = phene_element.find(
"model");
element != phene_element.end())
54 auto sting_element = data->find(
"sting");
55 if (sting_element == data->end())
56 throw std::runtime_error(
"Invalid sting gene.");
static T * load(resource_manager *resourceManager, PHYSFS_File *file, const std::filesystem::path &path)
Loads resource data.
T * load(const std::filesystem::path &path)
Loads the requested resource.
nlohmann::json json
JSON data.
polyphenic_gene< phene::sting > sting
Polyphenic sting gene.
void deserialize_gene(monophenic_gene< T > &gene, void(*deserialize_phene)(T &, const json &, resource_manager *), const json &gene_element, resource_manager *resource_manager)
Deserializes a gene.