ChimeraTK-DeviceAccess  03.18.00
ChimeraTK::AccessModeFlags Class Reference

Set of AccessMode flags with additional functionality for an easier handling. More...

#include <AccessMode.h>

Public Member Functions

 AccessModeFlags (std::set< AccessMode > flags)
 Constructor initialises from a std::set<AccessMode> More...
 
 AccessModeFlags (const std::initializer_list< AccessMode > &flags)
 Constructor initialises from a brace initialiser list (e.g. More...
 
 AccessModeFlags ()=default
 
bool has (AccessMode flag) const
 Check if a certain flag is in the set. More...
 
bool empty () const
 Check if the set is empty (i.e. More...
 
void checkForUnknownFlags (const std::set< AccessMode > &knownFlags) const
 Check of any flag which is not in the given set "knownFlags" is set. More...
 
bool operator== (const AccessModeFlags &other) const
 Check whether two sets of acces mode flags are the same. More...
 
bool operator< (const AccessModeFlags &other) const
 "Less than" operator, e.g. More...
 
void remove (AccessMode flag)
 Remove the given flag from the set. More...
 
void add (AccessMode flag)
 Add the given flag to the set. More...
 
std::string serialize () const
 Get a comma seperated list of all flag strings contained in the class. More...
 

Static Public Member Functions

static const std::string & getString (AccessMode flag)
 Get a string representation of the given flag. More...
 
static AccessModeFlags deserialize (const std::string &listOfflags)
 Get an AcessModeFlags object from a comma seperated list of flag strings. More...
 

Detailed Description

Set of AccessMode flags with additional functionality for an easier handling.

The set holds flags which are enabled for an accessor. The method has() can be used to check wheater a flag is set.

Definition at line 48 of file AccessMode.h.

Constructor & Destructor Documentation

◆ AccessModeFlags() [1/3]

ChimeraTK::AccessModeFlags::AccessModeFlags ( std::set< AccessMode flags)
explicit

Constructor initialises from a std::set<AccessMode>

Definition at line 12 of file AccessMode.cc.

◆ AccessModeFlags() [2/3]

ChimeraTK::AccessModeFlags::AccessModeFlags ( const std::initializer_list< AccessMode > &  flags)

Constructor initialises from a brace initialiser list (e.g.

"{AccessMode::raw}"). Hint: You can use the brace nitialiser list also without explicitly using the class name, when calling a function which has an argument of the type AccessModeFlags.

Definition at line 16 of file AccessMode.cc.

◆ AccessModeFlags() [3/3]

ChimeraTK::AccessModeFlags::AccessModeFlags ( )
default

Member Function Documentation

◆ add()

void ChimeraTK::AccessModeFlags::add ( AccessMode  flag)

Add the given flag to the set.

Definition at line 62 of file AccessMode.cc.

+ Here is the caller graph for this function:

◆ checkForUnknownFlags()

void ChimeraTK::AccessModeFlags::checkForUnknownFlags ( const std::set< AccessMode > &  knownFlags) const

Check of any flag which is not in the given set "knownFlags" is set.

If an unknown flag has been found, a ChimeraTK::logic_error is raised.

Definition at line 32 of file AccessMode.cc.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deserialize()

AccessModeFlags ChimeraTK::AccessModeFlags::deserialize ( const std::string &  listOfflags)
static

Get an AcessModeFlags object from a comma seperated list of flag strings.

Definition at line 87 of file AccessMode.cc.

+ Here is the caller graph for this function:

◆ empty()

bool ChimeraTK::AccessModeFlags::empty ( ) const

Check if the set is empty (i.e.

no flag has been set)

Definition at line 26 of file AccessMode.cc.

◆ getString()

const std::string & ChimeraTK::AccessModeFlags::getString ( AccessMode  flag)
static

Get a string representation of the given flag.

Definition at line 81 of file AccessMode.cc.

+ Here is the caller graph for this function:

◆ has()

bool ChimeraTK::AccessModeFlags::has ( AccessMode  flag) const

Check if a certain flag is in the set.

Definition at line 20 of file AccessMode.cc.

+ Here is the caller graph for this function:

◆ operator<()

bool ChimeraTK::AccessModeFlags::operator< ( const AccessModeFlags other) const

"Less than" operator, e.g.

for use as key in std::map

Definition at line 49 of file AccessMode.cc.

◆ operator==()

bool ChimeraTK::AccessModeFlags::operator== ( const AccessModeFlags other) const

Check whether two sets of acces mode flags are the same.

Definition at line 42 of file AccessMode.cc.

◆ remove()

void ChimeraTK::AccessModeFlags::remove ( AccessMode  flag)

Remove the given flag from the set.

Definition at line 56 of file AccessMode.cc.

+ Here is the caller graph for this function:

◆ serialize()

std::string ChimeraTK::AccessModeFlags::serialize ( ) const

Get a comma seperated list of all flag strings contained in the class.

Definition at line 68 of file AccessMode.cc.


The documentation for this class was generated from the following files: