#ifndef __BEE2_OBJ_H
#define __BEE2_OBJ_H
#include "bee2/defs.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct
{
size_t keep;
size_t p_count;
size_t o_count;
} obj_hdr_t;
#define objKeep(obj)\
(((const obj_hdr_t*)(obj))->keep)
#define objPCount(obj)\
(((const obj_hdr_t*)(obj))->p_count)
#define objOCount(obj)\
(((const obj_hdr_t*)(obj))->o_count)
#define objPtr(obj, i, type)\
(((type**)((octet*)(obj) + sizeof(obj_hdr_t)))[i])
#define objCPtr(obj, i, type)\
(((const type* const*)((const octet*)(obj) + sizeof(obj_hdr_t)))[i])
#define objEnd(obj, type)\
((type*)((octet*)(obj) + objKeep(obj)))
bool_t objIsOperable(
const void* obj
);
bool_t objIsOperable2(
const void* obj
);
void objCopy(
void* dest,
const void* src
);
void objAppend(
void* dest,
const void* src,
size_t i
);
#ifdef __cplusplus
}
#endif
#endif