liblcf
LDB_Reader Namespace Reference

Classes

struct  ChunkActor
 
struct  ChunkAnimation
 
struct  ChunkAnimationCellData
 
struct  ChunkAnimationFrame
 
struct  ChunkAnimationTiming
 
struct  ChunkAttribute
 
struct  ChunkBattleCommand
 
struct  ChunkBattleCommands
 
struct  ChunkBattlerAnimation
 
struct  ChunkBattlerAnimationData
 
struct  ChunkBattlerAnimationExtension
 
struct  ChunkChipset
 
struct  ChunkClass
 
struct  ChunkCommonEvent
 
struct  ChunkDatabase
 
struct  ChunkEnemy
 
struct  ChunkEnemyAction
 
struct  ChunkItem
 
struct  ChunkItemAnimation
 
struct  ChunkLearning
 
struct  ChunkMusic
 
struct  ChunkSkill
 
struct  ChunkSound
 
struct  ChunkState
 
struct  ChunkSwitch
 
struct  ChunkSystem
 
struct  ChunkTerms
 
struct  ChunkTerrain
 
struct  ChunkTestBattler
 
struct  ChunkTroop
 
struct  ChunkTroopMember
 
struct  ChunkTroopPage
 
struct  ChunkTroopPageCondition
 
struct  ChunkVariable
 

Functions

void PrepareSave (RPG::Database &db)
 
bool Load (const std::string &filename, const std::string &encoding)
 
bool Save (const std::string &filename, const std::string &encoding, SaveOpt opt=SaveOpt::eNone)
 
bool SaveXml (const std::string &filename)
 
bool LoadXml (const std::string &filename)
 
bool Load (std::istream &filestream, const std::string &encoding)
 
bool Save (std::ostream &filestream, const std::string &encoding, SaveOpt opt=SaveOpt::eNone)
 
bool SaveXml (std::ostream &filestream)
 
bool LoadXml (std::istream &filestream)
 

Detailed Description

LDB Reader namespace.

Function Documentation

◆ Load() [1/2]

bool LDB_Reader::Load ( const std::string &  filename,
const std::string &  encoding 
)

Loads Database.

Definition at line 24 of file ldb_reader.cpp.

Referenced by ReaderUtil::DetectEncodings().

+ Here is the caller graph for this function:

◆ Load() [2/2]

bool LDB_Reader::Load ( std::istream &  filestream,
const std::string &  encoding 
)

Loads Database.

Definition at line 60 of file ldb_reader.cpp.

References Data::actors, Data::data, LcfReader::IsOk(), RPG::Database::ldb_header, LcfReader::ReadInt(), LcfReader::ReadString(), and LcfReader::SetError().

+ Here is the call graph for this function:

◆ LoadXml() [1/2]

bool LDB_Reader::LoadXml ( const std::string &  filename)

Load Database as XML.

Definition at line 51 of file ldb_reader.cpp.

◆ LoadXml() [2/2]

bool LDB_Reader::LoadXml ( std::istream &  filestream)

Load Database as XML.

Definition at line 118 of file ldb_reader.cpp.

References Data::data, XmlReader::IsOk(), XmlReader::Parse(), LcfReader::SetError(), and XmlReader::SetHandler().

+ Here is the call graph for this function:

◆ PrepareSave()

void LDB_Reader::PrepareSave ( RPG::Database db)

Increment the database save_count.

Definition at line 20 of file ldb_reader.cpp.

References RPG::System::save_count, and RPG::Database::system.

◆ Save() [1/2]

bool LDB_Reader::Save ( const std::string &  filename,
const std::string &  encoding,
SaveOpt  opt = SaveOpt::eNone 
)

Saves Database.

Definition at line 33 of file ldb_reader.cpp.

Referenced by LSD_Reader::Load(), and LSD_Reader::LoadXml().

+ Here is the caller graph for this function:

◆ Save() [2/2]

bool LDB_Reader::Save ( std::ostream &  filestream,
const std::string &  encoding,
SaveOpt  opt = SaveOpt::eNone 
)

Saves Database.

Definition at line 88 of file ldb_reader.cpp.

References Data::data, ePreserveHeader, LcfWriter::IsOk(), RPG::Database::ldb_header, LcfReader::SetError(), LcfWriter::Write(), and LcfWriter::WriteInt().

+ Here is the call graph for this function:

◆ SaveXml() [1/2]

bool LDB_Reader::SaveXml ( const std::string &  filename)

Saves Database as XML.

Definition at line 42 of file ldb_reader.cpp.

◆ SaveXml() [2/2]

bool LDB_Reader::SaveXml ( std::ostream &  filestream)

Saves Database as XML.

Definition at line 106 of file ldb_reader.cpp.

References XmlWriter::BeginElement(), Data::data, XmlWriter::EndElement(), XmlWriter::IsOk(), and LcfReader::SetError().

+ Here is the call graph for this function: