Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
Ruby::Class< P, T > Struct Template Reference

Public Member Functions

 Class (std::shared_ptr< P > parent, const char *rbname, Value super=Nil)
 
template<Value(P::*)(const std::shared_ptr< T > &) Func>
void defineSingletonMethod (Value obj, const char *rbname)
 
template<Value(P::*)(const std::shared_ptr< T > &, Value) Func>
void defineSingletonMethod1 (Value obj, const char *rbname)
 
template<Value(P::*)(const std::shared_ptr< T > &, Value, Value) Func>
void defineSingletonMethod2 (Value obj, const char *rbname)
 
template<Value(P::*)(const std::shared_ptr< T > &) Func>
void defineMethod (const char *rbname)
 
template<Value(P::*)(const std::shared_ptr< T > &, Value) Func>
void defineMethod1 (const char *rbname)
 
template<Value(P::*)(const std::shared_ptr< T > &, Value, Value) Func>
void defineMethod2 (const char *rbname)
 
Value rubyClassObject () const
 
Value rubyObject (const std::shared_ptr< T > &obj) const
 

Static Public Member Functions

static std::weak_ptr< T > unwrap (Value v)
 

Private Types

typedef std::pair
< std::weak_ptr< P >
, std::weak_ptr< T > > 
Ptr
 

Private Member Functions

template<Value(P::*)(const std::shared_ptr< T > &) Func>
int create_function (Value(**func)(Value))
 
template<Value(P::*)(const std::shared_ptr< T > &, Value) Func>
int create_function (Value(**func)(Value, Value))
 
template<Value(P::*)(const std::shared_ptr< T > &, Value, Value) Func>
int create_function (Value(**func)(Value, Value, Value))
 

Private Attributes

std::weak_ptr< P > m_parent
 
Value m_rbObj
 

Detailed Description

template<class P, class T>
struct Ruby::Class< P, T >

Definition at line 42 of file rubywrapper.h.

Member Function Documentation

template<class P , class T >
template<Value(P::*)(const std::shared_ptr< T > &) Func>
int Ruby::Class< P, T >::create_function ( Value(**)(Value)  func)
inlineprivate

prepares a C-style function pointer to be called from Ruby.

Template Parameters
Funca pointer to a C++ member function.
Returns
# of arguments in the ruby function.

Definition at line 74 of file rubywrapper.h.

References Ruby::emit_error().

template<class P , class T >
template<Value(P::*)(const std::shared_ptr< T > &, Value) Func>
int Ruby::Class< P, T >::create_function ( Value(**)(Value, Value)  func)
inlineprivate
Todo:
use Arg... arg

Definition at line 94 of file rubywrapper.h.

References Ruby::emit_error().

template<class P , class T >
template<Value(P::*)(const std::shared_ptr< T > &, Value, Value) Func>
int Ruby::Class< P, T >::create_function ( Value(**)(Value, Value, Value)  func)
inlineprivate
Todo:
use Arg... arg

Definition at line 114 of file rubywrapper.h.

References Ruby::emit_error().

template<class P , class T >
template<Ruby::Value(P::*)(const std::shared_ptr< T > &) Func>
void Ruby::Class< P, T >::defineSingletonMethod ( Value  obj,
const char *  rbname 
)
Todo:
MSVC2013 cl dies with multi-definitions.

Definition at line 185 of file rubywrapper.h.


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

Generated for KAME4 by  doxygen 1.8.3