source: libcf/trunk/include/cf_stack.h@ 109

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

#1 add typical data structure algorithms (linked-list / queue / stak) and rename symbol for context of each modules

File size: 712 bytes
Line 
1/**
2 * @file cf_stack.h
3 * @author myusgun <myusgun@gmail.com>
4 *
5 * @remark 스택
6 *
7 * @example stack.c
8 */
9#ifndef __CF_STACK_H__
10#define __CF_STACK_H__
11
12#include "cf_base.h"
13
14typedef void * CF_Stack_Ctx;
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20CF_EXPORT int
21CF_Stack_CreateCtx (CF_Stack_Ctx * ctx);
22
23CF_EXPORT int
24CF_Stack_DestroyCtx (CF_Stack_Ctx ctx);
25
26CF_EXPORT int
27CF_Stack_Push (CF_Stack_Ctx ctx,
28 const void * element);
29
30CF_EXPORT int
31CF_Stack_Pop (CF_Stack_Ctx ctx,
32 void ** element);
33
34CF_EXPORT int
35CF_Stack_Top (CF_Stack_Ctx ctx,
36 void ** element);
37
38CF_EXPORT int
39CF_Stack_GetSize (CF_Stack_Ctx ctx);
40
41#ifdef __cplusplus
42}
43#endif
44
45#endif // #ifndef __CF_STACK_H__
Note: See TracBrowser for help on using the repository browser.