liblcf
LMT_Reader Namespace Reference

Classes

struct  ChunkEncounter
 
struct  ChunkMapInfo
 
struct  ChunkStart
 

Functions

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

LMT Reader namespace.

Function Documentation

◆ Load() [1/2]

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

Loads Map Tree.

Definition at line 20 of file lmt_reader.cpp.

◆ Load() [2/2]

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

Loads Map Tree.

Definition at line 56 of file lmt_reader.cpp.

References LcfReader::IsOk(), RPG::TreeMap::lmt_header, LcfReader::ReadInt(), LcfReader::ReadString(), LcfReader::SetError(), and Data::treemap.

+ Here is the call graph for this function:

◆ LoadXml() [1/2]

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

Loads Map Tree as XML.

Definition at line 47 of file lmt_reader.cpp.

◆ LoadXml() [2/2]

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

Loads Map Tree as XML.

Definition at line 106 of file lmt_reader.cpp.

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

+ Here is the call graph for this function:

◆ Save() [1/2]

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

Saves Map Tree.

Definition at line 29 of file lmt_reader.cpp.

◆ Save() [2/2]

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

Saves Map Tree.

Definition at line 76 of file lmt_reader.cpp.

References ePreserveHeader, LcfWriter::IsOk(), RPG::TreeMap::lmt_header, LcfReader::SetError(), Data::treemap, LcfWriter::Write(), and LcfWriter::WriteInt().

+ Here is the call graph for this function:

◆ SaveXml() [1/2]

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

Saves Map Tree as XML.

Definition at line 38 of file lmt_reader.cpp.

◆ SaveXml() [2/2]

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

Saves Map Tree as XML.

Definition at line 94 of file lmt_reader.cpp.

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

+ Here is the call graph for this function: