Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Types | Static Private Member Functions | List of all members
Ruby Class Reference

Wraps Ruby C interface and hides mysterious ruby.h from C++ libraries. More...

#include <rubywrapper.h>

Classes

struct  Class
 

Public Types

typedef unsigned long Value
 

Public Member Functions

 Ruby (const char *scriptname)
 
int evalProtect (const char *str)
 
void printErrorInfo ()
 
void defineGlobalConst (const char *rbname, Value obj)
 
template<>
Ruby::Value convertToRuby (int v)
 
template<>
Ruby::Value convertToRuby (unsigned int v)
 
template<>
Ruby::Value convertToRuby (long v)
 
template<>
Ruby::Value convertToRuby (unsigned long v)
 
template<>
Ruby::Value convertToRuby (double v)
 
template<>
Ruby::Value convertToRuby (bool v)
 

Static Public Member Functions

template<typename X >
static Value convertToRuby (X var)
 C++ value to Ruby object.
 
static Value convertToRuby (const std::string &var)
 
template<typename X >
static X convert (Value var)
 Ruby object to C++ value.
 
template<typename X >
static bool isConvertible (Value var)
 

Static Public Attributes

static const int Nil = Qnil
 
static const int False = Qfalse
 
static const int True = Qtrue
 

Private Types

typedef std::pair
< std::weak_ptr< void * >
, std::weak_ptr< void * > > 
wrapped_t
 

Static Private Member Functions

template<class Y >
static Y & unwrap_internal (Value self)
 
static Value wrap_obj (Value cl, void *p, void(*)(void *))
 
static void * unwrap_obj (Value self)
 
static void define_method (Value cl, const char *rbname, Value(*func)(...), int argnum)
 
static void define_singleton_method (Value obj, const char *rbname, Value(*func)(...), int argnum)
 
static Value define_class (const char *rbname, Value super)
 
static void emit_error (const char *errstr)
 C++ objects should be destroyed before.
 

Detailed Description

Wraps Ruby C interface and hides mysterious ruby.h from C++ libraries.

Definition at line 10 of file rubywrapper.h.

Member Function Documentation

int Ruby::evalProtect ( const char *  str)
Returns
state.

Definition at line 25 of file rubywrapper.cpp.


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

Generated for KAME4 by  doxygen 1.8.3