HoverRace  2.0
Public Member Functions | Private Attributes | List of all members
HoverRace::Script::WrapperFactory< Inside, Outside > Class Template Reference

A reference to a Lua function or userdata that wraps a native object. More...

#include <WrapperFactory.h>

Public Member Functions

 WrapperFactory (Script::Core &scripting)
 
 WrapperFactory (const WrapperFactory &)=default
 
 WrapperFactory (WrapperFactory &&)=default
 
std::shared_ptr< Outside > operator() (std::shared_ptr< Inside > inside) const
 Wrap a native object in the wrapper. More...
 
WrapperFactoryoperator= (const WrapperFactory &)=default
 
WrapperFactoryoperator= (WrapperFactory &&)=default
 
WrapperFactoryoperator= (const luabind::object &obj)
 
void Set (const luabind::object &obj)
 

Private Attributes

RegistryRef ref
 
Script::Corescripting
 

Detailed Description

template<class Inside, class Outside>
class HoverRace::Script::WrapperFactory< Inside, Outside >

A reference to a Lua function or userdata that wraps a native object.

Author
Michael Imamura

Constructor & Destructor Documentation

template<class Inside, class Outside>
HoverRace::Script::WrapperFactory< Inside, Outside >::WrapperFactory ( Script::Core scripting)
inline
template<class Inside, class Outside>
HoverRace::Script::WrapperFactory< Inside, Outside >::WrapperFactory ( const WrapperFactory< Inside, Outside > &  )
default
template<class Inside, class Outside>
HoverRace::Script::WrapperFactory< Inside, Outside >::WrapperFactory ( WrapperFactory< Inside, Outside > &&  )
default

Member Function Documentation

template<class Inside, class Outside>
std::shared_ptr<Outside> HoverRace::Script::WrapperFactory< Inside, Outside >::operator() ( std::shared_ptr< Inside >  inside) const
inline

Wrap a native object in the wrapper.

Parameters
insideThe native object to wrap.
Returns
The wrapped object. If no factory has been set or there was an error while executing the factory, then a new instance of the Outside class will be returned.
template<class Inside, class Outside>
WrapperFactory& HoverRace::Script::WrapperFactory< Inside, Outside >::operator= ( const WrapperFactory< Inside, Outside > &  )
default
template<class Inside, class Outside>
WrapperFactory& HoverRace::Script::WrapperFactory< Inside, Outside >::operator= ( WrapperFactory< Inside, Outside > &&  )
default
template<class Inside, class Outside>
WrapperFactory& HoverRace::Script::WrapperFactory< Inside, Outside >::operator= ( const luabind::object &  obj)
inline
template<class Inside, class Outside>
void HoverRace::Script::WrapperFactory< Inside, Outside >::Set ( const luabind::object &  obj)
inline

Member Data Documentation

template<class Inside, class Outside>
RegistryRef HoverRace::Script::WrapperFactory< Inside, Outside >::ref
private
template<class Inside, class Outside>
Script::Core* HoverRace::Script::WrapperFactory< Inside, Outside >::scripting
private

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