SimpleFastOpenAtomicVisualiser
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
LuaNumber Struct Reference

Interop for a number in Lua. More...

#include <LuaNumber.h>

Public Member Functions

 LuaNumber ()
 Construct a 0.0.
 
void read (lua_State *lua, int index)
 Read the number from stack index index.
 
bool readField (lua_State *lua, const char *name)
 Read the number from a table field.
 
bool readGlobal (lua_State *lua, const char *name)
 Read the number from a global table field.
 
bool operator== (const double &rhs)
 
 operator double ()
 

Public Attributes

double n
 

Detailed Description

Interop for a number in Lua.

Constructor & Destructor Documentation

◆ LuaNumber()

LuaNumber::LuaNumber ( )
inline

Construct a 0.0.

Member Function Documentation

◆ operator double()

LuaNumber::operator double ( )
inline

◆ operator==()

bool LuaNumber::operator== ( const double rhs)
inline

◆ read()

void LuaNumber::read ( lua_State lua,
int  index 
)
inline

Read the number from stack index index.

Parameters
luathe Lua context.
indexthe stack index.

◆ readField()

bool LuaNumber::readField ( lua_State lua,
const char name 
)
inline

Read the number from a table field.

Parameters
luathe Lua context.
namethe field name.
Returns
true succesful read.
false unsuccesful read.

◆ readGlobal()

bool LuaNumber::readGlobal ( lua_State lua,
const char name 
)
inline

Read the number from a global table field.

Parameters
luathe Lua context.
namethe field name.
Returns
true succesful read.
false unsuccesful read.

Member Data Documentation

◆ n

double LuaNumber::n

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