CLua Class Reference

#include <clua.h>

List of all members.

Public Member Functions

 CLua (bool managed=true)
 ~CLua ()
lua_State * state ()
 operator lua_State * ()
void save (writer &outf)
void gc ()
void setglobal (const char *name)
void getglobal (const char *name)
std::string setuniqregistry ()
void setregistry (const char *name)
void getregistry (const char *name)
int loadbuffer (const char *buf, size_t size, const char *context)
int loadstring (const char *str, const char *context)
int execstring (const char *str, const char *context="init.txt", int nresults=0)
int execfile (const char *filename, bool trusted=false, bool die_on_fail=false, bool force=false)
void pushglobal (const std::string &name)
maybe_bool callmbooleanfn (const char *fn, const char *params,...)
bool callbooleanfn (bool defval, const char *fn, const char *params,...)
bool callfn (const char *fn, int nargs, int nret=1)
bool callfn (const char *fn, const char *params,...)
void fnreturns (const char *params,...)
bool runhook (const char *hook, const char *params,...)
void add_shutdown_listener (lua_shutdown_listener *)
void remove_shutdown_listener (lua_shutdown_listener *)
void print_stack ()

Static Public Member Functions

static CLuaget_vm (lua_State *)
static int file_write (lua_State *ls)
static int loadfile (lua_State *ls, const char *file, bool trusted=false, bool die_on_fail=false)
static bool is_path_safe (std::string file, bool trusted=false)
static bool is_managed_vm (lua_State *ls)

Public Attributes

std::string error
bool managed_vm
bool shutting_down
int throttle_unit_lines
int throttle_sleep_ms
int throttle_sleep_start
int throttle_sleep_end
int n_throttle_sleeps
int mixed_call_depth
int lua_call_depth
int max_mixed_call_depth
int max_lua_call_depth
long memory_used

Static Public Attributes

static const int MAX_THROTTLE_SLEEPS = 100

Friends

class lua_call_throttle

Classes

struct  CLuaSave


Constructor & Destructor Documentation

CLua::CLua ( bool  managed = true  ) 

CLua::~CLua (  ) 


Member Function Documentation

CLua & CLua::get_vm ( lua_State *  ls  )  [static]

lua_State * CLua::state (  ) 

CLua::operator lua_State * (  )  [inline]

Here is the call graph for this function:

void CLua::save ( writer outf  ) 

Here is the call graph for this function:

void CLua::gc (  ) 

Here is the call graph for this function:

void CLua::setglobal ( const char *  name  ) 

Here is the call graph for this function:

void CLua::getglobal ( const char *  name  ) 

Here is the call graph for this function:

std::string CLua::setuniqregistry (  ) 

Here is the call graph for this function:

void CLua::setregistry ( const char *  name  ) 

Here is the call graph for this function:

void CLua::getregistry ( const char *  name  ) 

Here is the call graph for this function:

int CLua::loadbuffer ( const char *  buf,
size_t  size,
const char *  context 
)

Here is the call graph for this function:

int CLua::loadstring ( const char *  str,
const char *  context 
)

Here is the call graph for this function:

int CLua::execstring ( const char *  str,
const char *  context = "init.txt",
int  nresults = 0 
)

Here is the call graph for this function:

int CLua::execfile ( const char *  filename,
bool  trusted = false,
bool  die_on_fail = false,
bool  force = false 
)

Here is the call graph for this function:

void CLua::pushglobal ( const std::string name  ) 

Here is the call graph for this function:

maybe_bool CLua::callmbooleanfn ( const char *  fn,
const char *  params,
  ... 
)

bool CLua::callbooleanfn ( bool  defval,
const char *  fn,
const char *  params,
  ... 
)

Here is the call graph for this function:

bool CLua::callfn ( const char *  fn,
int  nargs,
int  nret = 1 
)

Here is the call graph for this function:

bool CLua::callfn ( const char *  fn,
const char *  params,
  ... 
)

Here is the call graph for this function:

void CLua::fnreturns ( const char *  params,
  ... 
)

bool CLua::runhook ( const char *  hook,
const char *  params,
  ... 
)

Here is the call graph for this function:

void CLua::add_shutdown_listener ( lua_shutdown_listener listener  ) 

void CLua::remove_shutdown_listener ( lua_shutdown_listener listener  ) 

int CLua::file_write ( lua_State *  ls  )  [static]

int CLua::loadfile ( lua_State *  ls,
const char *  file,
bool  trusted = false,
bool  die_on_fail = false 
) [static]

Here is the call graph for this function:

bool CLua::is_path_safe ( std::string  file,
bool  trusted = false 
) [static]

Here is the call graph for this function:

bool CLua::is_managed_vm ( lua_State *  ls  )  [static]

void CLua::print_stack (  ) 

Here is the call graph for this function:


Friends And Related Function Documentation

friend class lua_call_throttle [friend]


Member Data Documentation

const int CLua::MAX_THROTTLE_SLEEPS = 100 [static]


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

Generated on Thu Jan 13 13:31:58 2011 by  doxygen 1.5.6