|
offbrand
A collection of generic, reference counted datastructures in C for C
|
obvector Private Interface More...
#include "../obvector.h"Go to the source code of this file.
Classes | |
| struct | obvector_struct |
| obvector internal structure, encapsulating all data needed for an instance of obvector More... | |
Functions | |
| obvector * | obvector_create_default (uint32_t initial_capacity) |
| Create the default obvector. More... | |
| void | obvector_resize (obvector *v, uint32_t index) |
| Resizes a vector if the number of objects it contains is equal to its capacity by doubling the potential capacity of the vector. More... | |
| obj ** | obvector_recursive_sort (obj **to_sort, uint32_t size, int8_t order, ob_compare_fptr funct) |
| Internal merge sort implementation for an obvector. More... | |
| ob_hash_t | obvector_hash (const obj *to_hash) |
| Hash function for obvector. More... | |
| int8_t | obvector_compare (const obj *a, const obj *b) |
| Compares two instances of obvector. More... | |
| void | obvector_display (const obj *to_print) |
| Display function for an instance of OBString. More... | |
| void | obvector_destroy (obj *to_dealloc) |
| Destructor for obvector. More... | |
| uint32_t | obvector_find_valid_precursor (obj **array, uint32_t index) |
| Searches an array of obj for the first encountered non-NULL pointer, returning the index where this pointer is found. More... | |
obvector Private Interface
Compares two instances of obvector.
| a | A non-NULL obj pointer to type obvector |
| b | A non-NULL obj pointer to type obvector |
| OB_NOT_EQUAL | a does not equal b |
| OB_EQUAL_TO | a equals b |
| obvector* obvector_create_default | ( | uint32_t | initial_capacity) |
Create the default obvector.
| initial_capacity | Capacity of the vector to be created |
| void obvector_destroy | ( | obj * | to_dealloc) |
Destructor for obvector.
| to_dealloc | An obj pointer to an instance of obvector with reference count of 0 |
| void obvector_display | ( | const obj * | to_print) |
Display function for an instance of OBString.
| to_print | A non-NULL obj pointer to type OBString |
| uint32_t obvector_find_valid_precursor | ( | obj ** | array, |
| uint32_t | index | ||
| ) |
Searches an array of obj for the first encountered non-NULL pointer, returning the index where this pointer is found.
| array | Array of pointers to instances of Offbrand compatible classes |
| index | Index from which to begin searching |
| <UINT32_MAX | Index where a non-NULL pointer was found |
| UINT32_MAX | No non-NULL pointer was found |
Hash function for obvector.
| to_hash | An obj pointer to an instance of obvector |
| obj** obvector_recursive_sort | ( | obj ** | to_sort, |
| uint32_t | size, | ||
| int8_t | order, | ||
| ob_compare_fptr | funct | ||
| ) |
Internal merge sort implementation for an obvector.
| to_sort | Primitive array of objects to be sorted |
| size | Size of to_sort |
| order | Accepts OB_LEAST_TO_GREATEST or OB_GREATEST_TO_LEAST as valid sorting orders |
| funct | A compare_fptr to a function that returns an int8_t when given two obj * arguments |
| void obvector_resize | ( | obvector * | v, |
| uint32_t | index | ||
| ) |
Resizes a vector if the number of objects it contains is equal to its capacity by doubling the potential capacity of the vector.
| v | Pointer to an instance of obvector |
| index | Index that vector must be resized to contain |
1.8.4