44 #include "RTOp_obj_index_vtbl.h"
45 #include "RTOp_obj_free_free.h"
51 static int get_obj_type_num_entries(
53 ,
const void* instance_data
65 static int obj_create(
const struct RTOp_obj_type_vtbl_t* vtbl,
const void* instance_data,
void** obj )
67 const int mem_size =
sizeof(RTOp_index_type);
68 *obj = malloc( mem_size );
69 *((RTOp_index_type*)*obj) = 0;
73 static int obj_reinit(
const struct RTOp_obj_type_vtbl_t* vtbl,
const void* instance_data,
void* obj )
75 *((RTOp_index_type*)obj) = 0;
79 static int extract_state(
81 ,
const void * instance_data
84 ,RTOp_value_type value_data[]
86 ,RTOp_index_type index_data[]
88 ,RTOp_char_type char_data[]
92 assert( num_values == 0 );
93 assert( num_indexes == 1 );
94 assert( num_chars == 0 );
95 index_data[0] = *((RTOp_index_type*)obj);
99 static int load_state(
101 ,
const void * instance_data
103 ,
const RTOp_value_type value_data[]
105 ,
const RTOp_index_type index_data[]
107 ,
const RTOp_char_type char_data[]
112 assert( num_values == 0 );
113 assert( num_indexes == 1 );
114 assert( num_chars == 0 );
116 obj_create(NULL,NULL,obj);
117 *((RTOp_index_type*)*obj) = index_data[0];
int(* get_obj_type_num_entries)(const struct RTOp_obj_type_vtbl_t *vtbl, const void *instance_data, int *num_values, int *num_indexes, int *num_chars)
int(* obj_create)(const struct RTOp_obj_type_vtbl_t *vtbl, const void *instance_data, void **obj)
int(* extract_state)(const struct RTOp_obj_type_vtbl_t *vtbl, const void *instance_data, void *obj, int num_values, RTOp_value_type value_data[], int num_indexes, RTOp_index_type index_data[], int num_chars, RTOp_char_type char_data[])
int(* obj_reinit)(const struct RTOp_obj_type_vtbl_t *vtbl, const void *instance_data, void *obj)
int(* load_state)(const struct RTOp_obj_type_vtbl_t *vtbl, const void *instance_data, int num_values, const RTOp_value_type value_data[], int num_indexes, const RTOp_index_type index_data[], int num_chars, const RTOp_char_type char_data[], void **obj)