LLDB mainline
CFCMutableDictionary.h
Go to the documentation of this file.
1//===-- CFCMutableDictionary.h ----------------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLDB_SOURCE_HOST_MACOSX_CFCPP_CFCMUTABLEDICTIONARY_H
10#define LLDB_SOURCE_HOST_MACOSX_CFCPP_CFCMUTABLEDICTIONARY_H
11
12#include "CFCReleaser.h"
13
14class CFCMutableDictionary : public CFCReleaser<CFMutableDictionaryRef> {
15public:
16 // Constructors and Destructors
20
21 // Operators
23
24 CFIndex GetCount() const;
25 CFIndex GetCountOfKey(const void *value) const;
26 CFIndex GetCountOfValue(const void *value) const;
27 void GetKeysAndValues(const void **keys, const void **values) const;
28 const void *GetValue(const void *key) const;
29 Boolean GetValueIfPresent(const void *key, const void **value_handle) const;
30 bool AddValue(CFStringRef key, const void *value, bool can_create = false);
31 bool SetValue(CFStringRef key, const void *value, bool can_create = false);
32 bool AddValueSInt8(CFStringRef key, int8_t value, bool can_create = false);
33 bool SetValueSInt8(CFStringRef key, int8_t value, bool can_create = false);
34 bool AddValueSInt16(CFStringRef key, int16_t value, bool can_create = false);
35 bool SetValueSInt16(CFStringRef key, int16_t value, bool can_create = false);
36 bool AddValueSInt32(CFStringRef key, int32_t value, bool can_create = false);
37 bool SetValueSInt32(CFStringRef key, int32_t value, bool can_create = false);
38 bool AddValueSInt64(CFStringRef key, int64_t value, bool can_create = false);
39 bool SetValueSInt64(CFStringRef key, int64_t value, bool can_create = false);
40 bool AddValueUInt8(CFStringRef key, uint8_t value, bool can_create = false);
41 bool SetValueUInt8(CFStringRef key, uint8_t value, bool can_create = false);
42 bool AddValueUInt16(CFStringRef key, uint16_t value, bool can_create = false);
43 bool SetValueUInt16(CFStringRef key, uint16_t value, bool can_create = false);
44 bool AddValueUInt32(CFStringRef key, uint32_t value, bool can_create = false);
45 bool SetValueUInt32(CFStringRef key, uint32_t value, bool can_create = false);
46 bool AddValueUInt64(CFStringRef key, uint64_t value, bool can_create = false);
47 bool SetValueUInt64(CFStringRef key, uint64_t value, bool can_create = false);
48 bool AddValueDouble(CFStringRef key, double value, bool can_create = false);
49 bool SetValueDouble(CFStringRef key, double value, bool can_create = false);
50 bool AddValueCString(CFStringRef key, const char *cstr,
51 bool can_create = false);
52 bool SetValueCString(CFStringRef key, const char *cstr,
53 bool can_create = false);
54 void RemoveValue(const void *value);
55 void ReplaceValue(const void *key, const void *value);
56 void RemoveAllValues();
57 CFMutableDictionaryRef Dictionary(bool can_create);
58
59protected:
60 // Classes that inherit from CFCMutableDictionary can see and modify these
61
62private:
63 // For CFCMutableDictionary only
64};
65
66#endif // LLDB_SOURCE_HOST_MACOSX_CFCPP_CFCMUTABLEDICTIONARY_H
bool SetValue(CFStringRef key, const void *value, bool can_create=false)
CFIndex GetCountOfKey(const void *value) const
const CFCMutableDictionary & operator=(const CFCMutableDictionary &rhs)
bool SetValueSInt64(CFStringRef key, int64_t value, bool can_create=false)
bool AddValueSInt16(CFStringRef key, int16_t value, bool can_create=false)
bool AddValue(CFStringRef key, const void *value, bool can_create=false)
bool AddValueUInt16(CFStringRef key, uint16_t value, bool can_create=false)
bool AddValueSInt8(CFStringRef key, int8_t value, bool can_create=false)
bool SetValueDouble(CFStringRef key, double value, bool can_create=false)
bool SetValueUInt64(CFStringRef key, uint64_t value, bool can_create=false)
bool AddValueDouble(CFStringRef key, double value, bool can_create=false)
bool SetValueCString(CFStringRef key, const char *cstr, bool can_create=false)
bool AddValueUInt32(CFStringRef key, uint32_t value, bool can_create=false)
void RemoveValue(const void *value)
CFCMutableDictionary(const CFCMutableDictionary &rhs)
bool SetValueSInt32(CFStringRef key, int32_t value, bool can_create=false)
void GetKeysAndValues(const void **keys, const void **values) const
const void * GetValue(const void *key) const
bool SetValueUInt8(CFStringRef key, uint8_t value, bool can_create=false)
bool AddValueUInt64(CFStringRef key, uint64_t value, bool can_create=false)
void ReplaceValue(const void *key, const void *value)
bool AddValueCString(CFStringRef key, const char *cstr, bool can_create=false)
~CFCMutableDictionary() override
CFMutableDictionaryRef Dictionary(bool can_create)
bool SetValueUInt16(CFStringRef key, uint16_t value, bool can_create=false)
CFIndex GetCountOfValue(const void *value) const
bool SetValueSInt16(CFStringRef key, int16_t value, bool can_create=false)
bool AddValueSInt64(CFStringRef key, int64_t value, bool can_create=false)
bool AddValueSInt32(CFStringRef key, int32_t value, bool can_create=false)
bool SetValueUInt32(CFStringRef key, uint32_t value, bool can_create=false)
Boolean GetValueIfPresent(const void *key, const void **value_handle) const
bool AddValueUInt8(CFStringRef key, uint8_t value, bool can_create=false)
bool SetValueSInt8(CFStringRef key, int8_t value, bool can_create=false)