![]() |
Peoplemon
0.1.0
Peoplemon 3 game source documentation
|
Loads and stores metadata surrounding items in the game. More...
#include <ItemDB.hpp>
Public Member Functions | |
bool | load () |
Loads the item metadata from the data file. More... | |
bool | loadDev (std::istream &input) |
Loads the database from its json format. More... | |
bool | loadProd (bl::serial::binary::InputStream &input) |
Loads the database from its json format. More... | |
bool | save () const |
Writes the item metadata to the data file. More... | |
bool | saveBundle (bl::serial::binary::OutputStream &output, bl::resource::bundle::FileHandlerContext &ctx) const |
Saves the data from this object to the given bundle and registers depency files if any. More... | |
Public Attributes | |
std::unordered_map< item::Id, std::string > | names |
std::unordered_map< item::Id, std::string > | descriptions |
std::unordered_map< item::Id, std::int32_t > | values |
Loads and stores metadata surrounding items in the game.
Definition at line 24 of file ItemDB.hpp.
bool core::file::ItemDB::load | ( | ) |
Loads the item metadata from the data file.
Definition at line 11 of file ItemDB.cpp.
bool core::file::ItemDB::loadDev | ( | std::istream & | input | ) |
Loads the database from its json format.
input | The input stream to load from |
Definition at line 15 of file ItemDB.cpp.
bool core::file::ItemDB::loadProd | ( | bl::serial::binary::InputStream & | input | ) |
Loads the database from its json format.
input | The input stream to load from |
Definition at line 19 of file ItemDB.cpp.
bool core::file::ItemDB::save | ( | ) | const |
Writes the item metadata to the data file.
Definition at line 23 of file ItemDB.cpp.
bool core::file::ItemDB::saveBundle | ( | bl::serial::binary::OutputStream & | output, |
bl::resource::bundle::FileHandlerContext & | ctx | ||
) | const |
Saves the data from this object to the given bundle and registers depency files if any.
output | Stream to output to |
ctx | Context to register dependencies with |
Definition at line 28 of file ItemDB.cpp.
std::unordered_map<item::Id, std::string> core::file::ItemDB::descriptions |
Definition at line 66 of file ItemDB.hpp.
std::unordered_map<item::Id, std::string> core::file::ItemDB::names |
Definition at line 65 of file ItemDB.hpp.
std::unordered_map<item::Id, std::int32_t> core::file::ItemDB::values |
Definition at line 67 of file ItemDB.hpp.