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

Stores the metadata of all peoplemon moves. More...

#include <MoveDB.hpp>

+ Inheritance diagram for core::file::MoveDB:

Public Member Functions

bool load ()
 Loads the moves 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
 Saves the moves 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< pplmn::MoveId, std::string > names
 
std::unordered_map< pplmn::MoveId, std::string > descriptions
 
std::unordered_map< pplmn::MoveId, pplmn::Typetypes
 
std::unordered_map< pplmn::MoveId, std::int32_t > damages
 
std::unordered_map< pplmn::MoveId, std::int32_t > accuracies
 
std::unordered_map< pplmn::MoveId, std::int32_t > priorities
 
std::unordered_map< pplmn::MoveId, std::uint32_t > pps
 
std::unordered_map< pplmn::MoveId, bool > contactors
 
std::unordered_map< pplmn::MoveId, bool > specials
 
std::unordered_map< pplmn::MoveId, pplmn::MoveEffecteffects
 
std::unordered_map< pplmn::MoveId, std::int32_t > effectChances
 
std::unordered_map< pplmn::MoveId, std::int32_t > effectIntensities
 
std::unordered_map< pplmn::MoveId, bool > effectSelves
 

Detailed Description

Stores the metadata of all peoplemon moves.

Definition at line 22 of file MoveDB.hpp.

Member Function Documentation

◆ load()

bool core::file::MoveDB::load ( )

Loads the moves from the data file.

Returns
True on success, false on error

Definition at line 12 of file MoveDB.cpp.

◆ loadDev()

bool core::file::MoveDB::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 14 of file MoveDB.cpp.

◆ loadProd()

bool core::file::MoveDB::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 18 of file MoveDB.cpp.

◆ save()

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

Saves the moves to the data file.

Returns
True on success, false on error

Definition at line 22 of file MoveDB.cpp.

◆ saveBundle()

bool core::file::MoveDB::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 27 of file MoveDB.cpp.

Member Data Documentation

◆ accuracies

std::unordered_map<pplmn::MoveId, std::int32_t> core::file::MoveDB::accuracies

Definition at line 67 of file MoveDB.hpp.

◆ contactors

std::unordered_map<pplmn::MoveId, bool> core::file::MoveDB::contactors

Definition at line 70 of file MoveDB.hpp.

◆ damages

std::unordered_map<pplmn::MoveId, std::int32_t> core::file::MoveDB::damages

Definition at line 66 of file MoveDB.hpp.

◆ descriptions

std::unordered_map<pplmn::MoveId, std::string> core::file::MoveDB::descriptions

Definition at line 64 of file MoveDB.hpp.

◆ effectChances

std::unordered_map<pplmn::MoveId, std::int32_t> core::file::MoveDB::effectChances

Definition at line 73 of file MoveDB.hpp.

◆ effectIntensities

std::unordered_map<pplmn::MoveId, std::int32_t> core::file::MoveDB::effectIntensities

Definition at line 74 of file MoveDB.hpp.

◆ effects

std::unordered_map<pplmn::MoveId, pplmn::MoveEffect> core::file::MoveDB::effects

Definition at line 72 of file MoveDB.hpp.

◆ effectSelves

std::unordered_map<pplmn::MoveId, bool> core::file::MoveDB::effectSelves

Definition at line 75 of file MoveDB.hpp.

◆ names

std::unordered_map<pplmn::MoveId, std::string> core::file::MoveDB::names

Definition at line 63 of file MoveDB.hpp.

◆ pps

std::unordered_map<pplmn::MoveId, std::uint32_t> core::file::MoveDB::pps

Definition at line 69 of file MoveDB.hpp.

◆ priorities

std::unordered_map<pplmn::MoveId, std::int32_t> core::file::MoveDB::priorities

Definition at line 68 of file MoveDB.hpp.

◆ specials

std::unordered_map<pplmn::MoveId, bool> core::file::MoveDB::specials

Definition at line 71 of file MoveDB.hpp.

◆ types

std::unordered_map<pplmn::MoveId, pplmn::Type> core::file::MoveDB::types

Definition at line 65 of file MoveDB.hpp.


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