Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

ruby_reference.hpp File Reference

Provides a helper class for wrapping and unwrapping C++ objects as Ruby objects. More...

#include "value_holder.hpp"
#include <ruby.h>
#include "ruby_reference.ipp"

Include dependency graph for ruby_reference.hpp:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Namespaces

namespace  Exc_Ruby

Defines

#define REGISTER_WITH_RUBY_GC(type, ptr)
 Register the given object with the Ruby garbage collector.

#define REGISTER_WITH_RUBY_GC_AS_GLOBAL(type, ptr, v)
 Register the given object with the Ruby garbage collector and store a reference to it in v.


Detailed Description

Provides a helper class for wrapping and unwrapping C++ objects as Ruby objects.


Define Documentation

#define REGISTER_WITH_RUBY_GC type,
ptr   ) 
 

Value:

Ruby_Reference<type, Fast_Ruby_Data_Wrapper<type> > ( \
      ptr, rb_cObject).get()
Register the given object with the Ruby garbage collector.

In the unlikely event that an exception is raised, it will be a Ruby exception.

#define REGISTER_WITH_RUBY_GC_AS_GLOBAL type,
ptr,
 ) 
 

Value:

*v = Ruby_Reference<type, Fast_Ruby_Data_Wrapper<type> > ( \
      ptr, rb_cObject).value(); \
  rb_global_variable(v);
Register the given object with the Ruby garbage collector and store a reference to it in v.

In the unlikely event that an exception is raised, it will be a Ruby exception.


Generated on Sat Jan 1 12:02:26 2005 for Exceptional Ruby by doxygen 1.3.6