Public Member Functions | Public Attributes | List of all members
luwra::Reference Struct Reference

Inherited by luwra::NativeFunction< R >, and luwra::NativeFunction< void >.

Public Member Functions

 Reference (State *state, int indexOrRef, bool isIndex=true)
 
 Reference (State *state)
 
template<typename T >
read ()
 
template<typename T >
 operator T ()
 

Public Attributes

const internal::SharedReferenceImpl impl
 

Detailed Description

Reference to an arbitrary value.

Constructor & Destructor Documentation

luwra::Reference::Reference ( State state,
int  indexOrRef,
bool  isIndex = true 
)
inline

Create a reference to the value at the given index.

luwra::Reference::Reference ( State state)
inline

Create a reference to the value at the top of the stack.

Member Function Documentation

template<typename T >
luwra::Reference::operator T ( )
inline

Shortcut for read<T>().

template<typename T >
T luwra::Reference::read ( )
inline

Read the referenced value.

Member Data Documentation

const internal::SharedReferenceImpl luwra::Reference::impl