18#ifndef GLOBUS_OBJECT_H
19#define GLOBUS_OBJECT_H
34typedef void (*globus_object_copy_func_t) (
void * src_instance_data,
35 void ** dst_instance_data);
37typedef void (*globus_object_destructor_func_t) (
void * instance_data);
39typedef struct globus_object_type_s {
40 const struct globus_object_type_s *
const parent_type;
41 globus_object_copy_func_t
const copy_func;
42 globus_object_destructor_func_t
const destructor;
43 void *
const class_data;
44} globus_object_type_t;
46typedef struct globus_object_s {
47 const globus_object_type_t * type;
48 struct globus_object_s * parent_object;
53typedef char * (*globus_object_printable_string_func_t)
54 (globus_object_t * error);
61extern globus_object_t *
62globus_object_construct (
const globus_object_type_t * create_type);
66extern globus_object_t *
67globus_object_initialize_base (globus_object_t *
object);
69extern globus_object_t *
70globus_object_construct_base ();
72#define globus_object_static_initializer(object_type, \
81extern globus_object_t *
82globus_object_copy (
const globus_object_t *
object);
87globus_object_reference(globus_object_t *
object);
90globus_object_free (globus_object_t *
object);
94#define globus_object_type_static_initializer(parent_type, \
105#define globus_object_printable_type_static_initializer(pt,cf,df,s) \
106 globus_object_type_static_initializer((pt),(cf),(df),(void *)(s))
108extern globus_object_t *
109globus_object_initialize_printable (globus_object_t *
object);
111extern globus_object_t *
112globus_object_construct_printable ();
119extern const globus_object_type_t GLOBUS_OBJECT_TYPE_BASE_DEFINITION;
120#define GLOBUS_OBJECT_TYPE_BASE (&GLOBUS_OBJECT_TYPE_BASE_DEFINITION)
122extern const globus_object_type_t
123GLOBUS_OBJECT_TYPE_PRINTABLE_DEFINITION;
124#define GLOBUS_OBJECT_TYPE_PRINTABLE \
125 (&GLOBUS_OBJECT_TYPE_PRINTABLE_DEFINITION)
131extern globus_object_t GLOBUS_OBJECT_BASE_STATIC_PROTOTYPE;
132#define GLOBUS_OBJECT_BASE_PROTOTYPE (&GLOBUS_OBJECT_BASE_STATIC_PROTOTYPE)
134extern globus_object_t
135GLOBUS_OBJECT_PRINTABLE_STATIC_PROTOTYPE;
136#define GLOBUS_OBJECT_PRINTABLE_PROTOTYPE \
137 (&GLOBUS_OBJECT_PRINTABLE_STATIC_PROTOTYPE)
143extern const globus_object_type_t *
144globus_object_get_type (
const globus_object_t *
object);
148extern const globus_object_type_t *
149globus_object_type_get_parent_type (
const globus_object_type_t * type);
154globus_object_is_static (
const globus_object_t *
object);
160globus_object_type_get_class_data (
const globus_object_type_t * type);
165globus_object_type_match (
const globus_object_type_t * subtype,
166 const globus_object_type_t * supertype);
170extern globus_object_t *
171globus_object_upcast (globus_object_t *
object,
172 const globus_object_type_t * desired_type);
180globus_object_set_local_instance_data (globus_object_t *
object,
181 void * instance_data);
185globus_object_get_local_instance_data (
const globus_object_t *
object);
191globus_object_printable_to_string (globus_object_t *
object);
193extern globus_object_printable_string_func_t
194globus_object_printable_get_string_func (globus_object_t *
object);
200#define GLOBUS_OBJECT_MODULE (&globus_i_object_module)
Reference Counting Module Activation and Deactivation.
int globus_bool_t
Boolean type.
Definition globus_types.h:93
Module Descriptor.
Definition globus_module.h:72