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

Public Member Functions

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

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 ( ) const
inline

Shortcut for read<T>().

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

Read the referenced value.

Member Data Documentation

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