1 #ifndef PROTON_OBJECT_H
2 #define PROTON_OBJECT_H 1
25 #include <proton/cid.h>
27 #include <proton/import_export.h>
36 PN_EXTERN
pn_class_t *pn_class_create(
const char *name,
37 void (*initialize)(
void*),
38 void (*finalize)(
void*),
39 void (*incref)(
void*),
40 void (*decref)(
void*),
41 int (*refcount)(
void*));
43 PN_EXTERN
void *pn_class_new(
const pn_class_t *clazz,
size_t size);
44 PN_EXTERN
const char *pn_class_name(
const pn_class_t *clazz);
45 PN_EXTERN pn_cid_t pn_class_id(
const pn_class_t *clazz);
47 PN_EXTERN
const pn_class_t *pn_class(
void*
object);
48 PN_EXTERN
void *pn_incref(
void *
object);
49 PN_EXTERN
int pn_decref(
void *
object);
50 PN_EXTERN
int pn_refcount(
void *
object);
51 PN_EXTERN
void pn_free(
void *
object);
52 PN_EXTERN
char *pn_tostring(
void *
object);
54 #define PN_LEGCTX ((pn_handle_t) 0)
73 #define PN_HANDLE(name) \
74 static const char _PN_HANDLE_ ## name = 0; \
75 static const pn_handle_t name = ((pn_handle_t) &_PN_HANDLE_ ## name);
85 PN_EXTERN
void pn_record_clear(
pn_record_t *record);
const void * pn_handle_t
A type to represent the internal navigational state of a proton object.
Definition: types.h:467
struct pn_record_t pn_record_t
A type representing attached context information.
Definition: types.h:477
struct pn_class_t pn_class_t
A type representing the type of a proton internal object.
Definition: types.h:472