The Battle for Wesnoth  1.17.17+dev
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
lua_fileops::lua_filestream Class Reference

Public Member Functions

 lua_filestream (const std::string &fname)

Static Public Member Functions

static const char * lua_read_data (lua_State *, void *data, std::size_t *size)
static int lua_loadfile (lua_State *L, const std::string &fname, const std::string &relativename)

Private Attributes

char buff_ [luaL_buffersize]
const std::unique_ptr< std::istream > pistream_

Detailed Description

Definition at line 249 of file lua_fileops.cpp.

Constructor & Destructor Documentation

◆ lua_filestream()

lua_fileops::lua_filestream::lua_filestream ( const std::string &  fname)

Definition at line 252 of file lua_fileops.cpp.

Member Function Documentation

◆ lua_loadfile()

static int lua_fileops::lua_filestream::lua_loadfile ( lua_State *  L,
const std::string &  fname,
const std::string &  relativename 

Definition at line 278 of file lua_fileops.cpp.

References LOG_LUA, and lua_read_data().

Referenced by lua_fileops::load_file().

◆ lua_read_data()

static const char* lua_fileops::lua_filestream::lua_read_data ( lua_State *  ,
void *  data,
std::size_t *  size 

Definition at line 259 of file lua_fileops.cpp.

References buff_, data, ERR_LUA, pistream_, and utf8::size().

Referenced by lua_loadfile().

Member Data Documentation

◆ buff_

char lua_fileops::lua_filestream::buff_[luaL_buffersize]

Definition at line 287 of file lua_fileops.cpp.

Referenced by lua_read_data().

◆ pistream_

const std::unique_ptr<std::istream> lua_fileops::lua_filestream::pistream_

Definition at line 288 of file lua_fileops.cpp.

Referenced by lua_read_data().

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