|
|
@@ -34,23 +34,6 @@ namespace juce |
|
|
class JUCE_API NamedValueSet
|
|
|
class JUCE_API NamedValueSet
|
|
|
{
|
|
|
{
|
|
|
public:
|
|
|
public:
|
|
|
/** Creates an empty set. */
|
|
|
|
|
|
NamedValueSet() noexcept;
|
|
|
|
|
|
|
|
|
|
|
|
NamedValueSet (const NamedValueSet&);
|
|
|
|
|
|
NamedValueSet (NamedValueSet&&) noexcept;
|
|
|
|
|
|
NamedValueSet& operator= (const NamedValueSet&);
|
|
|
|
|
|
NamedValueSet& operator= (NamedValueSet&&) noexcept;
|
|
|
|
|
|
|
|
|
|
|
|
/** Destructor. */
|
|
|
|
|
|
~NamedValueSet() noexcept;
|
|
|
|
|
|
|
|
|
|
|
|
/** Two NamedValueSets are considered equal if they contain all the same key/value
|
|
|
|
|
|
pairs, regardless of the order.
|
|
|
|
|
|
*/
|
|
|
|
|
|
bool operator== (const NamedValueSet&) const noexcept;
|
|
|
|
|
|
bool operator!= (const NamedValueSet&) const noexcept;
|
|
|
|
|
|
|
|
|
|
|
|
//==============================================================================
|
|
|
//==============================================================================
|
|
|
/** Structure for a named var object */
|
|
|
/** Structure for a named var object */
|
|
|
struct JUCE_API NamedValue
|
|
|
struct JUCE_API NamedValue
|
|
|
@@ -73,6 +56,27 @@ public: |
|
|
var value;
|
|
|
var value;
|
|
|
};
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
//==============================================================================
|
|
|
|
|
|
/** Creates an empty set. */
|
|
|
|
|
|
NamedValueSet() noexcept;
|
|
|
|
|
|
|
|
|
|
|
|
NamedValueSet (const NamedValueSet&);
|
|
|
|
|
|
NamedValueSet (NamedValueSet&&) noexcept;
|
|
|
|
|
|
NamedValueSet& operator= (const NamedValueSet&);
|
|
|
|
|
|
NamedValueSet& operator= (NamedValueSet&&) noexcept;
|
|
|
|
|
|
|
|
|
|
|
|
/** Creates a NamedValueSet from a list of names and properties. */
|
|
|
|
|
|
NamedValueSet (std::initializer_list<NamedValue>);
|
|
|
|
|
|
|
|
|
|
|
|
/** Destructor. */
|
|
|
|
|
|
~NamedValueSet() noexcept;
|
|
|
|
|
|
|
|
|
|
|
|
/** Two NamedValueSets are considered equal if they contain all the same key/value
|
|
|
|
|
|
pairs, regardless of the order.
|
|
|
|
|
|
*/
|
|
|
|
|
|
bool operator== (const NamedValueSet&) const noexcept;
|
|
|
|
|
|
bool operator!= (const NamedValueSet&) const noexcept;
|
|
|
|
|
|
|
|
|
const NamedValueSet::NamedValue* begin() const noexcept { return values.begin(); }
|
|
|
const NamedValueSet::NamedValue* begin() const noexcept { return values.begin(); }
|
|
|
const NamedValueSet::NamedValue* end() const noexcept { return values.end(); }
|
|
|
const NamedValueSet::NamedValue* end() const noexcept { return values.end(); }
|
|
|
|
|
|
|
|
|
@@ -125,6 +129,8 @@ public: |
|
|
|
|
|
|
|
|
Do not use this method unless you really need access to the internal var object
|
|
|
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().
|
|
|
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.
|
|
|
*/
|
|
|
*/
|
|
|
var* getVarPointer (const Identifier& name) const noexcept;
|
|
|
var* getVarPointer (const Identifier& name) const noexcept;
|
|
|
|
|
|
|
|
|
@@ -135,6 +141,8 @@ public: |
|
|
|
|
|
|
|
|
/** Returns the value of the item at a given index.
|
|
|
/** 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
|
|
|
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* getVarPointerAt (int index) const noexcept;
|
|
|
var* getVarPointerAt (int index) const noexcept;
|
|
|
|
|
|
|
|
|
|