liblcf
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
LSD_Reader Namespace Reference

Classes

struct  ChunkSave
 
struct  ChunkSaveActor
 
struct  ChunkSaveCommonEvent
 
struct  ChunkSaveEventCommands
 
struct  ChunkSaveEventData
 
struct  ChunkSaveEvents
 
struct  ChunkSaveInventory
 
struct  ChunkSaveMapEvent
 
struct  ChunkSaveMapInfo
 
struct  ChunkSavePartyLocation
 
struct  ChunkSavePicture
 
struct  ChunkSaveScreen
 
struct  ChunkSaveSystem
 
struct  ChunkSaveTarget
 
struct  ChunkSaveTitle
 
struct  ChunkSaveVehicleLocation
 

Functions

double ToTDateTime (std::time_t const t)
 
std::time_t ToUnixTimestamp (double const ms)
 
double GenerateTimestamp (std::time_t const t=std::time(NULL))
 
std::auto_ptr< RPG::SaveLoad (const std::string &filename, const std::string &encoding)
 
bool Save (const std::string &filename, const RPG::Save &save, const std::string &encoding)
 
bool SaveXml (const std::string &filename, const RPG::Save &save)
 
std::auto_ptr< RPG::SaveLoadXml (const std::string &filename)
 

Detailed Description

LSD Reader namespace.

Function Documentation

double LSD_Reader::GenerateTimestamp ( std::time_t const  t = std::time(NULL))

Returns current system time encoded in Delphi's TDateTime format.

Definition at line 25 of file lsd_reader.cpp.

References ToTDateTime().

Referenced by Save().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::auto_ptr< RPG::Save > LSD_Reader::Load ( const std::string &  filename,
const std::string &  encoding 
)

Loads Savegame.

Definition at line 29 of file lsd_reader.cpp.

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

+ Here is the call graph for this function:

std::auto_ptr< RPG::Save > LSD_Reader::LoadXml ( const std::string &  filename)

Loads Savegame as XML.

Definition at line 78 of file lsd_reader.cpp.

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

+ Here is the call graph for this function:

bool LSD_Reader::Save ( const std::string &  filename,
const RPG::Save save,
const std::string &  encoding 
)

Saves Savegame.

Definition at line 49 of file lsd_reader.cpp.

References GenerateTimestamp(), LcfWriter::IsOk(), LcfReader::SetError(), LcfWriter::Write(), LcfWriter::WriteInt(), and Struct< S >::WriteLcf().

+ Here is the call graph for this function:

bool LSD_Reader::SaveXml ( const std::string &  filename,
const RPG::Save save 
)

Definition at line 65 of file lsd_reader.cpp.

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

+ Here is the call graph for this function:

double LSD_Reader::ToTDateTime ( std::time_t const  t)

Converts from UNIX timestamp to Delphi's TDateTime format.

Definition at line 16 of file lsd_reader.cpp.

Referenced by GenerateTimestamp().

+ Here is the caller graph for this function:

std::time_t LSD_Reader::ToUnixTimestamp ( double const  ms)

Converts from Delphi's TDateTime format to UNIX timestamp.

Definition at line 21 of file lsd_reader.cpp.