Untitled
By: a guest | Mar 20th, 2010 | Syntax:
C | Size: 1.51 KB | Hits: 64 | Expires: Never
#ifndef _CCL_H
#ifdef CCL_LGEN
#define CCL_API __attribute__((dllexport))
#warning "Are you compiling the CCL source code?"
#else
#define CCL_API __attribute__((dllimport))
#endif /* CCL_LGEN */
#define CCL_CALLCONV __attribute_((stdcall))
#ifndef NO_CCLTYPES
#include "CCLTypes.h"
#else
#warning "Have you already included a substitute for CCLTypes?"
#endif /* NO_CCLTYPES */
#define CCL_TYPE_BYTE 0
#define CCL_TYPE_SHORT 1
#define CCL_TYPE_INT 2
#define CCL_TYPE_LONG 3
#define CCL_TYPE_PTR 4
typedef CCLpvoid CCLHashMap;
#ifdef CCL_HASHMAPS
/**
Summary:
Creates a new hash map with the specified size, key type, and value type
Arguments:
size- the size of the map
keyType- the type of key(SEE: CCL_TYPE_*)
valType- the type of value(SEE: CCL_TYPE_*)
*/
CCL_API CCLHashMap CCL_CALLCONV CCLHashMap_new(CCLuint size, CCLint keyType, CCLint valType);
/**
Summary:
Associates the specified value with the specified key.
Arguments:
map- map to adjust
key- key to associate the value with
val- value to associate the key with
Return Value:
None.
*/
CCL_API void CCL_CALLCONV CCLHashMap_put(CCLHashMap map, CCLpvoid key, CCLpvoid val);
/**
Summary:
Grabs the value corresponding to the specified key.
Arguments:
key- pointer to the key to grab the value for.
Return Value:
The value corresponding to the key specified or NULL if key was not found.
*/
CCL_API CCLpvoid CCL_CALLCONV CCLHashMap_get(CCLHashMap map, CCLpvoid key);
#endif /* CCL_HASHMAPS */
#endif /* _CCL_H */