Rice  1.5.2
 All Classes Files Functions Variables Typedefs Friends Pages
Class_defn.hpp
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 
14 namespace Rice
15 {
16 
18 
21 class Class
22  : public Module_impl<Module, Class>
23 {
24 public:
27  Class();
28 
30  Class(VALUE v);
31 
33 
37 };
38 
40 
45 Class define_class_under(
46  Object module,
47  char const * name,
48  Object superclass = rb_cObject);
49 
51 
55 Class define_class(
56  char const * name,
57  Object superclass = rb_cObject);
58 
60 
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 
Definition: Module_impl.hpp:47
A helper for defining a Class and its methods.
Definition: Class_defn.hpp:21
The base class for all Objects.
Definition: Object_defn.hpp:23
Class & undef_creation_funcs()
Disallow creation of an instance from Ruby code.