メインページ | アルファベット順一覧 | 構成 | ファイル一覧 | 構成メンバ | ファイルメンバ | 関連ページ

# dkcSingleList.h

説明を見る。

    00001
    00012 #ifndef DKUTIL_C_SINGLE_LIST_H
    00013 #define DKUTIL_C_SINGLE_LIST_H
    00014
    00015 #include "dkcOSIndependent.h"
    00016 #include "dkcBuffer.h"
    00017
    00018
    00022 typedef struct dkc_SingleList{
    00023     BYTE *mBuff;
    00024     size_t mSize;
    00025     struct dkc_SingleList *mNext;
    00026 }DKC_SINGLELIST;
    00027
    00028
    00029
    00030
    00031
    00033 DKC_EXTERN DKC_SINGLELIST * WINAPI dkcAllocSingleList(const void *data,size_t size);
    00041
    00042 DKC_EXTERN int WINAPI dkcFreeSingleList(DKC_SINGLELIST **ptr);
    00043
    00044
    00053 DKC_EXTERN int WINAPI dkcSingleListInsert(DKC_SINGLELIST *ptr,const void *data,size_t size);
    00054
    00055
    00056 DKC_EXTERN void WINAPI dkcSingleListChain(DKC_SINGLELIST *ptr,DKC_SINGLELIST *nextp);
    00057
    00062 DKC_EXTERN size_t WINAPI dkcSingleListSize(DKC_SINGLELIST *top);
    00068 DKC_EXTERN DKC_SINGLELIST * WINAPI dkcSingleListErase(DKC_SINGLELIST *ptr);
    00072 DKC_EXTERN int WINAPI dkcSingleListGetBuffer(DKC_SINGLELIST *ptr,void *data,size_t size);
    00073
    00078 DKC_EXTERN int WINAPI dkcSingleListSetBuffer(DKC_SINGLELIST *ptr,const void *data,size_t size);
    00082 #define dkcSingleListDynamicSetBuffer(p,d,s) dkcSingleListSetBuffer(p,d,s)
    00083
    00087 DKC_EXTERN DKC_BUFFER* WINAPI dkcAllocSingleListBuffer(const DKC_SINGLELIST *ptr);
    00088
    00089 #define dkcFreeSingleListBuffer(p) dkcFreeBuffer(p)
    00090
    00091 /*
    00093 DKC_EXTERN DKC_SINGLELIST * WINAPI dkcAllocSingleListDeserialize(DKC_DESERIALIZE *se);
    00094
    00095
    00097 DKC_EXTERN void WINAPI dkcSingleListSerialize(const DKC_SINGLELIST *ptr,DKC_SERIALIZE *se);
    00098 */
    00099
    00100 //**********************************************************
    00101
    00103 typedef struct dkc_SingleListObject{
    00104     DKC_SINGLELIST *mBegin;
    00105     DKC_SINGLELIST *mTail;
    00106     DKC_SINGLELIST* (*next)(const DKC_SINGLELIST *);
    00107     DKC_SINGLELIST* (*begin)(struct dkc_SingleListObject *);
    00108     DKC_SINGLELIST* (*tail)(struct dkc_SingleListObject *);
    00109     BOOL (*end)(const DKC_SINGLELIST *);
    00110     BOOL (*push_back)(struct dkc_SingleListObject *,const void *data,size_t size);
    00116     void (*erase)(struct dkc_SingleListObject *p,DKC_SINGLELIST *prev,DKC_SINGLELIST *target);
    00117     int (WINAPI *setbuffer)(DKC_SINGLELIST *ptr,const void *data,size_t size);
    00118     int (WINAPI *getbuffer)(DKC_SINGLELIST *ptr,void *data,size_t size);
    00119     BOOL (*empty)(struct dkc_SingleListObject *);
    00120 }DKC_SINGLELIST_OBJECT;
    00121
    00122 DKC_EXTERN DKC_SINGLELIST_OBJECT * WINAPI dkcAllocSingleListObject(const void *data,size_t size);
    00123
    00124 DKC_EXTERN int WINAPI dkcFreeSingleListObject(DKC_SINGLELIST_OBJECT **);
    00125
    00126
    00127 //DKC_EXTERN DKC_SINGLELIST_OBJECT * WINAPI dkcAllocSingleListObjectDeserialize(DKC_DESERIALIZE *se);
    00128
    00129
    00130
    00131 //DKC_EXTERN void WINAPI dkcSingleListObjectSerialize(const DKC_SINGLELIST_OBJECT *ptr,DKC_SERIALIZE *se);
    00132
    00133 DKC_EXTERN int WINAPI dkcGetSingleListBuffer(DKC_SINGLELIST *ptr,void *data,size_t size);
    00134 /*
    00135 #ifndef DKUTIL_C_SINGLE_LIST_C
    00136 #   include "dkcSingleList.c"
    00137 #endif
    00138 */
    00139
    00140 #endif //end of include once