36 return ::CFArrayGetCount(array);
41 const void *value)
const {
44 return ::CFArrayGetCountOfValue(array, range, value);
51 return ::CFArrayGetCountOfValue(array, CFRangeMake(0,
GetCount()), value);
58 const CFIndex num_array_items = ::CFArrayGetCount(array);
59 if (0 <= idx && idx < num_array_items) {
60 return ::CFArrayGetValueAtIndex(array, idx);
69 const CFIndex num_array_items = ::CFArrayGetCount(array);
70 if (0 <= idx && idx < num_array_items) {
71 ::CFArraySetValueAtIndex(array, idx, value);
84 ::CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks);
88 ::CFArrayAppendValue(array, value);
95 CFStringEncoding encoding,
102 ::CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks);
107 ::CFArrayAppendValue(array, cf_str.
get());
114 const char *s,
bool can_create) {
120 ::CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks);
126 ::CFArrayAppendValue(array, cf_path.
get());
bool AppendFileSystemRepresentationAsCFString(const char *s, bool can_create=true)
bool SetValueAtIndex(CFIndex idx, const void *value)
CFCMutableArray(CFMutableArrayRef array=NULL)
bool AppendCStringAsCFString(const char *cstr, CFStringEncoding encoding=kCFStringEncodingUTF8, bool can_create=true)
CFIndex GetCountOfValue(const void *value) const
const void * GetValueAtIndex(CFIndex idx) const
~CFCMutableArray() override
bool AppendValue(const void *value, bool can_create=true)
CFCMutableArray & operator=(const CFCMutableArray &rhs)
void reset(CFMutableArrayRef ptr=NULL)
CFStringRef SetFileSystemRepresentation(const char *path)