Cuberite
A lightweight, fast and extensible game server for Minecraft
Public Member Functions | Protected Attributes | List of all members
cPluginLua::cOperation Class Reference

A RAII-style mutex lock for accessing the internal LuaState. More...

#include <PluginLua.h>

Collaboration diagram for cPluginLua::cOperation:
Collaboration graph
[legend]

Public Member Functions

 cOperation (cPluginLua &a_Plugin)
 
cLuaStateoperator() (void)
 

Protected Attributes

cLuaState::cLock m_Lock
 RAII lock for the Lua state. More...
 
cPluginLuam_Plugin
 

Detailed Description

A RAII-style mutex lock for accessing the internal LuaState.

This will be the only way to retrieve the plugin's LuaState; therefore it directly supports accessing the LuaState of the locked plugin. Usage: cPluginLua::cOperation Op(SomePlugin); Op().Call(...) // Call a function in the plugin's LuaState

Definition at line 39 of file PluginLua.h.

Constructor & Destructor Documentation

cPluginLua::cOperation::cOperation ( cPluginLua a_Plugin)
inline

Definition at line 42 of file PluginLua.h.

Member Function Documentation

cLuaState& cPluginLua::cOperation::operator() ( void  )
inline

Definition at line 48 of file PluginLua.h.

Member Data Documentation

cLuaState::cLock cPluginLua::cOperation::m_Lock
protected

RAII lock for the Lua state.

Definition at line 54 of file PluginLua.h.

cPluginLua& cPluginLua::cOperation::m_Plugin
protected

Definition at line 51 of file PluginLua.h.


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