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

Exc_Ruby::Ruby_Type< T > Class Template Reference

#include <ruby_type.hpp>

Inheritance diagram for Exc_Ruby::Ruby_Type< T >:

Inheritance graph
[legend]
Collaboration diagram for Exc_Ruby::Ruby_Type< T >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef T CPP_Type

Public Member Functions

 Ruby_Type ()
 Ruby_Type (VALUE type)
 Construct and bind in one step.

 operator VALUE () const
 Construct from a Ruby module.

 operator Value_Holder () const
VALUE type () const
 Explictly return the Ruby type.

bool is_bound () const
 Return true if the object is bound, false otherwise.

virtual Ruby_Typebind (VALUE type)
virtual Ruby_Typeoperator= (VALUE type)
 Equivalent to bind(type).


Detailed Description

template<typename T>
class Exc_Ruby::Ruby_Type< T >

A mechanism for binding run-time types (Ruby VALUEs) to compile-time types (C++ types). The binding can occur only once.


Constructor & Destructor Documentation

template<typename T>
Exc_Ruby::Ruby_Type< T >::Ruby_Type  ) 
 

Default constructor. After construction, the Ruby type is Qnil, and the object is not bound.


Member Function Documentation

template<typename T>
virtual Ruby_Type& Exc_Ruby::Ruby_Type< T >::bind VALUE  type  )  [virtual]
 

Bind a Ruby_Type to a VALUE. Raises an exception if the Ruby_Type is already bound or if the VALUE does not represent a valid Ruby class or module.

template<typename T>
Exc_Ruby::Ruby_Type< T >::operator VALUE  )  const [inline]
 

Construct from a Ruby module.

An implicit cast to a VALUE. This is merely for convenience; there are only a few use cases for a Ruby_Type that don't involve the VALUE it is holding.

template<typename T>
Exc_Ruby::Ruby_Type< T >::operator Value_Holder  )  const [inline]
 

An implicit cast to a Value_Holder. This is merely for convenience; there are only a few use cases for a Ruby_Type that don't involve the VALUE it is holding.


The documentation for this class was generated from the following file:
Generated on Sat Jan 1 12:02:27 2005 for Exceptional Ruby by doxygen 1.3.6