-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathArrayList.h
More file actions
47 lines (33 loc) · 887 Bytes
/
ArrayList.h
File metadata and controls
47 lines (33 loc) · 887 Bytes
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
//
// ArrayList.h
// OpenDMX
//
// Created by Patrick Marx on 21.08.17.
// Copyright © 2017 Patrick Marx. All rights reserved.
//
#ifndef ArrayList_h
#define ArrayList_h
#include <stdlib.h>
typedef struct{
size_t size;
void** data;
}ArrayList;
/**
* Creates the arraylist
**/
ArrayList* create();
/**
* Set a value to the list
**/
void setData(ArrayList *list, void** data, int max, int clearData);
void add(ArrayList *list, void* elem);
void *ArrayList_get(ArrayList *list, int index);
//Returns the size of the internal Array in the memory
size_t getSizeOf(ArrayList *list);
//returns the Elements in the arraylist
size_t getSize(ArrayList *list);
void ArrayList_remove(ArrayList *list, int index, int freeit);
void ArrayList_clear(ArrayList *list);
void deallocate(ArrayList *list);
int getIndex(ArrayList *list, void *elem);
#endif /* ArrayList_h */