coan 4.2.4
The Pointer-Vector component internals
Collaboration diagram for The Pointer-Vector component internals:

Data Structures

struct  ptr_vector

Files

file  ptr_vector.c

Functions

static void * default_cloner (void const *src)
static void ptr_vector_init (ptr_vector_h pv, dtor_t dtor, cloner_t cloner)
static void ptr_vector_copy_init (ptr_vector_h dest, ptr_vector_const_h src)
static void ptr_vector_finis (ptr_vector_h pv)

Detailed Description

internals.


Function Documentation

static void* default_cloner ( void const *  src) [static]

Default cloning function for heap objects.

Parameters:
srcAddress of the object to be cloned
Returns:
Pointer to a new heap object constructed by copying the null-terminated array of bytes at src.

Definition at line 72 of file ptr_vector.c.

References clone().

Referenced by ptr_vector_init().

Here is the call graph for this function:

static void ptr_vector_copy_init ( ptr_vector_h  dest,
ptr_vector_const_h  src 
) [static]

Initialise a pointer vector from another.

Parameters:
destThe pointer vector to be initialised.
srcThe pointer vector from which dest is to be initialised.

dest is initialised as a copy of src.

Definition at line 104 of file ptr_vector.c.

References ptr_vector::dtor, ptr_vector_append(), ptr_vector_begin_const(), ptr_vector_end_const(), and ptr_vector_init().

Referenced by ptr_vector_copy().

Here is the call graph for this function:

static void ptr_vector_finis ( ptr_vector_h  pv) [static]

Finalise a pointer vector, releasing the resources of all contained objects.

Definition at line 121 of file ptr_vector.c.

References ptr_vector::count, ptr_vector::dtor, and ptr_vector::ptrs.

Referenced by ptr_vector_dispose().

static void ptr_vector_init ( ptr_vector_h  pv,
dtor_t  dtor,
cloner_t  cloner 
) [static]

Initialise a pointer vector

Parameters:
pvAddress of unitialised storage to be initialised as a pointer vector.
dtorDestructor function for this vector, or NULL. If NULL the default destructor is free()
clonerCloning function for this vector, or NULL. If NULL the default cloning function is default_cloner.

Definition at line 87 of file ptr_vector.c.

References ptr_vector::cap, ptr_vector::cloner, ptr_vector::count, default_cloner(), ptr_vector::dtor, ptr_vector::ptrs, and ptr_vector::tranch.

Referenced by ptr_vector_copy_init(), and ptr_vector_new().

Here is the call graph for this function:

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines