00001
00002 #ifndef CMAID_SET_FUNCDEF_H
00003 #define CMAID_SET_FUNCDEF_H
00004
00010 #define CMAID_SET_FUNC(c) ((const Cmaid_Set_Interface *)(((c)->interface)))
00011
00024 CMAID_INLINE void *
00025 cmaid_set_add(Cmaid_Set *s, void *data)
00026 {
00027 CMAID_CHECK_POINTER_RET(data, NULL);
00028 CMAID_CHECK_TYPE_RET(s, CMAID_MAGIC_SET, NULL);
00029 return CMAID_SET_FUNC(s)->add(s, data);
00030 }
00031
00041 CMAID_INLINE void
00042 cmaid_set_remove(Cmaid_Set *s, const void *data)
00043 {
00044 CMAID_CHECK_POINTER(data);
00045 CMAID_CHECK_TYPE(s, CMAID_MAGIC_SET);
00046 CMAID_SET_FUNC(s)->remove(s, data);
00047 }
00048
00058 CMAID_INLINE void *
00059 cmaid_set_get(Cmaid_Set *s, const void *data)
00060 {
00061 CMAID_CHECK_POINTER_RET(data, NULL);
00062 CMAID_CHECK_TYPE_RET(s, CMAID_MAGIC_SET, NULL);
00063 return CMAID_SET_FUNC(s)->get(s, data);
00064 }
00065
00066 #endif