rice2 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (190) hide show
  1. checksums.yaml +7 -0
  2. data/COPYING +23 -0
  3. data/Doxyfile +2268 -0
  4. data/Makefile.am +26 -0
  5. data/Makefile.in +929 -0
  6. data/README.md +1054 -0
  7. data/README.mingw +8 -0
  8. data/Rakefile +24 -0
  9. data/aclocal.m4 +1090 -0
  10. data/bootstrap +8 -0
  11. data/config.guess +1667 -0
  12. data/config.sub +1793 -0
  13. data/configure +8209 -0
  14. data/configure.ac +55 -0
  15. data/depcomp +791 -0
  16. data/doxygen.ac +314 -0
  17. data/doxygen.am +186 -0
  18. data/extconf.rb +66 -0
  19. data/install-sh +529 -0
  20. data/missing +215 -0
  21. data/post-autoconf.rb +22 -0
  22. data/post-automake.rb +28 -0
  23. data/rice/Address_Registration_Guard.cpp +22 -0
  24. data/rice/Address_Registration_Guard.hpp +7 -0
  25. data/rice/Address_Registration_Guard.ipp +37 -0
  26. data/rice/Address_Registration_Guard_defn.hpp +75 -0
  27. data/rice/Arg.hpp +8 -0
  28. data/rice/Arg_impl.hpp +129 -0
  29. data/rice/Arg_operators.cpp +21 -0
  30. data/rice/Arg_operators.hpp +19 -0
  31. data/rice/Array.hpp +214 -0
  32. data/rice/Array.ipp +256 -0
  33. data/rice/Builtin_Object.hpp +8 -0
  34. data/rice/Builtin_Object.ipp +50 -0
  35. data/rice/Builtin_Object_defn.hpp +50 -0
  36. data/rice/Class.cpp +57 -0
  37. data/rice/Class.hpp +8 -0
  38. data/rice/Class.ipp +6 -0
  39. data/rice/Class_defn.hpp +83 -0
  40. data/rice/Constructor.hpp +47 -0
  41. data/rice/Data_Object.hpp +8 -0
  42. data/rice/Data_Object.ipp +133 -0
  43. data/rice/Data_Object_defn.hpp +138 -0
  44. data/rice/Data_Type.cpp +54 -0
  45. data/rice/Data_Type.hpp +8 -0
  46. data/rice/Data_Type.ipp +365 -0
  47. data/rice/Data_Type_defn.hpp +261 -0
  48. data/rice/Data_Type_fwd.hpp +12 -0
  49. data/rice/Director.cpp +13 -0
  50. data/rice/Director.hpp +39 -0
  51. data/rice/Enum.hpp +117 -0
  52. data/rice/Enum.ipp +246 -0
  53. data/rice/Exception.cpp +59 -0
  54. data/rice/Exception.hpp +13 -0
  55. data/rice/Exception_Base.hpp +8 -0
  56. data/rice/Exception_Base.ipp +13 -0
  57. data/rice/Exception_Base_defn.hpp +27 -0
  58. data/rice/Exception_defn.hpp +69 -0
  59. data/rice/Hash.hpp +227 -0
  60. data/rice/Hash.ipp +329 -0
  61. data/rice/Identifier.cpp +8 -0
  62. data/rice/Identifier.hpp +50 -0
  63. data/rice/Identifier.ipp +33 -0
  64. data/rice/Jump_Tag.hpp +24 -0
  65. data/rice/Makefile.am +122 -0
  66. data/rice/Makefile.in +885 -0
  67. data/rice/Module.cpp +84 -0
  68. data/rice/Module.hpp +8 -0
  69. data/rice/Module.ipp +6 -0
  70. data/rice/Module_defn.hpp +88 -0
  71. data/rice/Module_impl.hpp +281 -0
  72. data/rice/Module_impl.ipp +345 -0
  73. data/rice/Object.cpp +169 -0
  74. data/rice/Object.hpp +8 -0
  75. data/rice/Object.ipp +33 -0
  76. data/rice/Object_defn.hpp +214 -0
  77. data/rice/Require_Guard.hpp +21 -0
  78. data/rice/String.cpp +94 -0
  79. data/rice/String.hpp +91 -0
  80. data/rice/Struct.cpp +117 -0
  81. data/rice/Struct.hpp +162 -0
  82. data/rice/Struct.ipp +26 -0
  83. data/rice/Symbol.cpp +25 -0
  84. data/rice/Symbol.hpp +66 -0
  85. data/rice/Symbol.ipp +44 -0
  86. data/rice/config.hpp +47 -0
  87. data/rice/config.hpp.in +46 -0
  88. data/rice/detail/Arguments.hpp +118 -0
  89. data/rice/detail/Auto_Function_Wrapper.hpp +898 -0
  90. data/rice/detail/Auto_Function_Wrapper.ipp +3694 -0
  91. data/rice/detail/Auto_Member_Function_Wrapper.hpp +897 -0
  92. data/rice/detail/Auto_Member_Function_Wrapper.ipp +2774 -0
  93. data/rice/detail/Caster.hpp +103 -0
  94. data/rice/detail/Exception_Handler.hpp +8 -0
  95. data/rice/detail/Exception_Handler.ipp +68 -0
  96. data/rice/detail/Exception_Handler_defn.hpp +96 -0
  97. data/rice/detail/Iterator.hpp +93 -0
  98. data/rice/detail/Not_Copyable.hpp +25 -0
  99. data/rice/detail/Wrapped_Function.hpp +33 -0
  100. data/rice/detail/cfp.hpp +24 -0
  101. data/rice/detail/cfp.ipp +51 -0
  102. data/rice/detail/check_ruby_type.cpp +27 -0
  103. data/rice/detail/check_ruby_type.hpp +23 -0
  104. data/rice/detail/creation_funcs.hpp +37 -0
  105. data/rice/detail/creation_funcs.ipp +36 -0
  106. data/rice/detail/default_allocation_func.hpp +23 -0
  107. data/rice/detail/default_allocation_func.ipp +11 -0
  108. data/rice/detail/define_method_and_auto_wrap.hpp +31 -0
  109. data/rice/detail/define_method_and_auto_wrap.ipp +30 -0
  110. data/rice/detail/demangle.cpp +56 -0
  111. data/rice/detail/demangle.hpp +19 -0
  112. data/rice/detail/env.hpp +11 -0
  113. data/rice/detail/from_ruby.hpp +43 -0
  114. data/rice/detail/from_ruby.ipp +60 -0
  115. data/rice/detail/method_data.cpp +92 -0
  116. data/rice/detail/method_data.hpp +21 -0
  117. data/rice/detail/node.hpp +13 -0
  118. data/rice/detail/protect.cpp +29 -0
  119. data/rice/detail/protect.hpp +34 -0
  120. data/rice/detail/ruby.hpp +74 -0
  121. data/rice/detail/ruby_version_code.hpp +6 -0
  122. data/rice/detail/ruby_version_code.hpp.in +6 -0
  123. data/rice/detail/st.hpp +22 -0
  124. data/rice/detail/to_ruby.hpp +22 -0
  125. data/rice/detail/to_ruby.ipp +36 -0
  126. data/rice/detail/traits.hpp +43 -0
  127. data/rice/detail/win32.hpp +16 -0
  128. data/rice/detail/wrap_function.hpp +66 -0
  129. data/rice/global_function.hpp +33 -0
  130. data/rice/global_function.ipp +22 -0
  131. data/rice/protect.hpp +38 -0
  132. data/rice/protect.ipp +1134 -0
  133. data/rice/ruby_mark.hpp +13 -0
  134. data/rice/ruby_try_catch.hpp +86 -0
  135. data/rice/rubypp.rb +97 -0
  136. data/rice/to_from_ruby.hpp +8 -0
  137. data/rice/to_from_ruby.ipp +418 -0
  138. data/rice/to_from_ruby_defn.hpp +70 -0
  139. data/ruby.ac +135 -0
  140. data/ruby/Makefile.am +1 -0
  141. data/ruby/Makefile.in +628 -0
  142. data/ruby/lib/Makefile.am +3 -0
  143. data/ruby/lib/Makefile.in +506 -0
  144. data/ruby/lib/mkmf-rice.rb.in +217 -0
  145. data/ruby/lib/version.rb +3 -0
  146. data/sample/Makefile.am +47 -0
  147. data/sample/Makefile.in +489 -0
  148. data/sample/enum/extconf.rb +3 -0
  149. data/sample/enum/sample_enum.cpp +54 -0
  150. data/sample/enum/test.rb +8 -0
  151. data/sample/inheritance/animals.cpp +98 -0
  152. data/sample/inheritance/extconf.rb +3 -0
  153. data/sample/inheritance/test.rb +7 -0
  154. data/sample/map/extconf.rb +3 -0
  155. data/sample/map/map.cpp +81 -0
  156. data/sample/map/test.rb +7 -0
  157. data/test/Makefile.am +72 -0
  158. data/test/Makefile.in +1213 -0
  159. data/test/ext/Makefile.am +41 -0
  160. data/test/ext/Makefile.in +483 -0
  161. data/test/ext/t1/Foo.hpp +10 -0
  162. data/test/ext/t1/extconf.rb +2 -0
  163. data/test/ext/t1/t1.cpp +15 -0
  164. data/test/ext/t2/extconf.rb +2 -0
  165. data/test/ext/t2/t2.cpp +11 -0
  166. data/test/test_Address_Registration_Guard.cpp +43 -0
  167. data/test/test_Array.cpp +248 -0
  168. data/test/test_Builtin_Object.cpp +71 -0
  169. data/test/test_Class.cpp +496 -0
  170. data/test/test_Constructor.cpp +128 -0
  171. data/test/test_Data_Object.cpp +275 -0
  172. data/test/test_Data_Type.cpp +348 -0
  173. data/test/test_Director.cpp +308 -0
  174. data/test/test_Enum.cpp +215 -0
  175. data/test/test_Exception.cpp +47 -0
  176. data/test/test_Hash.cpp +212 -0
  177. data/test/test_Identifier.cpp +70 -0
  178. data/test/test_Jump_Tag.cpp +17 -0
  179. data/test/test_Memory_Management.cpp +50 -0
  180. data/test/test_Module.cpp +497 -0
  181. data/test/test_Object.cpp +159 -0
  182. data/test/test_String.cpp +107 -0
  183. data/test/test_Struct.cpp +205 -0
  184. data/test/test_Symbol.cpp +63 -0
  185. data/test/test_To_From_Ruby.cpp +428 -0
  186. data/test/test_global_functions.cpp +114 -0
  187. data/test/test_rice.rb +41 -0
  188. data/test/unittest.cpp +136 -0
  189. data/test/unittest.hpp +294 -0
  190. metadata +297 -0
@@ -0,0 +1,8 @@
1
+ #ifndef Rice__Builtin_Object__hpp_
2
+ #define Rice__Builtin_Object__hpp_
3
+
4
+ #include "Builtin_Object_defn.hpp"
5
+ #include "Builtin_Object.ipp"
6
+
7
+ #endif // Rice__Builtin_Object__hpp_
8
+
@@ -0,0 +1,50 @@
1
+ #ifndef Rice__Builtin_Object__ipp_
2
+ #define Rice__Builtin_Object__ipp_
3
+
4
+ #include "Object.hpp"
5
+ #include "protect.hpp"
6
+ #include "detail/check_ruby_type.hpp"
7
+
8
+ #include <algorithm>
9
+
10
+ namespace Rice
11
+ {
12
+
13
+ namespace detail
14
+ {
15
+ inline VALUE check_type(Object value, int type)
16
+ {
17
+ rb_check_type(value, type);
18
+ return Qnil;
19
+ }
20
+ }
21
+
22
+ template<int Builtin_Type>
23
+ inline Builtin_Object<Builtin_Type>::
24
+ Builtin_Object(Object value)
25
+ : Object(value)
26
+ , obj_((RObject*)(value.value()))
27
+ {
28
+ protect(detail::check_type, value, Builtin_Type);
29
+ }
30
+
31
+ template<int Builtin_Type>
32
+ inline Builtin_Object<Builtin_Type>::
33
+ Builtin_Object(Builtin_Object<Builtin_Type> const & other)
34
+ : Object(other.value())
35
+ , obj_(other.obj_)
36
+ {
37
+ }
38
+
39
+ template<int Builtin_Type>
40
+ inline void Builtin_Object<Builtin_Type>::
41
+ swap(Builtin_Object<Builtin_Type> & ref)
42
+ {
43
+ std::swap(obj_, ref.obj_);
44
+ Object::swap(ref);
45
+ }
46
+
47
+ } // namespace Rice
48
+
49
+ #endif // Rice__Builtin_Object__ipp_
50
+
@@ -0,0 +1,50 @@
1
+ #ifndef Rice__Builtin_Object_defn__hpp_
2
+ #define Rice__Builtin_Object_defn__hpp_
3
+
4
+ #include "Object_defn.hpp"
5
+ #include "detail/ruby.hpp"
6
+
7
+ namespace Rice
8
+ {
9
+
10
+ //! A smartpointer-like wrapper for Ruby builtin objects.
11
+ /*! A builtin object is one of Ruby's internal types, e.g. RArray or
12
+ * RString. Every builtin type structure has a corresponding integer
13
+ * type number (e.g T_ARRAY for RArray or T_STRING for RString). This
14
+ * class is a wrapper for those types of objects, primarily useful as a
15
+ * base class for other wrapper classes like Array and Hash.
16
+ */
17
+ template<int Builtin_Type>
18
+ class Builtin_Object
19
+ : public Object
20
+ {
21
+ public:
22
+ //! Wrap an already allocated Ruby object.
23
+ /*! Checks to see if the object is an object of type Builtin_Type; a
24
+ * C++ exception is thrown if this is not the case.
25
+ * \param value the object to be wrapped.
26
+ */
27
+ Builtin_Object(Object value);
28
+
29
+ //! Make a copy of a Builtin_Object
30
+ /*! \param other the Builtin_Object to be copied.
31
+ */
32
+ Builtin_Object(Builtin_Object const & other);
33
+
34
+ RObject & operator*() const { return *obj_; } //!< Return a reference to obj_
35
+ RObject * operator->() const { return obj_; } //!< Return a pointer to obj_
36
+ RObject * get() const { return obj_; } //!< Return a pointer to obj_
37
+
38
+ //! Swap with another builtin object of the same type
39
+ /*! \param ref the object with which to swap.
40
+ */
41
+ void swap(Builtin_Object<Builtin_Type> & ref);
42
+
43
+ private:
44
+ RObject * obj_;
45
+ };
46
+
47
+ } // namespace Rice
48
+
49
+ #endif // Rice__Builtin_Object_defn__hpp_
50
+
@@ -0,0 +1,57 @@
1
+ #include "Class.hpp"
2
+ #include "Exception.hpp"
3
+ #include "detail/creation_funcs.hpp"
4
+
5
+ Rice::Class::
6
+ Class()
7
+ : Module_impl<Module, Class>()
8
+ {
9
+ }
10
+
11
+ Rice::Class::
12
+ Class(VALUE v)
13
+ : Module_impl<Module, Class>(v)
14
+ {
15
+ if(::rb_type(v) != T_CLASS)
16
+ {
17
+ throw Exception(
18
+ rb_eTypeError,
19
+ "Expected a Class but got a %s",
20
+ rb_class2name(CLASS_OF(v))); // TODO: might raise an exception
21
+ }
22
+ }
23
+
24
+ Rice::Class & Rice::Class::
25
+ undef_creation_funcs()
26
+ {
27
+ detail::undef_creation_funcs(*this);
28
+ return *this;
29
+ }
30
+
31
+ Rice::Class Rice::
32
+ define_class_under(
33
+ Rice::Object module,
34
+ char const * name,
35
+ Rice::Object superclass)
36
+ {
37
+ VALUE v = rb_define_class_under(module, name, superclass);
38
+ return Class(v);
39
+ }
40
+
41
+ Rice::Class Rice::
42
+ define_class(
43
+ char const * name,
44
+ Rice::Object superclass)
45
+ {
46
+ VALUE v = rb_define_class(name, superclass);
47
+ return Class(v);
48
+ }
49
+
50
+ Rice::Class Rice::
51
+ anonymous_class(
52
+ Rice::Object superclass)
53
+ {
54
+ VALUE v = Class(rb_cClass).call("new");
55
+ return Class(v);
56
+ }
57
+
@@ -0,0 +1,8 @@
1
+ #ifndef Rice__Class__hpp_
2
+ #define Rice__Class__hpp_
3
+
4
+ #include "Class_defn.hpp"
5
+ #include "Class.ipp"
6
+
7
+ #endif // Rice__Class__hpp_
8
+
@@ -0,0 +1,6 @@
1
+ #ifndef Rice__Class__ipp_
2
+ #define Rice__Class__ipp_
3
+
4
+ #include "Module.ipp"
5
+
6
+ #endif // Rice__Class__ipp_
@@ -0,0 +1,83 @@
1
+ #ifndef Rice__Class_defn__hpp_
2
+ #define Rice__Class_defn__hpp_
3
+
4
+ #include "Object_defn.hpp"
5
+ #include "Module_impl.hpp"
6
+ #include "Module_defn.hpp"
7
+ #include "to_from_ruby_defn.hpp"
8
+ #include "Identifier.hpp"
9
+
10
+ /*!
11
+ * \example inheritance/animals.cpp
12
+ */
13
+
14
+ namespace Rice
15
+ {
16
+
17
+ //! A helper for defining a Class and its methods.
18
+ /*! This class provides a C++-style interface to ruby's Class class and
19
+ * for defining methods on that class.
20
+ */
21
+ class Class
22
+ : public Module_impl<Module, Class>
23
+ {
24
+ public:
25
+ //! Default construct a new class wrapper and initialize it to
26
+ //! rb_cObject.
27
+ Class();
28
+
29
+ //! Construct a new class wrapper from a ruby object of type T_CLASS.
30
+ Class(VALUE v);
31
+
32
+ //! Disallow creation of an instance from Ruby code.
33
+ /*! Undefines the singleton method allocate (or new, if using a
34
+ * version of ruby prior to 1.7) and the instance method initialize.
35
+ */
36
+ Class & undef_creation_funcs();
37
+ };
38
+
39
+ //! Define a new class in the namespace given by module.
40
+ /*! \param module the Module in which to define the class.
41
+ * \param name the name of the class.
42
+ * \param superclass the base class to use.
43
+ * \return the new class.
44
+ */
45
+ Class define_class_under(
46
+ Object module,
47
+ char const * name,
48
+ Object superclass = rb_cObject);
49
+
50
+ //! Define a new class in the default namespace.
51
+ /*! \param name the name of the class.
52
+ * \param superclass the base class to use.
53
+ * \return the new class.
54
+ */
55
+ Class define_class(
56
+ char const * name,
57
+ Object superclass = rb_cObject);
58
+
59
+ //! Create a new anonymous class.
60
+ /*! \param superclass the base class to use.
61
+ * \return the new class.
62
+ */
63
+ Class anonymous_class(
64
+ Object superclass = rb_cObject);
65
+
66
+ } // namespace Rice
67
+
68
+ template<>
69
+ inline
70
+ Rice::Class from_ruby<Rice::Class>(Rice::Object x)
71
+ {
72
+ return Rice::Class(x);
73
+ }
74
+
75
+ template<>
76
+ inline
77
+ Rice::Object to_ruby<Rice::Class>(Rice::Class const & x)
78
+ {
79
+ return x;
80
+ }
81
+
82
+ #endif // Rice__Class_defn__hpp_
83
+
@@ -0,0 +1,47 @@
1
+ #ifndef Rice__Constructor__hpp_
2
+ #define Rice__Constructor__hpp_
3
+
4
+ // This causes problems with certain C++ libraries
5
+ #undef TYPE
6
+
7
+ #include "to_from_ruby_defn.hpp"
8
+
9
+ namespace Rice
10
+ {
11
+ //! Define a Type's Constructor and it's arguments.
12
+ /*! E.g. for the default constructor on a Type:
13
+ \code
14
+ define_class<Test>()
15
+ .define_constructor(Constructor<Test>());
16
+ \endcode
17
+ *
18
+ * The first template type must be the type being wrapped.
19
+ * Afterwards any extra types must match the appropriate constructor
20
+ * to be used in C++ when constructing the object.
21
+ *
22
+ * For more information, see Rice::Data_Type::define_constructor.
23
+ */
24
+ template<typename T, typename ...Arg_T>
25
+ class Constructor
26
+ {
27
+ public:
28
+ static void construct(Object self, Arg_T... args)
29
+ {
30
+ DATA_PTR(self.value()) = new T(args...);
31
+ }
32
+ };
33
+
34
+ //! Special-case Constructor used when defining Directors.
35
+ template<typename T, typename ...Arg_T>
36
+ class Constructor<T, Object, Arg_T...>
37
+ {
38
+ public:
39
+ static void construct(Object self, Arg_T... args)
40
+ {
41
+ DATA_PTR(self.value()) = new T(self, args...);
42
+ }
43
+ };
44
+ }
45
+
46
+ #endif
47
+
@@ -0,0 +1,8 @@
1
+ #ifndef Rice__Data_Object__hpp_
2
+ #define Rice__Data_Object__hpp_
3
+
4
+ #include "Data_Object_defn.hpp"
5
+ #include "Data_Object.ipp"
6
+
7
+ #endif // Rice__Data_Object__hpp_
8
+
@@ -0,0 +1,133 @@
1
+ #ifndef Rice__Data_Object__ipp_
2
+ #define Rice__Data_Object__ipp_
3
+
4
+ #include "detail/check_ruby_type.hpp"
5
+ #include "protect.hpp"
6
+
7
+ #include <algorithm>
8
+
9
+ template<typename T>
10
+ const typename Rice::Default_Mark_Function<T>::Ruby_Data_Func
11
+ Rice::Default_Mark_Function<T>::mark = ruby_mark<T>;
12
+
13
+ namespace Rice
14
+ {
15
+
16
+ namespace detail
17
+ {
18
+
19
+ inline VALUE data_wrap_struct(
20
+ VALUE klass,
21
+ RUBY_DATA_FUNC mark,
22
+ RUBY_DATA_FUNC free,
23
+ void * obj)
24
+ {
25
+ return Data_Wrap_Struct(klass, mark, free, obj);
26
+ }
27
+
28
+ template<typename T>
29
+ inline VALUE wrap(
30
+ VALUE klass,
31
+ typename Data_Object<T>::Ruby_Data_Func mark,
32
+ typename Data_Object<T>::Ruby_Data_Func free,
33
+ T * obj)
34
+ {
35
+ // We cast to obj void* here before passing to Data_Wrap_Struct,
36
+ // becuase otherwise compilation will fail if obj is const. It's safe
37
+ // to do this, because unwrap() will always add the const back when
38
+ // the object is unwrapped.
39
+ return Rice::protect(data_wrap_struct,
40
+ klass,
41
+ reinterpret_cast<RUBY_DATA_FUNC>(mark),
42
+ reinterpret_cast<RUBY_DATA_FUNC>(free),
43
+ (void *)obj);
44
+ }
45
+
46
+ template<typename T>
47
+ inline VALUE data_get_struct(VALUE value, T * * obj)
48
+ {
49
+ Data_Get_Struct(value, T, *obj);
50
+ return Qnil;
51
+ }
52
+
53
+ template<typename T>
54
+ inline T * unwrap(VALUE value)
55
+ {
56
+ T * obj;
57
+ Rice::protect(data_get_struct<T>, value, &obj);
58
+ return obj;
59
+ }
60
+
61
+ } // namespace detail
62
+
63
+ } // namespace Rice
64
+
65
+ template<typename T>
66
+ inline Rice::Data_Object<T>::
67
+ Data_Object(
68
+ T * obj,
69
+ VALUE klass,
70
+ Ruby_Data_Func mark_func,
71
+ Ruby_Data_Func free_func)
72
+ : Object(detail::wrap(klass, mark_func, free_func, obj))
73
+ , obj_(obj)
74
+ {
75
+ }
76
+
77
+ template<typename T>
78
+ inline Rice::Data_Object<T>::
79
+ Data_Object(
80
+ Object value)
81
+ : Object(value)
82
+ , obj_(detail::unwrap<T>(value))
83
+ {
84
+ Data_Type<T> klass;
85
+ check_cpp_type(klass);
86
+ detail::check_ruby_type(value, klass, true);
87
+ }
88
+
89
+ template<typename T>
90
+ template<typename U>
91
+ inline Rice::Data_Object<T>::
92
+ Data_Object(
93
+ Object value,
94
+ Data_Type<U> const & klass)
95
+ : Object(value)
96
+ , obj_(detail::unwrap<T>(value))
97
+ {
98
+ check_cpp_type(klass);
99
+ detail::check_ruby_type(value, klass, true);
100
+ }
101
+
102
+ template<typename T>
103
+ inline Rice::Data_Object<T>::
104
+ Data_Object(Data_Object const & other)
105
+ : Object(other.value())
106
+ , obj_(other.obj_)
107
+ {
108
+ }
109
+
110
+ template<typename T>
111
+ template<typename U>
112
+ inline void Rice::Data_Object<T>::
113
+ swap(Data_Object<U> & ref)
114
+ {
115
+ std::swap(obj_, ref.obj_);
116
+ Object::swap(ref);
117
+ }
118
+
119
+ template<typename T>
120
+ inline void Rice::Data_Object<T>::
121
+ check_cpp_type(Data_Type<T> const & /* klass */)
122
+ {
123
+ }
124
+
125
+ template<typename T>
126
+ Rice::Object Rice::detail::to_ruby_<Rice::Data_Object<T> >::
127
+ convert(Rice::Data_Object<T> const & x)
128
+ {
129
+ return x;
130
+ }
131
+
132
+ #endif // Rice__Data_Object__ipp_
133
+