LMMS
Loading...
Searching...
No Matches
juce_StringPairArray.h
Go to the documentation of this file.
1/*
2 ==============================================================================
3
4 This file is part of the JUCE library.
5 Copyright (c) 2022 - Raw Material Software Limited
6
7 JUCE is an open source library subject to commercial or open-source
8 licensing.
9
10 The code included in this file is provided under the terms of the ISC license
11 http://www.isc.org/downloads/software-support-policy/isc-license. Permission
12 To use, copy, modify, and/or distribute this software for any purpose with or
13 without fee is hereby granted provided that the above copyright notice and
14 this permission notice appear in all copies.
15
16 JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
17 EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
18 DISCLAIMED.
19
20 ==============================================================================
21*/
22
23namespace juce
24{
25
26//==============================================================================
35{
36public:
37 //==============================================================================
39 StringPairArray (bool ignoreCaseWhenComparingKeys = true);
40
42 StringPairArray (const StringPairArray& other);
43
45 ~StringPairArray() = default;
46
48 StringPairArray& operator= (const StringPairArray& other);
49
50 //==============================================================================
55 bool operator== (const StringPairArray& other) const;
56
61 bool operator!= (const StringPairArray& other) const;
62
63 //==============================================================================
75 const String& operator[] (StringRef key) const;
76
81 String getValue (StringRef, const String& defaultReturnValue) const;
82
84 bool containsKey (StringRef key) const noexcept;
85
88
91
93 inline int size() const noexcept { return keys.size(); }
94
95
96 //==============================================================================
101 void set (const String& key, const String& value);
102
106 void addArray (const StringPairArray& other);
107
108 //==============================================================================
110 void clear();
111
115 void remove (StringRef key);
116
120 void remove (int index);
121
122 //==============================================================================
125 void setIgnoresCase (bool shouldIgnoreCase);
126
129 bool getIgnoresCase() const noexcept;
130
131 //==============================================================================
135 String getDescription() const;
136
137 //==============================================================================
144 void minimiseStorageOverheads();
145
146 //==============================================================================
148 void addMap (const std::map<String, String>& mapToAdd);
149
151 void addUnorderedMap (const std::unordered_map<String, String>& mapToAdd);
152
153private:
154 //==============================================================================
155 template <typename Map>
156 void addMapImpl (const Map& mapToAdd);
157
160
162};
163
164} // namespace juce
#define noexcept
Definition DistrhoDefines.h:72
Definition juce_StringArray.h:35
Definition juce_String.h:53
Definition juce_StringPairArray.h:35
String getValue(StringRef, const String &defaultReturnValue) const
Definition juce_StringPairArray.cpp:86
bool ignoreCase
Definition juce_StringPairArray.h:159
bool containsKey(StringRef key) const noexcept
Definition juce_StringPairArray.cpp:96
StringArray keys
Definition juce_StringPairArray.h:158
StringPairArray(bool ignoreCaseWhenComparingKeys=true)
Definition juce_StringPairArray.cpp:26
const StringArray & getAllValues() const noexcept
Definition juce_StringPairArray.h:90
~StringPairArray()=default
int size() const noexcept
Definition juce_StringPairArray.h:93
const StringArray & getAllKeys() const noexcept
Definition juce_StringPairArray.h:87
StringArray values
Definition juce_StringPairArray.h:158
Definition juce_StringRef.h:62
static PuglViewHint int value
Definition pugl.h:1708
#define JUCE_LEAK_DETECTOR(OwnerClass)
Definition juce_LeakedObjectDetector.h:138
#define JUCE_API
Definition juce_StandardHeader.h:152
Definition carla_juce.cpp:31
Definition juce_Uuid.h:141
ZCONST char * key
Definition crypt.c:587
#define const
Definition zconf.h:137