1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-14 00:14:18 +00:00

BLOCKS API: Added some comparison operators to the Block class

This commit is contained in:
jules 2017-11-28 08:44:24 +00:00
parent 7d30c30819
commit fd3b790087

View file

@ -34,7 +34,6 @@ public:
virtual ~Block();
/** The different block types.
@see Block::getType()
*/
enum Type
@ -70,14 +69,18 @@ public:
using UID = uint64;
/** This Block's UID.
This will be globally unique, and remains constant for a particular device.
*/
const UID uid;
//==============================================================================
/** Returns the type of this device.
/** Two blocks are considered equal if they have the same UID. */
bool operator== (const Block& other) const noexcept { return uid == other.uid; }
/** Two blocks are considered equal if they have the same UID. */
bool operator!= (const Block& other) const noexcept { return uid != other.uid; }
//==============================================================================
/** Returns the type of this device.
@see Block::Type
*/
virtual Type getType() const = 0;
@ -314,6 +317,7 @@ public:
for (int i = 0; i < numOptionNames; ++i)
optionNames[i] = other.optionNames[i];
}
return *this;
}