liblcf
LMU_Reader Namespace Reference

Classes

struct  ChunkEvent
 
struct  ChunkEventPage
 
struct  ChunkEventPageCondition
 
struct  ChunkMap
 
struct  ChunkMoveRoute
 

Functions

void PrepareSave (RPG::Map &map)
 
std::unique_ptr< RPG::MapLoad (const std::string &filename, const std::string &encoding)
 
bool Save (const std::string &filename, const RPG::Map &map, const std::string &encoding, SaveOpt opt=SaveOpt::eNone)
 
bool SaveXml (const std::string &filename, const RPG::Map &map)
 
std::unique_ptr< RPG::MapLoadXml (const std::string &filename)
 
std::unique_ptr< RPG::MapLoad (std::istream &filestream, const std::string &encoding)
 
bool Save (std::ostream &filestream, const RPG::Map &map, const std::string &encoding, SaveOpt opt=SaveOpt::eNone)
 
bool SaveXml (std::ostream &filestream, const RPG::Map &map)
 
std::unique_ptr< RPG::MapLoadXml (std::istream &filestream)
 

Detailed Description

LMU Reader namespace.

Function Documentation

◆ Load() [1/2]

std::unique_ptr< RPG::Map > LMU_Reader::Load ( const std::string &  filename,
const std::string &  encoding 
)

Loads map.

Definition at line 24 of file lmu_reader.cpp.

◆ Load() [2/2]

std::unique_ptr< RPG::Map > LMU_Reader::Load ( std::istream &  filestream,
const std::string &  encoding 
)

Loads map.

Definition at line 60 of file lmu_reader.cpp.

References LcfReader::IsOk(), LcfReader::ReadInt(), Struct< S >::ReadLcf(), LcfReader::ReadString(), and LcfReader::SetError().

+ Here is the call graph for this function:

◆ LoadXml() [1/2]

std::unique_ptr< RPG::Map > LMU_Reader::LoadXml ( const std::string &  filename)

Loads map as XML.

Definition at line 51 of file lmu_reader.cpp.

◆ LoadXml() [2/2]

std::unique_ptr< RPG::Map > LMU_Reader::LoadXml ( std::istream &  filestream)

Loads map as XML.

Definition at line 113 of file lmu_reader.cpp.

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

+ Here is the call graph for this function:

◆ PrepareSave()

void LMU_Reader::PrepareSave ( RPG::Map map)

Increment the map save count.

Definition at line 20 of file lmu_reader.cpp.

References RPG::Map::save_count.

◆ Save() [1/2]

bool LMU_Reader::Save ( const std::string &  filename,
const RPG::Map map,
const std::string &  encoding,
SaveOpt  opt = SaveOpt::eNone 
)

Saves map.

Definition at line 33 of file lmu_reader.cpp.

◆ Save() [2/2]

bool LMU_Reader::Save ( std::ostream &  filestream,
const RPG::Map map,
const std::string &  encoding,
SaveOpt  opt = SaveOpt::eNone 
)

Saves map.

Definition at line 82 of file lmu_reader.cpp.

References ePreserveHeader, LcfWriter::IsOk(), RPG::Map::lmu_header, LcfReader::SetError(), LcfWriter::Write(), LcfWriter::WriteInt(), and Struct< S >::WriteLcf().

+ Here is the call graph for this function:

◆ SaveXml() [1/2]

bool LMU_Reader::SaveXml ( const std::string &  filename,
const RPG::Map map 
)

Saves map as XML.

Definition at line 42 of file lmu_reader.cpp.

◆ SaveXml() [2/2]

bool LMU_Reader::SaveXml ( std::ostream &  filestream,
const RPG::Map map 
)

Saves map as XML.

Definition at line 101 of file lmu_reader.cpp.

References XmlWriter::BeginElement(), XmlWriter::EndElement(), XmlWriter::IsOk(), LcfReader::SetError(), and Struct< S >::WriteXml().

+ Here is the call graph for this function: