Peoplemon  0.1.0
Peoplemon 3 game source documentation
Public Member Functions | Public Attributes | List of all members
core::file::PeoplemonDB Struct Reference

Data structure that holds the underlaying data for all the peoplemon. More...

#include <PeoplemonDB.hpp>

+ Inheritance diagram for core::file::PeoplemonDB:

Public Member Functions

bool save () const
 Saves the database data to the save file. More...
 
bool load ()
 Loads the database data from the save 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 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< pplmn::Id, std::string > names
 
std::unordered_map< pplmn::Id, std::string > descriptions
 
std::unordered_map< pplmn::Id, pplmn::Typetypes
 
std::unordered_map< pplmn::Id, pplmn::SpecialAbilityabilities
 
std::unordered_map< pplmn::Id, pplmn::Statsstats
 
std::unordered_map< pplmn::Id, std::unordered_set< pplmn::MoveId > > validMoves
 
std::unordered_map< pplmn::Id, std::unordered_map< unsigned int, pplmn::MoveId > > learnedMoves
 
std::unordered_map< pplmn::Id, unsigned int > evolveLevels
 
std::unordered_map< pplmn::Id, pplmn::IdevolveIds
 
std::unordered_map< pplmn::Id, pplmn::StatsevAwards
 
std::unordered_map< pplmn::Id, unsigned int > xpGroups
 
std::unordered_map< pplmn::Id, int > xpMults
 
std::unordered_map< pplmn::Id, int > catchRates
 

Detailed Description

Data structure that holds the underlaying data for all the peoplemon.

Definition at line 26 of file PeoplemonDB.hpp.

Member Function Documentation

◆ load()

bool core::file::PeoplemonDB::load ( )

Loads the database data from the save file.

Definition at line 12 of file PeoplemonDB.cpp.

◆ loadDev()

bool core::file::PeoplemonDB::loadDev ( std::istream &  input)

Loads the database from its json format.

Parameters
inputThe input stream to load from
Returns
True if the data could be loaded, false otherwise

Definition at line 16 of file PeoplemonDB.cpp.

◆ loadProd()

bool core::file::PeoplemonDB::loadProd ( bl::serial::binary::InputStream &  input)

Loads the database from its json format.

Parameters
inputThe input stream to load from
Returns
True if the data could be loaded, false otherwise

Definition at line 20 of file PeoplemonDB.cpp.

◆ save()

bool core::file::PeoplemonDB::save ( ) const

Saves the database data to the save file.

Definition at line 24 of file PeoplemonDB.cpp.

◆ saveBundle()

bool core::file::PeoplemonDB::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.

Parameters
outputStream to output to
ctxContext to register dependencies with
Returns
True if serialization succeeded, false otherwise

Definition at line 29 of file PeoplemonDB.cpp.

Member Data Documentation

◆ abilities

std::unordered_map<pplmn::Id, pplmn::SpecialAbility> core::file::PeoplemonDB::abilities

Definition at line 68 of file PeoplemonDB.hpp.

◆ catchRates

std::unordered_map<pplmn::Id, int> core::file::PeoplemonDB::catchRates

Definition at line 77 of file PeoplemonDB.hpp.

◆ descriptions

std::unordered_map<pplmn::Id, std::string> core::file::PeoplemonDB::descriptions

Definition at line 66 of file PeoplemonDB.hpp.

◆ evAwards

std::unordered_map<pplmn::Id, pplmn::Stats> core::file::PeoplemonDB::evAwards

Definition at line 74 of file PeoplemonDB.hpp.

◆ evolveIds

std::unordered_map<pplmn::Id, pplmn::Id> core::file::PeoplemonDB::evolveIds

Definition at line 73 of file PeoplemonDB.hpp.

◆ evolveLevels

std::unordered_map<pplmn::Id, unsigned int> core::file::PeoplemonDB::evolveLevels

Definition at line 72 of file PeoplemonDB.hpp.

◆ learnedMoves

std::unordered_map<pplmn::Id, std::unordered_map<unsigned int, pplmn::MoveId> > core::file::PeoplemonDB::learnedMoves

Definition at line 71 of file PeoplemonDB.hpp.

◆ names

std::unordered_map<pplmn::Id, std::string> core::file::PeoplemonDB::names

Definition at line 65 of file PeoplemonDB.hpp.

◆ stats

std::unordered_map<pplmn::Id, pplmn::Stats> core::file::PeoplemonDB::stats

Definition at line 69 of file PeoplemonDB.hpp.

◆ types

std::unordered_map<pplmn::Id, pplmn::Type> core::file::PeoplemonDB::types

Definition at line 67 of file PeoplemonDB.hpp.

◆ validMoves

std::unordered_map<pplmn::Id, std::unordered_set<pplmn::MoveId> > core::file::PeoplemonDB::validMoves

Definition at line 70 of file PeoplemonDB.hpp.

◆ xpGroups

std::unordered_map<pplmn::Id, unsigned int> core::file::PeoplemonDB::xpGroups

Definition at line 75 of file PeoplemonDB.hpp.

◆ xpMults

std::unordered_map<pplmn::Id, int> core::file::PeoplemonDB::xpMults

Definition at line 76 of file PeoplemonDB.hpp.


The documentation for this struct was generated from the following files: