CFSet.h
上传用户:xjjlds
上传日期:2015-12-05
资源大小:22823k
文件大小:5k
源码类别:

多媒体编程

开发平台:

Visual C++

  1. /*
  2.      File:       CFSet.h
  3.  
  4.      Contains:   CoreFoundation set collection
  5.  
  6.      Version:    Technology: Mac OS X
  7.                  Release:    QuickTime 6.0.2
  8.  
  9.      Copyright:  (c) 1999-2001 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:      For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __CFSET__
  18. #define __CFSET__
  19. #ifndef __CFBASE__
  20. #include "CFBase.h"
  21. #endif
  22. #if PRAGMA_ONCE
  23. #pragma once
  24. #endif
  25. #ifdef __cplusplus
  26. extern "C" {
  27. #endif
  28. #if PRAGMA_IMPORT
  29. #pragma import on
  30. #endif
  31. #if PRAGMA_STRUCT_ALIGN
  32.     #pragma options align=mac68k
  33. #elif PRAGMA_STRUCT_PACKPUSH
  34.     #pragma pack(push, 2)
  35. #elif PRAGMA_STRUCT_PACK
  36.     #pragma pack(2)
  37. #endif
  38. typedef CALLBACK_API_C( const void *, CFSetRetainCallBack )(CFAllocatorRef allocator, const void *ptr);
  39. typedef CALLBACK_API_C( void , CFSetReleaseCallBack )(CFAllocatorRef allocator, const void *ptr);
  40. typedef CALLBACK_API_C( CFStringRef , CFSetCopyDescriptionCallBack )(const void *ptr);
  41. typedef CALLBACK_API_C( Boolean , CFSetEqualCallBack )(const void *ptr1, const void *ptr2);
  42. typedef CALLBACK_API_C( CFHashCode , CFSetHashCallBack )(const void *ptr);
  43. struct CFSetCallBacks {
  44.     CFIndex                         version;
  45.     CFSetRetainCallBack             retain;
  46.     CFSetReleaseCallBack            release;
  47.     CFSetCopyDescriptionCallBack    copyDescription;
  48.     CFSetEqualCallBack              equal;
  49.     CFSetHashCallBack               hash;
  50. };
  51. typedef struct CFSetCallBacks           CFSetCallBacks;
  52. extern const CFSetCallBacks kCFTypeSetCallBacks;
  53. extern const CFSetCallBacks kCFCopyStringSetCallBacks;
  54. typedef CALLBACK_API_C( void , CFSetApplierFunction )(const void *val, void *context);
  55. typedef const struct __CFSet * CFSetRef;
  56. typedef struct __CFSet * CFMutableSetRef;
  57. EXTERN_API_C( CFTypeID )
  58. CFSetGetTypeID                  (void);
  59. EXTERN_API_C( CFSetRef )
  60. CFSetCreate                     (CFAllocatorRef         allocator,
  61.                                  const void **          values,
  62.                                  CFIndex                numValues,
  63.                                  const CFSetCallBacks * callBacks);
  64. EXTERN_API_C( CFSetRef )
  65. CFSetCreateCopy                 (CFAllocatorRef         allocator,
  66.                                  CFSetRef               theSet);
  67. EXTERN_API_C( CFMutableSetRef )
  68. CFSetCreateMutable              (CFAllocatorRef         allocator,
  69.                                  CFIndex                capacity,
  70.                                  const CFSetCallBacks * callBacks);
  71. EXTERN_API_C( CFMutableSetRef )
  72. CFSetCreateMutableCopy          (CFAllocatorRef         allocator,
  73.                                  CFIndex                capacity,
  74.                                  CFSetRef               theSet);
  75. EXTERN_API_C( CFIndex )
  76. CFSetGetCount                   (CFSetRef               theSet);
  77. EXTERN_API_C( CFIndex )
  78. CFSetGetCountOfValue            (CFSetRef               theSet,
  79.                                  const void *           value);
  80. EXTERN_API_C( Boolean )
  81. CFSetContainsValue              (CFSetRef               theSet,
  82.                                  const void *           value);
  83. EXTERN_API_C( const void *)
  84. CFSetGetValue                   (CFSetRef               theSet,
  85.                                  const void *           candidate);
  86. EXTERN_API_C( Boolean )
  87. CFSetGetValueIfPresent          (CFSetRef               theSet,
  88.                                  const void *           candidate,
  89.                                  const void **          value);
  90. EXTERN_API_C( void )
  91. CFSetGetValues                  (CFSetRef               theSet,
  92.                                  const void **          values);
  93. EXTERN_API_C( void )
  94. CFSetApplyFunction              (CFSetRef               theSet,
  95.                                  CFSetApplierFunction   applier,
  96.                                  void *                 context);
  97. EXTERN_API_C( void )
  98. CFSetAddValue                   (CFMutableSetRef        theSet,
  99.                                  const void *           value);
  100. EXTERN_API_C( void )
  101. CFSetReplaceValue               (CFMutableSetRef        theSet,
  102.                                  const void *           value);
  103. EXTERN_API_C( void )
  104. CFSetSetValue                   (CFMutableSetRef        theSet,
  105.                                  const void *           value);
  106. EXTERN_API_C( void )
  107. CFSetRemoveValue                (CFMutableSetRef        theSet,
  108.                                  const void *           value);
  109. EXTERN_API_C( void )
  110. CFSetRemoveAllValues            (CFMutableSetRef        theSet);
  111. #if PRAGMA_STRUCT_ALIGN
  112.     #pragma options align=reset
  113. #elif PRAGMA_STRUCT_PACKPUSH
  114.     #pragma pack(pop)
  115. #elif PRAGMA_STRUCT_PACK
  116.     #pragma pack()
  117. #endif
  118. #ifdef PRAGMA_IMPORT_OFF
  119. #pragma import off
  120. #elif PRAGMA_IMPORT
  121. #pragma import reset
  122. #endif
  123. #ifdef __cplusplus
  124. }
  125. #endif
  126. #endif /* __CFSET__ */