34 std::move (other.value))
43 :
name (std::move (
n)),
49 name = std::move (other.name);
50 value = std::move (other.value);
54bool NamedValueSet::NamedValue::operator== (
const NamedValue& other)
const noexcept {
return name == other.name &&
value == other.value; }
55bool NamedValueSet::NamedValue::operator!= (
const NamedValue& other)
const noexcept {
return ! operator== (other); }
64 :
values (std::move (other.values)) {}
80 other.values.swapWith (
values);
89bool NamedValueSet::operator== (
const NamedValueSet& other)
const noexcept
93 if (num != other.values.size())
96 for (
int i = 0;
i < num; ++
i)
99 if (
values.getReference(
i).name == other.values.getReference(
i).name)
101 if (
values.getReference(
i).value != other.values.getReference(
i).value)
107 for (
int j =
i;
j < num; ++
j)
109 if (
auto* otherVal = other.getVarPointer (
values.getReference(
j).name))
110 if (
values.getReference(
j).value == *otherVal)
123bool NamedValueSet::operator!= (
const NamedValueSet& other)
const noexcept {
return ! operator== (other); }
147 return defaultReturnValue;
172 if (
v->equalsWithSameType (newValue))
175 *
v = std::move (newValue);
187 if (
v->equalsWithSameType (newValue))
205 auto numValues =
values.size();
207 for (
int i = 0;
i < numValues; ++
i)
216 auto numValues =
values.size();
218 for (
int i = 0;
i < numValues; ++
i)
233 return values.getReference (index).name;
242 return values.getReference (index).value;
268 for (
auto* att = xml.
attributes.get(); att !=
nullptr; att = att->nextListItem)
270 if (att->name.toString().startsWith (
"base64:"))
276 values.add ({ att->name.toString().substring (7),
var (mb) });
281 values.add ({ att->name,
var (att->value) });
289 if (
auto* mb =
i.value.getBinaryData())
291 xml.
setAttribute (
"base64:" +
i.name.toString(), mb->toBase64Encoding());
#define noexcept
Definition DistrhoDefines.h:72
Definition juce_Identifier.h:39
Definition juce_MemoryBlock.h:33
bool fromBase64Encoding(StringRef encodedString)
Definition juce_MemoryBlock.cpp:382
var * getVarPointerAt(int index) noexcept
Definition juce_NamedValueSet.cpp:248
bool set(const Identifier &name, const var &newValue)
Definition juce_NamedValueSet.cpp:183
bool contains(const Identifier &name) const noexcept
Definition juce_NamedValueSet.cpp:198
bool remove(const Identifier &name)
Definition juce_NamedValueSet.cpp:214
int indexOf(const Identifier &name) const noexcept
Definition juce_NamedValueSet.cpp:203
const var & getValueAt(int index) const noexcept
Definition juce_NamedValueSet.cpp:239
void clear()
Definition juce_NamedValueSet.cpp:84
bool isEmpty() const noexcept
Definition juce_NamedValueSet.cpp:126
NamedValueSet() noexcept
Definition juce_NamedValueSet.cpp:58
~NamedValueSet() noexcept
Definition juce_NamedValueSet.cpp:59
Identifier getName(int index) const noexcept
Definition juce_NamedValueSet.cpp:230
var getWithDefault(const Identifier &name, const var &defaultReturnValue) const
Definition juce_NamedValueSet.cpp:142
int size() const noexcept
Definition juce_NamedValueSet.cpp:125
var * getVarPointer(const Identifier &name) noexcept
Definition juce_NamedValueSet.cpp:150
Array< NamedValue > values
Definition juce_NamedValueSet.h:182
void copyToXmlAttributes(XmlElement &xml) const
Definition juce_NamedValueSet.cpp:285
void setFromXmlAttributes(const XmlElement &xml)
Definition juce_NamedValueSet.cpp:264
Definition juce_XmlElement.h:83
LinkedListPointer< XmlAttributeNode > attributes
Definition juce_XmlElement.h:783
void setAttribute(const Identifier &attributeName, const String &newValue)
Definition juce_XmlElement.cpp:615
Definition juce_Variant.h:42
register unsigned j
Definition inflate.c:1576
unsigned v[N_MAX]
Definition inflate.c:1584
register unsigned i
Definition inflate.c:1575
static PuglViewHint int value
Definition pugl.h:1708
static const char * name
Definition pugl.h:1582
Definition carla_juce.cpp:31
static const var & getNullVarRef() noexcept
Definition juce_NamedValueSet.cpp:128
bool isPositiveAndBelow(Type1 valueToTest, Type2 upperLimit) noexcept
Definition juce_MathsFunctions.h:279
@ list
Definition juce_AccessibilityRole.h:56
Definition juce_Uuid.h:141
Definition juce_NamedValueSet.h:40
var value
Definition juce_NamedValueSet.h:56
Identifier name
Definition juce_NamedValueSet.h:55
NamedValue() noexcept
Definition juce_NamedValueSet.cpp:26
~NamedValue() noexcept
Definition juce_NamedValueSet.cpp:27
int n
Definition crypt.c:458
#define const
Definition zconf.h:137