Rice  1.5.2
 All Classes Files Functions Variables Typedefs Friends Pages
Address_Registration_Guard_defn.hpp
1 #ifndef Rice__Address_Registration_Guard_defn__hpp_
2 #define Rice__Address_Registration_Guard_defn__hpp_
3 
4 #include "Object_defn.hpp"
5 #include "detail/ruby.hpp"
6 #include "detail/Not_Copyable.hpp"
7 
8 namespace Rice
9 {
10 
12 
30  : private detail::Not_Copyable
31 {
32 public:
34  /* \param address The address to register with the GC. The address
35  * must point to a valid ruby object (RObject).
36  */
38 
40 
45 
47 
52 
54  VALUE * address() const;
55 
57  void swap(Address_Registration_Guard & other);
58 
62  static void disable();
63 
64 private:
65  static bool enabled;
66  static bool exit_handler_registered;
67 
68  static void registerExitHandler();
69 
70  VALUE * address_;
71 };
72 
73 } // namespace Rice
74 
75 #endif // Rice__Address_Registration_Guard_defn__hpp_
Address_Registration_Guard(VALUE *address)
Register an address with the GC.
void swap(Address_Registration_Guard &other)
Swap with another Address_Registration_Guard.
VALUE * address() const
Get the address that is registered with the GC.
A guard to register a given address with the GC.
Definition: Address_Registration_Guard_defn.hpp:29
The base class for all Objects.
Definition: Object_defn.hpp:23
~Address_Registration_Guard()
Unregister an address/Object with the GC.