OpenMS  2.5.0
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
QCBase::Status Class Reference

Storing a status of available/needed inputs (i.e. a set of Requires) as UInt64. More...

#include <OpenMS/QC/QCBase.h>

Public Member Functions

 Status ()
 Constructors. More...
 
 Status (const Requires &req)
 
 Status (const Status &stat)
 
Statusoperator= (const Requires &req)
 Assignment. More...
 
 ~Status ()=default
 Destructor (default) More...
 
bool operator== (const Status &stat) const
 
Statusoperator= (const Status &stat)=default
 
Status operator& (const Requires &req) const
 
Status operator& (const Status &stat) const
 
Statusoperator&= (const Requires &req)
 
Statusoperator&= (const Status &stat)
 
Status operator| (const Requires &req) const
 
Status operator| (const Status &stat) const
 
Statusoperator|= (const Requires &req)
 
Statusoperator|= (const Status &stat)
 
bool isSuperSetOf (const Status &stat) const
 Check if input status fulfills requirement status. More...
 

Private Member Functions

UInt64 getPow_ (const Requires &r) const
 computes pow(2, r) More...
 

Private Attributes

UInt64 value_
 

Friends

std::ostream & operator<< (std::ostream &os, const Status &stat)
 stream output for Status More...
 

Detailed Description

Storing a status of available/needed inputs (i.e. a set of Requires) as UInt64.

Conversion from a Requires enum is computed as `pow(2, r)`. Multiple Requires attributes can be computed by bitwise 'or'.

Only allows assignment and bit operations with itself and an object of type Requires, i.e. not with any numeric types.

Constructor & Destructor Documentation

◆ Status() [1/3]

Status ( )
inline

Constructors.

◆ Status() [2/3]

Status ( const Requires req)
inline

◆ Status() [3/3]

Status ( const Status stat)
inline

◆ ~Status()

~Status ( )
default

Destructor (default)

Member Function Documentation

◆ getPow_()

UInt64 getPow_ ( const Requires r) const
inlineprivate

computes pow(2, r)

◆ isSuperSetOf()

bool isSuperSetOf ( const Status stat) const
inline

Check if input status fulfills requirement status.

References QCBase::Status::value_.

◆ operator&() [1/2]

Status operator& ( const Requires req) const
inline

◆ operator&() [2/2]

Status operator& ( const Status stat) const
inline

◆ operator&=() [1/2]

Status& operator&= ( const Requires req)
inline

◆ operator&=() [2/2]

Status& operator&= ( const Status stat)
inline

◆ operator=() [1/2]

Status& operator= ( const Requires req)
inline

Assignment.

◆ operator=() [2/2]

Status& operator= ( const Status stat)
default

◆ operator==()

bool operator== ( const Status stat) const
inline

◆ operator|() [1/2]

Status operator| ( const Requires req) const
inline

◆ operator|() [2/2]

Status operator| ( const Status stat) const
inline

◆ operator|=() [1/2]

Status& operator|= ( const Requires req)
inline

◆ operator|=() [2/2]

Status& operator|= ( const Status stat)
inline

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const Status stat 
)
friend

stream output for Status

Member Data Documentation

◆ value_

UInt64 value_
private