glm_vector.h File Reference

Vector datatype. Part of Golem's collection of Advanced Data Types (ADTs). More...

Go to the source code of this file.

## Data Structures | |

struct | vector_t |

The vector datatype. More... | |

## Functions | |

vector_t * | vector_create (heap_id_t a_heap_id, uint_base_t a_length, size_t a_objectsize) |

Creates a new vector with the given length for the given heap-ID. Returns a pointer to the newly created vector or returns NULL if creation failed. A vector. More... | |

void | vector_destroy (heap_id_t a_heap_id, vector_t *a_vector) |

Clears the vector and then destroy's it. | |

void | vector_clear (heap_id_t a_heap_id, vector_t *a_vector) |

Empties the vector, destroying all objects stored in it. | |

uint_base_t | vector_add (heap_id_t a_heap_id, vector_t *a_vector, void *a_object) |

Adds the given object reference to the given vector and returns its index location. | |

uint_base_t | vector_get_length (vector_t *a_vector) |

Returns the length of the given vector. | |

void * | vector_get_object (vector_t *a_vector, uint_base_t a_index) |

Returns the object reference stored at index location [a_index] of vector [a_vector]. | |

Vector datatype. Part of Golem's collection of Advanced Data Types (ADTs).

- Copyright
- Copyright (C) 2013 Ruud Beukema. All rights reserved

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

Definition in file glm_vector.h.

vector_t* vector_create | ( | heap_id_t | a_heap_id, |

uint_base_t | a_length, |
||

size_t | a_objecsize |
||

) |

Creates a new vector with the given length for the given heap-ID. Returns a pointer to the newly created vector or returns NULL if creation failed. A vector.

- Copyright
- Copyright (C) 2013 Ruud Beukema. All rights reserved

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

Definition at line 18 of file glm_vector.c.