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