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 38 of file PluginLua.h.

Constructor & Destructor Documentation

◆ cOperation()

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

Definition at line 41 of file PluginLua.h.

Member Function Documentation

◆ operator()()

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

Definition at line 47 of file PluginLua.h.

Member Data Documentation

◆ m_Lock

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

RAII lock for the Lua state.

Definition at line 53 of file PluginLua.h.

◆ m_Plugin

cPluginLua& cPluginLua::cOperation::m_Plugin
protected

Definition at line 50 of file PluginLua.h.


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