Main Page   Compound List   File List   Compound Members   File Members  

Script::Object Class Reference

Representation of a Lua script object residing on the Lua stack. More...

#include <Script.h>

Collaboration diagram for Script::Object:

Collaboration graph
[legend]
List of all members.

Public Methods

 Object (const Object& src)
 Copy constructor.

const Object& operator= (const Object& src)
 Assignment operator.

ScriptGetParent () const
lua_State* GetState () const
int GetType () const
bool IsNil () const
bool IsTable () const
bool IsUserData () const
bool IsCFunction () const
bool IsNumber () const
bool IsString () const
bool IsFunction () const
bool IsNull () const
int GetStackIndex () const
int GetInteger () const
float GetNumber () const
const char* GetString () const
int StrLen () const
CFunction GetCFunction () const
void* GetUserData () const
const void* GetPointer () const
Object CreateTable (const char* name)
 Creates a table called [name] within the current Object. More...

void SetNumber (const char* name, double value)
 Creates (or reassigns) the object called [name] to [value]. More...

void SetString (const char* name, const char* value)
 Creates (or reassigns) the object called [name] to [value]. More...

void SetUserData (const char* name, void* data)
 Creates (or reassigns) the object called [name] to [value]. More...

int Tag ()
Object GetByName (const char* name)
 Assuming the current object is a table, retrieves the table entry called [name]. More...

Object GetByIndex (int index)
 Assuming the current object is a table, retrieves the table entry at [index]. More...


Protected Methods

 Object (Script& parent, int index)

Protected Attributes

Scriptm_parent
 The parent script of this object.

int m_stackIndex
 The stack index representing this object.


Friends

class  Script

Detailed Description

Representation of a Lua script object residing on the Lua stack.


Constructor & Destructor Documentation

Script::Object::Object ( const Object & src ) [inline]
 

Copy constructor.

Script::Object::Object ( Script & parent,
int index ) [inline, protected]
 


Member Function Documentation

Object Script::Object::CreateTable ( const char * name ) [inline]
 

Creates a table called [name] within the current Object.

Parameters:
name   The name of the table to create.
Returns:
Returns the object representing the newly created table.

Object Script::Object::GetByIndex ( int index ) [inline]
 

Assuming the current object is a table, retrieves the table entry at [index].

Parameters:
index   The numeric name of a table entry.
Returns:
Returns an Object representing the retrieved entry.

Object Script::Object::GetByName ( const char * name ) [inline]
 

Assuming the current object is a table, retrieves the table entry called [name].

Parameters:
name   The name of the entry from the current table to retrieve.
Returns:
Returns an Object representing the retrieved entry.

CFunction Script::Object::GetCFunction ( ) const [inline]
 

int Script::Object::GetInteger ( ) const [inline]
 

float Script::Object::GetNumber ( ) const [inline]
 

Script & Script::Object::GetParent ( ) const [inline]
 

const void * Script::Object::GetPointer ( ) const [inline]
 

int Script::Object::GetStackIndex ( ) const [inline]
 

lua_State * Script::Object::GetState ( ) const [inline]
 

const char * Script::Object::GetString ( ) const [inline]
 

int Script::Object::GetType ( ) const [inline]
 

void * Script::Object::GetUserData ( ) const [inline]
 

bool Script::Object::IsCFunction ( ) const [inline]
 

bool Script::Object::IsFunction ( ) const [inline]
 

bool Script::Object::IsNil ( ) const [inline]
 

bool Script::Object::IsNull ( ) const [inline]
 

bool Script::Object::IsNumber ( ) const [inline]
 

bool Script::Object::IsString ( ) const [inline]
 

bool Script::Object::IsTable ( ) const [inline]
 

bool Script::Object::IsUserData ( ) const [inline]
 

void Script::Object::SetNumber ( const char * name,
double value ) [inline]
 

Creates (or reassigns) the object called [name] to [value].

Parameters:
name   The name of the object to assign the value to.
value   The value to assign to [name].

void Script::Object::SetString ( const char * name,
const char * value ) [inline]
 

Creates (or reassigns) the object called [name] to [value].

Parameters:
name   The name of the object to assign the value to.
value   The value to assign to [name].

void Script::Object::SetUserData ( const char * name,
void * data ) [inline]
 

Creates (or reassigns) the object called [name] to [value].

Parameters:
name   The name of the object to assign the value to.
value   The value to assign to [name].

int Script::Object::StrLen ( ) const [inline]
 

int Script::Object::Tag ( ) [inline]
 

const Object & Script::Object::operator= ( const Object & src ) [inline]
 

Assignment operator.


Friends And Related Function Documentation

class Script [friend]
 


Member Data Documentation

Script & Script::Object::m_parent [protected]
 

The parent script of this object.

int Script::Object::m_stackIndex [protected]
 

The stack index representing this object.


The documentation for this class was generated from the following file:
Generated at Wed Dec 13 00:55:53 2000 for Script (Lua Wrapper) by doxygen1.2.2 written by Dimitri van Heesch, © 1997-2000