1 #ifndef Rice__Module_impl__hpp_
2 #define Rice__Module_impl__hpp_
4 #include "detail/Exception_Handler_defn.hpp"
5 #include "detail/ruby.hpp"
6 #include "Object_defn.hpp"
7 #include "Address_Registration_Guard_defn.hpp"
15 template<
typename T>
class Data_Type;
32 template<
typename Exception_T,
typename Functor_T>
33 void add_handler(Functor_T functor);
46 template<
typename Base_T,
typename Derived_T>
88 template<
typename Exception_T,
typename Functor_T>
105 template<
typename Func_T>
109 Arguments* arguments = 0);
114 template<
typename Func_T>
133 template<
typename Func_T>
137 Arguments* arguments = 0);
140 template<
typename Func_T>
161 template<
typename Func_T>
165 Arguments* arguments = 0);
168 template<
typename Func_T>
184 template<
typename T,
typename Iterator_T>
186 Iterator_T (T::*begin)(),
187 Iterator_T (T::*end)(),
241 Object superclass = rb_cObject);
255 return this->define_class_with_object_as_base<T>(name);
265 template<
typename T,
typename T_Base_T>
274 define_class_with_object_as_base(
A guard to register a given address with the GC.
Definition: Address_Registration_Guard_defn.hpp:31
Helper for defining default arguments of a method.
Definition: Arg_impl.hpp:27
A helper for defining a Class and its methods.
Definition: Class_defn.hpp:24
A mechanism for binding ruby types to C++ types.
Definition: Data_Type_defn.hpp:112
A wrapper for the ID type.
Definition: Identifier.hpp:16
Definition: Module_impl.hpp:22
Definition: Module_impl.hpp:49
Object const_get(Identifier name) const
Get a constant.
Module define_module(char const *name)
Define a module under this module.
Data_Type< T > define_class(char const *name)
Define a new data class under this module.
Derived_T & const_set(Identifier name, Object value)
Set a constant.
Derived_T & define_module_function(Identifier name, Func_T func, Arguments *arguments=0)
Define a module function.
Data_Type< T > define_class(char const *name)
Define a new data class under this module.
Definition: Module_impl.hpp:252
bool const_defined(Identifier name) const
Determine whether a constant is defined.
Derived_T & include_module(Module const &inc)
Include a module.
Class define_class(char const *name, Object superclass=rb_cObject)
Define a class under this module.
Derived_T & define_iterator(Iterator_T(T::*begin)(), Iterator_T(T::*end)(), Identifier name="each")
Define an iterator.
void remove_const(Identifier name)
Remove a constant.
Derived_T & add_handler(Functor_T functor)
Define an exception handler.
Derived_T & define_method(Identifier name, Func_T func, Arguments *arguments=0)
Define an instance method.
Derived_T & define_singleton_method(Identifier name, Func_T func, Arguments *arguments=0)
Define a singleton method.
A helper for defining a Module and its methods.
Definition: Module_defn.hpp:27
The base class for all Objects.
Definition: Object_defn.hpp:25