CorsixTH engine (the C++ part)
Open source implementation of Theme Hospital
Loading...
Searching...
No Matches
Public Member Functions | List of all members
lua_persist_basic_reader Class Reference

Basic implementation of depersistence interface. More...

Inheritance diagram for lua_persist_basic_reader:
lua_persist_reader

Public Member Functions

 lua_persist_basic_reader (lua_State *L, const uint8_t *pData, size_t iLength)
 
 ~lua_persist_basic_reader () override=default
 
lua_Stateget_stack () override
 
void set_error (const char *sError) override
 
void init ()
 
bool read_stack_object () override
 
void save_stack_object ()
 
bool read_table_contents ()
 
bool finish ()
 
bool read_byte_stream (uint8_t *pBytes, size_t iCount) override
 
bool read_byte_stream (std::string &bytes, size_t iCount)
 
const uint8_t * get_pointer ()
 
uint64_t get_object_count ()
 
const charget_error ()
 
- Public Member Functions inherited from lua_persist_reader
virtual ~lua_persist_reader ()=default
 
template<class T >
bool read_uint (T &tValue)
 
template<class T >
bool read_int (T &tValue)
 
template<class T >
bool read_float (T &fValue)
 

Detailed Description

Basic implementation of depersistence interface.

self - Instance of lua_persist_basic_reader allocated as a Lua userdata self environment: [-3] - self [-2] - pre-populated prototype persistence code <name> - <code> [-1] - pre-populated prototype persistence filenames <name> - <filename> [ 0] - permanents table <index> - object already depersisted self metatable: __gc - ~lua_persist_basic_reader (via l_crude_gc) <N> - userdata to have second __depersist call

Constructor & Destructor Documentation

◆ lua_persist_basic_reader()

lua_persist_basic_reader::lua_persist_basic_reader ( lua_State L,
const uint8_t *  pData,
size_t  iLength 
)
inline

◆ ~lua_persist_basic_reader()

lua_persist_basic_reader::~lua_persist_basic_reader ( )
overridedefault

Member Function Documentation

◆ finish()

bool lua_persist_basic_reader::finish ( )
inline

◆ get_error()

const char * lua_persist_basic_reader::get_error ( )
inline

◆ get_object_count()

uint64_t lua_persist_basic_reader::get_object_count ( )
inline

◆ get_pointer()

const uint8_t * lua_persist_basic_reader::get_pointer ( )
inline

◆ get_stack()

lua_State * lua_persist_basic_reader::get_stack ( )
inlineoverridevirtual

Implements lua_persist_reader.

◆ init()

void lua_persist_basic_reader::init ( )
inline

◆ read_byte_stream() [1/2]

bool lua_persist_basic_reader::read_byte_stream ( std::string &  bytes,
size_t  iCount 
)
inline

◆ read_byte_stream() [2/2]

bool lua_persist_basic_reader::read_byte_stream ( uint8_t *  pBytes,
size_t  iCount 
)
inlineoverridevirtual

Implements lua_persist_reader.

◆ read_stack_object()

bool lua_persist_basic_reader::read_stack_object ( )
inlineoverridevirtual

Implements lua_persist_reader.

◆ read_table_contents()

bool lua_persist_basic_reader::read_table_contents ( )
inline

◆ save_stack_object()

void lua_persist_basic_reader::save_stack_object ( )
inline

◆ set_error()

void lua_persist_basic_reader::set_error ( const char sError)
inlineoverridevirtual

Implements lua_persist_reader.


The documentation for this class was generated from the following file: