LifeV
LifeV::Flag Namespace Reference

flag related free functions and functors More...

FlagFunctions

They implement basic operations on boolean flags

bool testAllSet (flag_Type const &inputFlag, flag_Type const &refFlag)
 It returns true if all bit-flags common set in refFlag are also set in inputFlag. More...
 
bool testOneSet (flag_Type const &inputFlag, flag_Type const &refFlag)
 returns true if at least one flag set in refFlag is set in inputFlag More...
 
bool testOneNotSet (flag_Type const &inputFlag, flag_Type const &refFlag)
 returns false if at least one flag set in refFlag is set in inputFlag More...
 
flag_Type turnOn (flag_Type const &inputFlag, flag_Type const &refFlag)
 turns on the refFlag active bits in inputFlag More...
 
flag_Type turnOff (flag_Type const &inputFlag, flag_Type const &refFlag)
 turns off the refFlag active bits in inputFlag More...
 
flag_Type change (flag_Type const &inputFlag, flag_Type const &refFlag)
 switches the refFlag active bits in inputFlag More...
 
flag_Type replaceFlag (flag_Type const &, flag_Type const &refFlag)
 replaces the given flag with the reference one. More...
 
void showMe (flag_Type const &flag, std::ostream &out=std::cout)
 showMe method to print out flag status the flag is converted to its binary form ( right -> left corresponds to first -> last flag ) More...
 

Detailed Description

flag related free functions and functors

Function Documentation

◆ testAllSet()

bool LifeV::Flag::testAllSet ( flag_Type const &  inputFlag,
flag_Type const &  refFlag 
)
inline

It returns true if all bit-flags common set in refFlag are also set in inputFlag.

Definition at line 210 of file LifeV.hpp.

◆ testOneSet()

bool LifeV::Flag::testOneSet ( flag_Type const &  inputFlag,
flag_Type const &  refFlag 
)
inline

returns true if at least one flag set in refFlag is set in inputFlag

Definition at line 216 of file LifeV.hpp.

+ Here is the caller graph for this function:

◆ testOneNotSet()

bool LifeV::Flag::testOneNotSet ( flag_Type const &  inputFlag,
flag_Type const &  refFlag 
)
inline

returns false if at least one flag set in refFlag is set in inputFlag

Definition at line 222 of file LifeV.hpp.

+ Here is the caller graph for this function:

◆ turnOn()

flag_Type LifeV::Flag::turnOn ( flag_Type const &  inputFlag,
flag_Type const &  refFlag 
)
inline

turns on the refFlag active bits in inputFlag

Definition at line 228 of file LifeV.hpp.

+ Here is the caller graph for this function:

◆ turnOff()

flag_Type LifeV::Flag::turnOff ( flag_Type const &  inputFlag,
flag_Type const &  refFlag 
)
inline

turns off the refFlag active bits in inputFlag

Definition at line 234 of file LifeV.hpp.

+ Here is the caller graph for this function:

◆ change()

flag_Type LifeV::Flag::change ( flag_Type const &  inputFlag,
flag_Type const &  refFlag 
)
inline

switches the refFlag active bits in inputFlag

Definition at line 240 of file LifeV.hpp.

◆ replaceFlag()

flag_Type LifeV::Flag::replaceFlag ( flag_Type const &  ,
flag_Type const &  refFlag 
)
inline

replaces the given flag with the reference one.

This method is introduced with the same signature of the other methods in order to be used as a policy

Definition at line 247 of file LifeV.hpp.

◆ showMe()

void showMe ( flag_Type const &  flag,
std::ostream &  out = std::cout 
)

showMe method to print out flag status the flag is converted to its binary form ( right -> left corresponds to first -> last flag )

Definition at line 40 of file LifeV.cpp.

+ Here is the caller graph for this function: