IGMPlot: src/include/ADF_ArrayList.h Source File

IGMPlot 3.16 Optimized IGMplot version able to use wfn/wfx/xyz files

Loading...
Searching...
No Matches
ADF_ArrayList.h
1 /***************************************************************************
2 ArrayList.h - header file for ArrayList: a simple searchable and extendable
3 list type
4
5 Copyright (C) 2006-2023 by Software for Chemistry & Materials B.V.
6 For support, contact support at scm . com
7
8 This file is part of the ADF software
9 For more information, see <http://www.scm.com>
10
11 This program is free software; you can redistribute it and/or modify
12 it under the terms of the GNU Lesser General Public License as published by
13 the Free Software Foundation version 3 of the License.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
19
20 SCM owns the intellectual property right for this file and reserves the
21 right to distrbute it under a license other than LGPL
22 ****************************************************************************/
23
24#ifndef _ARRAY_LIST_H_
25#define _ARRAY_LIST_H_
26
27 typedef struct _ArrayList {
28 void **data;
29 int allocatedSize;
30 int length;
31} ArrayList;
32
33
34void addArrayListElement (ArrayList *array, void *elem);
35void insertArrayListElement (ArrayList *array, void *elem, int position);
36void *getArrayListElement (const ArrayList *array, int index);
37void *removeArrayListElement (ArrayList *array, int index);
38void clearArrayList(ArrayList *array);
39void *findArrayListElement(const ArrayList *array, const void *searchItem, \
40 int (*comparator)(const void *searchItem, const void *arrayItem));
41int findIndexOfArrayListElement(const ArrayList *array, const void *searchItem, \
42 int (*comparator)(const void *searchItem, const void *arrayItem));
43
44#endif
45
_ArrayList
Definition ADF_ArrayList.h:27