35 #ifndef OPENMS_CONCEPT_UNIQUEIDINTERFACE_H    36 #define OPENMS_CONCEPT_UNIQUEIDINTERFACE_H    72       return unique_id != INVALID;
    77       unique_id_(
UInt64(INVALID))
    84       unique_id_(rhs.unique_id_)
   119       if (hasValidUniqueId())
   139       return isValid(unique_id_);
   146       return !isValid(unique_id_);
   161       if (!hasValidUniqueId())
   185     setUniqueId(
const String & rhs);
   195 #endif // OPENMS_CONCEPT_UNIQUEIDINTERFACE_H A more convenient string class. 
Definition: String.h:57
 
Size setUniqueId()
Assigns a new, valid unique id. Always returns 1. 
Definition: UniqueIdInterface.h:151
 
UniqueIdInterface()
Default constructor - the unique id will be invalid 
Definition: UniqueIdInterface.h:76
 
Main OpenMS namespace. 
Definition: FeatureDeconvolution.h:47
 
Size clearUniqueId()
Clear the unique id. The new unique id will be invalid. Returns 1 if the unique id was changed...
Definition: UniqueIdInterface.h:117
 
Size hasInvalidUniqueId() const
Returns whether the unique id is invalid. Returns 1 if the unique id is invalid, 0 otherwise...
Definition: UniqueIdInterface.h:144
 
static bool isValid(UInt64 unique_id)
Returns true if the unique_id is valid, false otherwise. 
Definition: UniqueIdInterface.h:70
 
void setUniqueId(UInt64 rhs)
Assigns the given unique id. 
Definition: UniqueIdInterface.h:172
 
static UInt64 getUniqueId()
Returns a new unique id. 
 
OPENMS_UINT64_TYPE UInt64
Unsigned integer type (64bit) 
Definition: Types.h:78
 
UniqueIdInterface(const UniqueIdInterface &rhs)
Copy constructor - copies the unique id. 
Definition: UniqueIdInterface.h:83
 
A base class defining a common interface for all classes having a unique id. 
Definition: UniqueIdInterface.h:52
 
bool operator==(UniqueIdInterface const &rhs) const
Equality comparison operator - the unique ids must be equal (!) 
Definition: UniqueIdInterface.h:103
 
size_t Size
Size type e.g. used as variable which can hold result of size() 
Definition: Types.h:128
 
UInt64 unique_id_
the unique id 
Definition: UniqueIdInterface.h:189
 
virtual ~UniqueIdInterface()
Destructor. 
Definition: UniqueIdInterface.h:97
 
void swap(UniqueIdInterface &from)
Definition: UniqueIdInterface.h:129
 
UniqueIdInterface & operator=(UniqueIdInterface const &rhs)
Assignment operator - copies the unique id. 
Definition: UniqueIdInterface.h:90
 
Size hasValidUniqueId() const
Returns whether the unique id is valid. Returns 1 if the unique id is valid, 0 otherwise. 
Definition: UniqueIdInterface.h:137
 
UInt64 getUniqueId() const
Non-mutable access to unique id - returns the unique id. 
Definition: UniqueIdInterface.h:110
 
Size ensureUniqueId()
Assigns a valid unique id, but only if the present one is invalid. Returns 1 if the unique id was cha...
Definition: UniqueIdInterface.h:159