HoverRace  2.0
Public Member Functions | Private Attributes | List of all members
HoverRace::Script::RegistryRef Class Reference

Encapsulates a ref to the registry. More...

#include <RegistryRef.h>

Public Member Functions

constexpr RegistryRef (Core &scripting) noexcept
 
 RegistryRef (const RegistryRef &o) noexcept
 
 RegistryRef (RegistryRef &&o) noexcept
 
 ~RegistryRef ()
 
void Clear () noexcept
 Unset the value stored by this reference. More...
 
CoreGetScripting () const noexcept
 
 operator bool () const noexcept
 
RegistryRefoperator= (const RegistryRef &o) noexcept
 
RegistryRefoperator= (RegistryRef &&o) noexcept
 
RegistryRefoperator= (const luabind::object &obj)
 
void Push () const noexcept
 Pushes the value stored by the reference onto the Lua stack. More...
 
void Set (const luabind::object &obj)
 Set the value. More...
 
void SetFromStack () noexcept
 Pop a value from the Lua stack and store it in the registry. More...
 

Private Attributes

int ref
 
Corescripting
 

Detailed Description

Encapsulates a ref to the registry.

This handles copy and move operations.

Author
Michael Imamura

Constructor & Destructor Documentation

constexpr HoverRace::Script::RegistryRef::RegistryRef ( Core scripting)
inlinenoexcept
HoverRace::Script::RegistryRef::RegistryRef ( const RegistryRef o)
noexcept
HoverRace::Script::RegistryRef::RegistryRef ( RegistryRef &&  o)
inlinenoexcept
HoverRace::Script::RegistryRef::~RegistryRef ( )
inline

Member Function Documentation

void HoverRace::Script::RegistryRef::Clear ( )
noexcept

Unset the value stored by this reference.

Core& HoverRace::Script::RegistryRef::GetScripting ( ) const
inlinenoexcept
HoverRace::Script::RegistryRef::operator bool ( ) const
inlinenoexcept
RegistryRef & HoverRace::Script::RegistryRef::operator= ( const RegistryRef o)
noexcept
RegistryRef& HoverRace::Script::RegistryRef::operator= ( RegistryRef &&  o)
inlinenoexcept
RegistryRef& HoverRace::Script::RegistryRef::operator= ( const luabind::object &  obj)
inline
void HoverRace::Script::RegistryRef::Push ( ) const
noexcept

Pushes the value stored by the reference onto the Lua stack.

If there is no value stored, then nil is pushed.

void HoverRace::Script::RegistryRef::Set ( const luabind::object &  obj)

Set the value.

Parameters
objThe new value.
void HoverRace::Script::RegistryRef::SetFromStack ( )
noexcept

Pop a value from the Lua stack and store it in the registry.

Member Data Documentation

int HoverRace::Script::RegistryRef::ref
private
Core* HoverRace::Script::RegistryRef::scripting
private

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