Main Page | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

# dkcSerialize.h

Go to the documentation of this file.

    00001
    00007 #ifndef dkutil_c_Serialize__h
    00008 #define dkutil_c_Serialize__h
    00009
    00010 #include "dkcOSIndependent.h"
    00011
    00012
    00013
    00014 enum edkcSerialize{
    00015
    00016         edkcSerializeBufferMode = 0x01,
    00017         edkcSerializeFileMode = 0x02,
    00018         /*
    00019         edkcSerializeSaveMode = 0x04
    00020         edkcSerializeLoadMode = 0x08,
    00021         0x10,0x20,0x40,0x80
    00022         */
    00024         edkcSerializeIDStack = 'stac',
    00026         edkcSerializeIDQueue = 'queu',
    00027         edkcSerializeIDString = 'stri',
    00028         edkcSerializeIDBuffer = 'buff',
    00029         edkcSerializeIDMemoryStream = 'mstr',
    00030         edkcSerializeIDCircularMemoryStream = 'cmst',
    00031         edkcSerializeIDSingleList = 'slis',
    00032         edkcSerializeID2Tree = '2tre',
    00033         edkcSerializeIDSingleListObject = 'slio',
    00034 };
    00035
    00036
    00037
    00041 typedef struct dkc_Serialize{
    00042         UINT mMode;
    00043         void *mSignature;
    00044 }DKC_SERIALIZE;
    00048 typedef struct dkc_Deserialize{
    00049         UINT mMode;
    00050         void *mSignature;
    00051 }DKC_DESERIALIZE;
    00052
    00053
    00054 typedef int (CALLBACK *DKC_SERIALIZE_F_TYPE)(DKC_SERIALIZE *);
    00055
    00056
    00060 DKC_EXTERN DKC_SERIALIZE * WINAPI dkcAllocSerialize(UINT mode,const char *filename);
    00066 DKC_EXTERN int WINAPI dkcFreeSerialize(DKC_SERIALIZE **ptr);
    00067
    00068 DKC_EXTERN DKC_DESERIALIZE * WINAPI dkcAllocDeserialize(UINT mode,const char *filename);
    00069
    00070 DKC_EXTERN int WINAPI dkcFreeDeserialize(DKC_DESERIALIZE **);
    00071
    00072 DKC_EXTERN int WINAPI dkcDeserializeRead(DKC_DESERIALIZE *ptr,void *data,size_t size,size_t *readsize);
    00073
    00074 DKC_EXTERN int WINAPI dkcSerializeWrite(DKC_SERIALIZE *ptr,const void *data,size_t size);
    00075
    00076
    00077
    00078
    00079 #endif /*end of include once*/