1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
/* Do not edit this file. It was automatically genarated. */
#ifndef HEADER_TypedVector
#define HEADER_TypedVector
/*
htop
(C) 2004 Hisham H. Muhammad
Released under the GNU GPL, see the COPYING file
in the source distribution for its full text.
*/
#include "Object.h"
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include "debug.h"
#include <assert.h>
#ifndef DEFAULT_SIZE
#define DEFAULT_SIZE -1
#endif
typedef void(*TypedVector_procedure)(void*);
typedef int(*TypedVector_booleanFunction)(const Object*,const Object*);
typedef struct TypedVector_ {
Object **array;
int arraySize;
int growthRate;
int items;
TypedVector_booleanFunction compareFunction;
char* vectorType;
bool owner;
} TypedVector;
TypedVector* TypedVector_new(char* vectorType_, bool owner, int size);
void TypedVector_delete(TypedVector* this);
void TypedVector_prune(TypedVector* this);
int TypedVector_compareFunction(const Object* v1, const Object* v2);
void TypedVector_setCompareFunction(TypedVector* this, TypedVector_booleanFunction f);
void TypedVector_sort(TypedVector* this);
void TypedVector_insert(TypedVector* this, int index, void* data_);
Object* TypedVector_take(TypedVector* this, int index);
Object* TypedVector_remove(TypedVector* this, int index);
void TypedVector_moveUp(TypedVector* this, int index);
void TypedVector_moveDown(TypedVector* this, int index);
void TypedVector_set(TypedVector* this, int index, void* data_);
inline Object* TypedVector_get(TypedVector* this, int index);
inline int TypedVector_size(TypedVector* this);
void TypedVector_merge(TypedVector* this, TypedVector* v2);
void TypedVector_add(TypedVector* this, void* data_);
inline int TypedVector_indexOf(TypedVector* this, void* search_);
void TypedVector_foreach(TypedVector* this, TypedVector_procedure f);
#endif
|