File: list.h

package info (click to toggle)
gman 0.9.3-5.3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 652 kB
  • sloc: ansic: 7,389; makefile: 131; perl: 105
file content (58 lines) | stat: -rw-r--r-- 944 bytes parent folder | download | duplicates (8)
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
/********************	list.h  *****************/
/******************** 	1999.6.13   *************/

#ifndef _LIST_H
#define _LIST_H

class List
{
 private:
	void ** items;
	int buffer_length;
	int count;
 public:
	List();
	~List();
	void add_item(void * item);
	void * get_item(int handle);
	int reset_item(int handle,void * item);
	int search_item(void * item);
	int delete_item(int handle);
	void insert_item(int handle, void * item);
	void delete_all();
	int get_size();
	int get_items(void * buffer);
	int meet_end(int handle);
};

class Dictionary
{
 private:
	List * names;
	List * values;
 public:
	Dictionary();
	~Dictionary();
	void add_item(char * name,void * value);
	int have_item(char * name);
	int search_item(char * name);
	void * get_value(char* name);
	int get_size();
	void * get_value(int i);
	char * get_name(int i);
	void set_value(int i,void * value);
	void delete_item(int i);
	void display_items();
};

#endif