libcsem  0.2
csem_list.h
Go to the documentation of this file.
00001 /*
00002  * $Id: csem__list_8h_source.html,v 1.1 2013-04-22 20:16:23 hitoshi Exp $
00003  * See Copyright for the status of this software.
00004  * uchida@w3.org
00005  */
00006 #ifndef CSEM_LIST_H
00007 #define CSEM_LIST_H
00008 
00009 #ifdef __cplusplus
00010 #define CSEM_NS_C_BEGIN extern "C" {
00011 #define CSEM_NS_C_END }
00012 #else
00013 #define CSEM_NS_C_BEGIN
00014 #define CSEM_NS_C_END
00015 #endif
00016 
00017 CSEM_NS_C_BEGIN
00018 
00019 #include <stddef.h>
00020 #include "csem_common.h"
00021 
00023 typedef struct CSEM_List CSEM_List;
00024 
00030 CSEM_List *CSEM_List_Create(size_t initial_size);
00031 
00038 CSEM_Error CSEM_List_Add(CSEM_List *list, const void *data);
00039 
00045 size_t CSEM_List_Size(const CSEM_List *list);
00046 
00053 void *CSEM_List_Get(const CSEM_List *list, int index);
00054 
00061 CSEM_Bool CSEM_List_Contains(const CSEM_List *list, const void *data);
00062 
00069 int CSEM_List_IndexOf(const CSEM_List *list, const void *data);
00070 
00076 CSEM_Bool CSEM_List_IsEmpty(const CSEM_List *list);
00077 
00084 void *CSEM_List_Remove(CSEM_List *list, int index);
00085 
00093 void *CSEM_List_Replace(CSEM_List *list, int index, const void *data);
00094 
00100 void CSEM_List_Clear(CSEM_List *list, CSEM_Bool free);
00101 
00107 void CSEM_List_Dispose(CSEM_List *list, CSEM_Bool free);
00108 
00109 CSEM_NS_C_END
00110 
00111 #endif /* end of CSEM_LIST_H */
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines