LMMS
Loading...
Searching...
No Matches
juce_PropertySet.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//==============================================================================
39{
40public:
41 //==============================================================================
46 PropertySet (bool ignoreCaseOfKeyNames = false);
47
49 PropertySet (const PropertySet& other);
50
52 PropertySet& operator= (const PropertySet& other);
53
55 virtual ~PropertySet();
56
57 //==============================================================================
67 String getValue (StringRef keyName, const String& defaultReturnValue = String()) const noexcept;
68
78 int getIntValue (StringRef keyName, int defaultReturnValue = 0) const noexcept;
79
89 double getDoubleValue (StringRef keyName, double defaultReturnValue = 0.0) const noexcept;
90
103 bool getBoolValue (StringRef keyName, bool defaultReturnValue = false) const noexcept;
104
116 std::unique_ptr<XmlElement> getXmlValue (StringRef keyName) const;
117
118 //==============================================================================
124 void setValue (StringRef keyName, const var& value);
125
133 void setValue (StringRef keyName, const XmlElement* xml);
134
138 void addAllPropertiesFrom (const PropertySet& source);
139
140 //==============================================================================
144 void removeValue (StringRef keyName);
145
147 bool containsKey (StringRef keyName) const noexcept;
148
150 void clear();
151
152 //==============================================================================
155
158
159 //==============================================================================
164 std::unique_ptr<XmlElement> createXml (const String& nodeName) const;
165
170 void restoreFromXml (const XmlElement& xml);
171
172 //==============================================================================
185 void setFallbackPropertySet (PropertySet* fallbackProperties) noexcept;
186
191
192protected:
194 virtual void propertyChanged();
195
196private:
201
203};
204
205} // namespace juce
#define noexcept
Definition DistrhoDefines.h:72
Definition juce_CriticalSection.h:43
Definition juce_PropertySet.h:39
StringPairArray & getAllProperties() noexcept
Definition juce_PropertySet.h:154
StringPairArray properties
Definition juce_PropertySet.h:197
const CriticalSection & getLock() const noexcept
Definition juce_PropertySet.h:157
PropertySet * fallbackProperties
Definition juce_PropertySet.h:198
bool ignoreCaseOfKeys
Definition juce_PropertySet.h:200
void clear()
Definition juce_PropertySet.cpp:54
void addAllPropertiesFrom(const PropertySet &source)
Definition juce_PropertySet.cpp:163
PropertySet(bool ignoreCaseOfKeyNames=false)
Definition juce_PropertySet.cpp:26
CriticalSection lock
Definition juce_PropertySet.h:199
String getValue(StringRef keyName, const String &defaultReturnValue=String()) const noexcept
Definition juce_PropertySet.cpp:65
void setValue(StringRef keyName, const var &value)
Definition juce_PropertySet.cpp:118
double getDoubleValue(StringRef keyName, double defaultReturnValue=0.0) const noexcept
Definition juce_PropertySet.cpp:89
bool containsKey(StringRef keyName) const noexcept
Definition juce_PropertySet.cpp:157
PropertySet * getFallbackPropertySet() const noexcept
Definition juce_PropertySet.h:190
void removeValue(StringRef keyName)
Definition juce_PropertySet.cpp:136
int getIntValue(StringRef keyName, int defaultReturnValue=0) const noexcept
Definition juce_PropertySet.cpp:77
bool getBoolValue(StringRef keyName, bool defaultReturnValue=false) const noexcept
Definition juce_PropertySet.cpp:101
std::unique_ptr< XmlElement > getXmlValue(StringRef keyName) const
Definition juce_PropertySet.cpp:113
Definition juce_String.h:53
Definition juce_StringPairArray.h:35
Definition juce_StringRef.h:62
Definition juce_XmlElement.h:83
Definition juce_Variant.h:42
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
#define const
Definition zconf.h:137