lua++
Public Member Functions | Private Attributes
lua::data Class Reference

Lua data. More...

#include <luapp_function.hpp>

List of all members.

Public Member Functions

 data ()
 Default constructor.
 data (const std::string &sName, type mLuaType, argument *pParent)
 Main constructor.
void set (state *pLua, int iIndex)
 gets data from Lua
const std::string & get_name () const
 Returns this argument's name.
const varget_value () const
 Returns this argument's value.
lua::type get_type () const
 Returns this argument's Lua type.

Private Attributes

std::string sName_
var mValue_
type mLuaType_
argumentpParent_

Detailed Description

Lua data.

Definition at line 15 of file luapp_function.hpp.


Constructor & Destructor Documentation

Default constructor.

Definition at line 6 of file luapp_data.cpp.

lua::data::data ( const std::string &  sName,
type  mLuaType,
argument pParent 
)

Main constructor.

Parameters:
sNameThe name associated to this data
mLuaTypeThe expected type in Lua
pParentA pointer to the argument that'll be using it
Note:
You shouldn't have to call it. Consider using function instead.

Definition at line 10 of file luapp_data.cpp.


Member Function Documentation

const std::string & lua::data::get_name ( ) const

Returns this argument's name.

Returns:
This argument's name

Definition at line 35 of file luapp_data.cpp.

Returns this argument's Lua type.

Returns:
This argument's Lua type

Definition at line 45 of file luapp_data.cpp.

const var & lua::data::get_value ( ) const

Returns this argument's value.

Returns:
This argument's value

Definition at line 40 of file luapp_data.cpp.

void lua::data::set ( state pLua,
int  iIndex 
)

gets data from Lua

Parameters:
pLuaThe Lua state to use
iIndexThe index at which to get the value
Note:
Only called on a valid data (expected type is found).

Definition at line 15 of file luapp_data.cpp.


Member Data Documentation

Definition at line 56 of file luapp_function.hpp.

Definition at line 55 of file luapp_function.hpp.

Definition at line 57 of file luapp_function.hpp.

std::string lua::data::sName_ [private]

Definition at line 54 of file luapp_function.hpp.


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