1 #ifndef Rice__ruby_struct__hpp_
2 #define Rice__ruby_struct__hpp_
8 #include "Builtin_Object.hpp"
9 #include "Address_Registration_Guard.hpp"
16 Struct define_struct();
98 friend Struct Rice::define_struct();
109 Array members()
const {
return members_; }
159 #include "Struct.ipp"
A guard to register a given address with the GC.
Definition: Address_Registration_Guard_defn.hpp:31
A wrapper for the ruby Array class.
Definition: Array.hpp:24
A smartpointer-like wrapper for Ruby builtin objects.
Definition: Builtin_Object_defn.hpp:20
A wrapper for the ID type.
Definition: Identifier.hpp:16
Definition: Module_impl.hpp:49
A helper for defining a Module and its methods.
Definition: Module_defn.hpp:27
String name() const
Return the name of the module.
The base class for all Objects.
Definition: Object_defn.hpp:25
Definition: Struct.hpp:124
void swap(Instance &other)
Swap with another Struct::Instance.
Object operator[](T index)
Get a member, given its offset.
Instance(Struct const &type, Object s)
Encapsulate an existing Struct instance.
Instance(Struct const &type, Array args=Array())
Create a new Instance of a Struct.
A wrapper for creating Struct classes.
Definition: Struct.hpp:59
Instance new_instance(Array args=Array()) const
Create a new instance of the Struct.
unsigned long offset_of(Identifier name) const
Get the offset of a member in the Struct.
Struct()
Create a new Struct.
Struct & define_member(Identifier name)
Define a new Struct member.
Struct & initialize(Module module, Identifier name)
Initialize the Struct class.
void swap(Struct &other)
Swap with another Struct.
virtual ~Struct()
Destructor.
Struct(Struct const &s)
Copy constructor.