44 return unique_id != INVALID;
49 unique_id_(
UInt64(INVALID))
87 if (hasValidUniqueId())
107 return isValid(unique_id_);
114 return !isValid(unique_id_);
A more convenient string class.
Definition: String.h:34
A base class defining a common interface for all classes having a unique id.
Definition: UniqueIdInterface.h:25
UniqueIdInterface()
Default constructor - the unique id will be invalid
Definition: UniqueIdInterface.h:48
Size ensureUniqueId()
Assigns a valid unique id, but only if the present one is invalid. Returns 1 if the unique id was cha...
UInt64 unique_id_
the unique id
Definition: UniqueIdInterface.h:144
UniqueIdInterface & operator=(UniqueIdInterface &&) &=default
Move Assignment operator - copies the unique id.
void setUniqueId(UInt64 rhs)
Assigns the given unique id.
Definition: UniqueIdInterface.h:127
UniqueIdInterface(UniqueIdInterface &&rhs)=default
Move constructor.
Size hasValidUniqueId() const
Returns whether the unique id is valid. Returns 1 if the unique id is valid, 0 otherwise.
Definition: UniqueIdInterface.h:105
UInt64 getUniqueId() const
Non-mutable access to unique id - returns the unique id.
Definition: UniqueIdInterface.h:78
Size hasInvalidUniqueId() const
Returns whether the unique id is invalid. Returns 1 if the unique id is invalid, 0 otherwise.
Definition: UniqueIdInterface.h:112
void setUniqueId(const String &rhs)
Mutable access to unique id.
virtual ~UniqueIdInterface()=default
Destructor.
static bool isValid(UInt64 unique_id)
Returns true if the unique_id is valid, false otherwise.
Definition: UniqueIdInterface.h:42
UniqueIdInterface(const UniqueIdInterface &rhs)=default
Copy constructor - copies the unique id.
void swap(UniqueIdInterface &from)
Definition: UniqueIdInterface.h:97
Size setUniqueId()
Assigns a new, valid unique id. Always returns 1.
Size clearUniqueId()
Clear the unique id. The new unique id will be invalid. Returns 1 if the unique id was changed,...
Definition: UniqueIdInterface.h:85
bool operator==(UniqueIdInterface const &rhs) const
Equality comparison operator - the unique ids must be equal (!)
Definition: UniqueIdInterface.h:71
UniqueIdInterface & operator=(UniqueIdInterface const &rhs)=default
Assignment operator - copies the unique id.
uint64_t UInt64
Unsigned integer type (64bit)
Definition: Types.h:47
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:97
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19