Implements iterator functions for libraries.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
0b50d2bf43
commit
a47f60cdf7
|
@ -27,6 +27,8 @@ namespace CreatureLib::Library {
|
||||||
|
|
||||||
void LoadAttack(const std::string& name, const AttackData* attack);
|
void LoadAttack(const std::string& name, const AttackData* attack);
|
||||||
void DeleteAttack(const std::string& name);
|
void DeleteAttack(const std::string& name);
|
||||||
|
|
||||||
|
const std::unordered_map<std::string, const AttackData*>& GetIterator() { return _attacks; }
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,8 @@ namespace CreatureLib::Library {
|
||||||
[[nodiscard]] const std::string& GetName() const;
|
[[nodiscard]] const std::string& GetName() const;
|
||||||
|
|
||||||
void SetVariant(const std::string& name, const SpeciesVariant* variant);
|
void SetVariant(const std::string& name, const SpeciesVariant* variant);
|
||||||
|
|
||||||
|
const std::unordered_map<std::string, const SpeciesVariant*>& GetVariantsIterator() { return _variants; }
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,8 @@ namespace CreatureLib::Library {
|
||||||
|
|
||||||
void LoadItem(const std::string& name, const Item* item);
|
void LoadItem(const std::string& name, const Item* item);
|
||||||
void DeleteItem(const std::string& name);
|
void DeleteItem(const std::string& name);
|
||||||
|
|
||||||
|
const std::unordered_map<std::string, const Item*>& GetIterator() { return _items; }
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,8 @@ namespace CreatureLib::Library {
|
||||||
void DeleteSpecies(const std::string& name);
|
void DeleteSpecies(const std::string& name);
|
||||||
|
|
||||||
size_t GetCount() const { return _species.size(); }
|
size_t GetCount() const { return _species.size(); }
|
||||||
|
|
||||||
|
const std::unordered_map<std::string, const CreatureSpecies*>& GetIterator() { return _species; }
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue