|
LMMS
|
#include <juce_NamedValueSet.h>
Classes | |
| struct | NamedValue |
Private Attributes | |
| Array< NamedValue > | values |
Holds a set of named var objects.
This can be used as a basic structure to hold a set of var object, which can be retrieved by using their identifier.
@tags{Core}
|
noexcept |
Creates an empty set.
| juce::NamedValueSet::NamedValueSet | ( | const NamedValueSet & | other | ) |
|
noexcept |
| juce::NamedValueSet::NamedValueSet | ( | std::initializer_list< NamedValue > | list | ) |
Creates a NamedValueSet from a list of names and properties.
|
noexcept |
Destructor.
|
inlinenoexcept |
| void juce::NamedValueSet::clear | ( | ) |
Removes all values.
|
noexcept |
Returns true if the set contains an item with the specified name.
| void juce::NamedValueSet::copyToXmlAttributes | ( | XmlElement & | xml | ) | const |
Sets attributes in an XML element corresponding to each of this object's properties.
|
inlinenoexcept |
|
noexcept |
Returns the name of the value at a given index. The index must be between 0 and size() - 1.
Returns the value of the item at a given index. The index must be between 0 and size() - 1.
|
noexcept |
Returns a pointer to the var that holds a named value, or null if there is no value with this name.
Do not use this method unless you really need access to the internal var object for some reason - for normal reading and writing always prefer operator[]() and set(). Also note that the pointer returned may become invalid as soon as any subsequent methods are called on the NamedValueSet.
|
noexcept |
Returns a pointer to the var that holds a named value, or null if there is no value with this name.
Do not use this method unless you really need access to the internal var object for some reason - for normal reading and writing always prefer operator[]() and set(). Also note that the pointer returned may become invalid as soon as any subsequent methods are called on the NamedValueSet.
Returns the value of the item at a given index. The index must be between 0 and size() - 1, or this will return a nullptr Also note that the pointer returned may become invalid as soon as any subsequent methods are called on the NamedValueSet.
Returns the value of the item at a given index. The index must be between 0 and size() - 1, or this will return a nullptr Also note that the pointer returned may become invalid as soon as any subsequent methods are called on the NamedValueSet.
| var juce::NamedValueSet::getWithDefault | ( | const Identifier & | name, |
| const var & | defaultReturnValue ) const |
Tries to return the named value, but if no such value is found, this will instead return the supplied default value.
|
noexcept |
Returns the index of the given name, or -1 if it's not found.
|
noexcept |
Returns true if the set is empty.
|
noexcept |
| NamedValueSet & juce::NamedValueSet::operator= | ( | const NamedValueSet & | other | ) |
|
noexcept |
|
noexcept |
Two NamedValueSets are considered equal if they contain all the same key/value pairs, regardless of the order.
|
noexcept |
Returns the value of a named item. If the name isn't found, this will return a void variant.
| bool juce::NamedValueSet::remove | ( | const Identifier & | name | ) |
Removes a value from the set.
| bool juce::NamedValueSet::set | ( | const Identifier & | name, |
| const var & | newValue ) |
Changes or adds a named value.
| bool juce::NamedValueSet::set | ( | const Identifier & | name, |
| var && | newValue ) |
Changes or adds a named value.
| void juce::NamedValueSet::setFromXmlAttributes | ( | const XmlElement & | xml | ) |
Sets properties to the values of all of an XML element's attributes.
|
noexcept |
Returns the total number of values that the set contains.
|
private |