Share Pastebin
Guest
Public paste!

Untitled

By: a guest | Mar 20th, 2010 | Syntax: C | Size: 1.51 KB | Hits: 64 | Expires: Never
Copy text to clipboard
  1. #ifndef _CCL_H
  2.  
  3. #ifdef CCL_LGEN
  4. #define CCL_API __attribute__((dllexport))
  5. #warning "Are you compiling the CCL source code?"
  6. #else
  7. #define CCL_API __attribute__((dllimport))
  8. #endif /* CCL_LGEN */
  9. #define CCL_CALLCONV __attribute_((stdcall))
  10.  
  11. #ifndef NO_CCLTYPES
  12. #include "CCLTypes.h"
  13. #else
  14. #warning "Have you already included a substitute for CCLTypes?"
  15. #endif /* NO_CCLTYPES */
  16.  
  17. #define CCL_TYPE_BYTE 0
  18. #define CCL_TYPE_SHORT 1
  19. #define CCL_TYPE_INT 2
  20. #define CCL_TYPE_LONG 3
  21. #define CCL_TYPE_PTR 4
  22.  
  23. typedef CCLpvoid CCLHashMap;
  24.  
  25. #ifdef CCL_HASHMAPS
  26. /**
  27. Summary:
  28.         Creates a new hash map with the specified size, key type, and value type
  29. Arguments:
  30.         size- the size of the map
  31.         keyType- the type of key(SEE: CCL_TYPE_*)
  32.         valType- the type of value(SEE: CCL_TYPE_*)
  33. */
  34. CCL_API CCLHashMap CCL_CALLCONV CCLHashMap_new(CCLuint size, CCLint keyType, CCLint valType);
  35. /**
  36. Summary:
  37.         Associates the specified value with the specified key.
  38. Arguments:
  39.         map- map to adjust
  40.         key- key to associate the value with
  41.         val- value to associate the key with
  42. Return Value:
  43.         None.
  44. */
  45. CCL_API void CCL_CALLCONV CCLHashMap_put(CCLHashMap map, CCLpvoid key, CCLpvoid val);
  46. /**
  47. Summary:
  48.         Grabs the value corresponding to the specified key.
  49. Arguments:
  50.         key- pointer to the key to grab the value for.
  51. Return Value:
  52.         The value corresponding to the key specified or NULL if key was not found.
  53. */
  54. CCL_API CCLpvoid CCL_CALLCONV CCLHashMap_get(CCLHashMap map, CCLpvoid key);
  55. #endif /* CCL_HASHMAPS */
  56.  
  57. #endif /* _CCL_H */