| @@ -34,7 +34,6 @@ public: | |||||
| virtual ~Block(); | virtual ~Block(); | ||||
| /** The different block types. | /** The different block types. | ||||
| @see Block::getType() | @see Block::getType() | ||||
| */ | */ | ||||
| enum Type | enum Type | ||||
| @@ -70,14 +69,18 @@ public: | |||||
| using UID = uint64; | using UID = uint64; | ||||
| /** This Block's UID. | /** This Block's UID. | ||||
| This will be globally unique, and remains constant for a particular device. | This will be globally unique, and remains constant for a particular device. | ||||
| */ | */ | ||||
| const UID uid; | 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 | @see Block::Type | ||||
| */ | */ | ||||
| virtual Type getType() const = 0; | virtual Type getType() const = 0; | ||||
| @@ -314,6 +317,7 @@ public: | |||||
| for (int i = 0; i < numOptionNames; ++i) | for (int i = 0; i < numOptionNames; ++i) | ||||
| optionNames[i] = other.optionNames[i]; | optionNames[i] = other.optionNames[i]; | ||||
| } | } | ||||
| return *this; | return *this; | ||||
| } | } | ||||