source: libcf/trunk/include/cf_list.h@ 151

Last change on this file since 151 was 151, checked in by cheese, 11 years ago

#1 fix interface and add util module

File size: 1.4 KB
Line 
1/**
2 * \file cf_list.h
3 *
4 * \author myusgun <myusgun@gmail.com>
5 *
6 * \brief 연결 리스트
7 *
8 * \example list.c
9 */
10#ifndef __CF_LIST_H__
11#define __CF_LIST_H__
12
13#include "cf_base.h"
14
15/** 리스트 탐색자 (Opaque) */
16typedef cf_ctx cf_traverser;
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
22CF_EXPORT int
23CF_List_Create (cf_ctx * ctx);
24
25CF_EXPORT int
26CF_List_Destroy (cf_ctx ctx);
27
28CF_EXPORT int
29CF_List_Front (cf_ctx ctx,
30 cf_traverser * traverser);
31
32CF_EXPORT int
33CF_List_Rear (cf_ctx ctx,
34 cf_traverser * traverser);
35
36CF_EXPORT int
37CF_List_AddFront (cf_ctx ctx,
38 const void * element);
39
40CF_EXPORT int
41CF_List_AddRear (cf_ctx ctx,
42 const void * element);
43
44CF_EXPORT int
45CF_List_InsertBefore (cf_ctx ctx,
46 const cf_traverser traverser,
47 const void * element);
48
49CF_EXPORT int
50CF_List_InsertAfter (cf_ctx ctx,
51 const cf_traverser traverser,
52 const void * element);
53
54CF_EXPORT int
55CF_List_Set (cf_traverser traverser,
56 const void * element);
57
58CF_EXPORT int
59CF_List_Get (const cf_traverser traverser,
60 void ** element);
61
62CF_EXPORT int
63CF_List_Remove (cf_ctx ctx,
64 cf_traverser * traverser);
65
66CF_EXPORT int
67CF_List_RemoveAll (cf_ctx ctx);
68
69CF_EXPORT int
70CF_List_Prev (cf_traverser * traverser);
71
72CF_EXPORT int
73CF_List_Next (cf_traverser * traverser);
74
75CF_EXPORT int
76CF_List_GetSize (cf_ctx ctx);
77
78#ifdef __cplusplus
79}
80#endif
81
82#endif // #ifndef __CF_LIST_H__
Note: See TracBrowser for help on using the repository browser.