MOOCHO (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions | Variables
RTOp_obj_values_vtbl.c File Reference
#include "RTOp_obj_values_vtbl.h"
#include "RTOp_obj_free_free.h"
#include <stdlib.h>
Include dependency graph for RTOp_obj_values_vtbl.c:

Go to the source code of this file.

Functions

static 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)
 
static int obj_create (const struct RTOp_obj_type_vtbl_t *vtbl, const void *instance_data, void **obj)
 
static int obj_reinit (const struct RTOp_obj_type_vtbl_t *vtbl, const void *instance_data, void *obj)
 
static 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[])
 
static 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)
 

Variables

const struct RTOp_obj_type_vtbl_t RTOp_obj_values_vtbl
 

Function Documentation

static 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 
)
static

Definition at line 51 of file RTOp_obj_values_vtbl.c.

static int obj_create ( const struct RTOp_obj_type_vtbl_t vtbl,
const void instance_data,
void **  obj 
)
static

Definition at line 65 of file RTOp_obj_values_vtbl.c.

static int obj_reinit ( const struct RTOp_obj_type_vtbl_t vtbl,
const void instance_data,
void obj 
)
static

Definition at line 78 of file RTOp_obj_values_vtbl.c.

static 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[] 
)
static

Definition at line 88 of file RTOp_obj_values_vtbl.c.

static 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 
)
static

Definition at line 113 of file RTOp_obj_values_vtbl.c.

Variable Documentation

const struct RTOp_obj_type_vtbl_t RTOp_obj_values_vtbl
Initial value:
=
{
}
static int obj_reinit(const struct RTOp_obj_type_vtbl_t *vtbl, const void *instance_data, void *obj)
static 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[])
static 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)
static 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)
static int obj_create(const struct RTOp_obj_type_vtbl_t *vtbl, const void *instance_data, void **obj)
int RTOp_obj_free_free(const struct RTOp_obj_type_vtbl_t *vtbl, const void *instance_data, void **obj)

Virtual function table for a simple array of scalar objects of type RTOp_value_type.

The functions do the following:

  • get_obj_type_num_entries(...)
    • vtbl [in] Ignored
    • instance_data [in] Must be !=NULL and points to an RTOp_index_type that gives the number of values in the list.
    • num_values [out] Returns *(RTOp_index_type*)instance_data
    • num_indexes [out] Returns 0
    • num_chars [out] Returns 0
  • obj_create(...)
    • vtbl [in] Ignored
    • instance_data [in] Must be !=NULL and points to an RTOp_index_type that gives the number of values in the list.
    • obj [out] Points an allocated list of RTOp_value_type values all initialized to 0.0.
  • obj_reinit(...)
    • vtbl [in] Ignored
    • instance_data [in] Must be !=NULL and points to an RTOp_index_type that gives the number of values in the list.
    • obj [in/out] Points an allocated list of RTOp_value_type values all initialized to 0.0.
  • obj_free(...)
    • vtbl [in] Ignored
    • instance_data [in] Must be !=NULL and points to an RTOp_index_type that gives the number of values in the list.
    • obj [in/out] allocated object is freed and obj is set to NULL.
  • extract_state(...)
    • vtbl [in] Ignored
    • instance_data [in] Must be !=NULL and points to an RTOp_index_type that gives the number of values in the list.
    • obj [in] Allocated RTOp_index_type object.
    • num_values [in] Must be *(RTOp_index_type*)instance_data
    • value_data [out] value_data[k] = ((RTOp_value_type*)obj)[k], k = 1 ... num_values
    • num_indexes [in] Must be 0
    • index_data [out] Must be NULL
    • num_chars [in] Must be 0
    • char_data [out] Must be NULL
  • load_state(...)
    • vtbl [in] Ignored
    • instance_data [in] Must be !=NULL and points to an RTOp_index_type that gives the number of values in the list.
    • num_values [in] Must be *(RTOp_index_type*)instance_data
    • num_indexes [in] Must be 0
    • index_data [in] Must be NULL
    • num_chars [in] Must be 0
    • char_data [in] Must be NULL
    • obj [in/out] If *obj == NULL then the object is allocated as in obj_create() before it is assigned. On output: ((RTOp_value_type*)obj)[k] = value_data[k], k = 1 ... num_values

Definition at line 140 of file RTOp_obj_values_vtbl.c.