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 
14 class CFCMutableDictionary : public CFCReleaser<CFMutableDictionaryRef> {
15 public:
16  // Constructors and Destructors
17  CFCMutableDictionary(CFMutableDictionaryRef s = NULL);
19  virtual ~CFCMutableDictionary();
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 
59 protected:
60  // Classes that inherit from CFCMutableDictionary can see and modify these
61 
62 private:
63  // For CFCMutableDictionary only
64 };
65 
66 #endif // LLDB_SOURCE_HOST_MACOSX_CFCPP_CFCMUTABLEDICTIONARY_H
CFCMutableDictionary::GetCountOfKey
CFIndex GetCountOfKey(const void *value) const
Definition: CFCMutableDictionary.cpp:37
CFCMutableDictionary::RemoveValue
void RemoveValue(const void *value)
Definition: CFCMutableDictionary.cpp:447
CFCMutableDictionary::AddValueDouble
bool AddValueDouble(CFStringRef key, double value, bool can_create=false)
Definition: CFCMutableDictionary.cpp:377
CFCMutableDictionary::AddValueUInt16
bool AddValueUInt16(CFStringRef key, uint16_t value, bool can_create=false)
Definition: CFCMutableDictionary.cpp:269
CFCMutableDictionary::AddValueCString
bool AddValueCString(CFStringRef key, const char *cstr, bool can_create=false)
Definition: CFCMutableDictionary.cpp:413
CFCMutableDictionary::~CFCMutableDictionary
virtual ~CFCMutableDictionary()
Definition: CFCMutableDictionary.cpp:28
CFCMutableDictionary::SetValue
bool SetValue(CFStringRef key, const void *value, bool can_create=false)
Definition: CFCMutableDictionary.cpp:102
CFCMutableDictionary::SetValueUInt32
bool SetValueUInt32(CFStringRef key, uint32_t value, bool can_create=false)
Definition: CFCMutableDictionary.cpp:323
CFCMutableDictionary::GetKeysAndValues
void GetKeysAndValues(const void **keys, const void **values) const
Definition: CFCMutableDictionary.cpp:55
CFCMutableDictionary::SetValueSInt16
bool SetValueSInt16(CFStringRef key, int16_t value, bool can_create=false)
Definition: CFCMutableDictionary.cpp:158
CFCMutableDictionary::SetValueSInt64
bool SetValueSInt64(CFStringRef key, int64_t value, bool can_create=false)
Definition: CFCMutableDictionary.cpp:218
CFCReleaser
CFCMutableDictionary::AddValueSInt8
bool AddValueSInt8(CFStringRef key, int8_t value, bool can_create=false)
Definition: CFCMutableDictionary.cpp:113
CFCMutableDictionary::AddValue
bool AddValue(CFStringRef key, const void *value, bool can_create=false)
Definition: CFCMutableDictionary.cpp:91
CFCReleaser.h
CFCMutableDictionary::GetCount
CFIndex GetCount() const
Definition: CFCMutableDictionary.cpp:30
CFCMutableDictionary::operator=
const CFCMutableDictionary & operator=(const CFCMutableDictionary &rhs)
Definition: CFCMutableDictionary.cpp:21
CFCMutableDictionary::ReplaceValue
void ReplaceValue(const void *key, const void *value)
Definition: CFCMutableDictionary.cpp:452
CFCMutableDictionary::SetValueDouble
bool SetValueDouble(CFStringRef key, double value, bool can_create=false)
Definition: CFCMutableDictionary.cpp:395
CFCMutableDictionary::SetValueUInt64
bool SetValueUInt64(CFStringRef key, uint64_t value, bool can_create=false)
Definition: CFCMutableDictionary.cpp:359
CFCMutableDictionary::AddValueUInt32
bool AddValueUInt32(CFStringRef key, uint32_t value, bool can_create=false)
Definition: CFCMutableDictionary.cpp:305
CFCMutableDictionary::GetValueIfPresent
Boolean GetValueIfPresent(const void *key, const void **value_handle) const
Definition: CFCMutableDictionary.cpp:72
CFCMutableDictionary::SetValueUInt8
bool SetValueUInt8(CFStringRef key, uint8_t value, bool can_create=false)
Definition: CFCMutableDictionary.cpp:251
CFCMutableDictionary::GetCountOfValue
CFIndex GetCountOfValue(const void *value) const
Definition: CFCMutableDictionary.cpp:46
CFCMutableDictionary::GetValue
const void * GetValue(const void *key) const
Definition: CFCMutableDictionary.cpp:62
CFCMutableDictionary::SetValueSInt32
bool SetValueSInt32(CFStringRef key, int32_t value, bool can_create=false)
Definition: CFCMutableDictionary.cpp:188
uint32_t
CFCMutableDictionary::SetValueCString
bool SetValueCString(CFStringRef key, const char *cstr, bool can_create=false)
Definition: CFCMutableDictionary.cpp:427
CFCMutableDictionary::Dictionary
CFMutableDictionaryRef Dictionary(bool can_create)
Definition: CFCMutableDictionary.cpp:80
CFCMutableDictionary::AddValueUInt8
bool AddValueUInt8(CFStringRef key, uint8_t value, bool can_create=false)
Definition: CFCMutableDictionary.cpp:233
uint16_t
CFCMutableDictionary::SetValueSInt8
bool SetValueSInt8(CFStringRef key, int8_t value, bool can_create=false)
Definition: CFCMutableDictionary.cpp:128
CFCMutableDictionary::CFCMutableDictionary
CFCMutableDictionary(CFMutableDictionaryRef s=NULL)
Definition: CFCMutableDictionary.cpp:12
CFCMutableDictionary::AddValueSInt64
bool AddValueSInt64(CFStringRef key, int64_t value, bool can_create=false)
Definition: CFCMutableDictionary.cpp:203
CFCMutableDictionary::AddValueUInt64
bool AddValueUInt64(CFStringRef key, uint64_t value, bool can_create=false)
Definition: CFCMutableDictionary.cpp:341
CFCMutableDictionary::SetValueUInt16
bool SetValueUInt16(CFStringRef key, uint16_t value, bool can_create=false)
Definition: CFCMutableDictionary.cpp:287
CFCMutableDictionary::AddValueSInt32
bool AddValueSInt32(CFStringRef key, int32_t value, bool can_create=false)
Definition: CFCMutableDictionary.cpp:173
CFCMutableDictionary
Definition: CFCMutableDictionary.h:14
CFCMutableDictionary::AddValueSInt16
bool AddValueSInt16(CFStringRef key, int16_t value, bool can_create=false)
Definition: CFCMutableDictionary.cpp:143
CFCMutableDictionary::RemoveAllValues
void RemoveAllValues()
Definition: CFCMutableDictionary.cpp:441