ThePEG 2.3.0
|
Specialization of HoldFlag for boolean variables. More...
#include <HoldFlag.h>
Public Member Functions | |
HoldFlag (bool &newFlag, bool holdFlag=true) | |
Constructor setting the a temporary value for the bool variable. | |
HoldFlag (bool &newFlag, bool holdFlag, bool finalFlag) | |
Constructor setting the a temporary value for the bool variable. | |
~HoldFlag () | |
Destructor. | |
Private Member Functions | |
HoldFlag () | |
Default constructor is private and not implemented. | |
HoldFlag (const HoldFlag &) | |
Copy constructor is private and not implemented. | |
HoldFlag & | operator= (const HoldFlag &)=delete |
Assignment is private and not implemented. | |
Private Attributes | |
bool & | theFlag |
The variable to be changed. | |
bool | oldFlag |
The value which will be restored when this is destroyed. | |
Specialization of HoldFlag for boolean variables.
Definition at line 88 of file HoldFlag.h.
|
inline |
Constructor setting the a temporary value for the bool variable.
newFlag | the boolean variable which value is temporarily changed. |
holdFlag | the temporary value for the newFlag variable. |
Definition at line 97 of file HoldFlag.h.
References ThePEG::HoldFlag< T >::theFlag.
|
inline |
Constructor setting the a temporary value for the bool variable.
newFlag | the boolean variable which value is temporarily changed. |
holdFlag | the temporary value for the newFlag variable. |
finalFlag | the newFlag variable will be given the value finalFlag when the HoldFlag object is destroyed. |
Definition at line 107 of file HoldFlag.h.
References ThePEG::HoldFlag< T >::theFlag.
|
inline |
Destructor.
Restores the corresponding variable to its original value.
Definition at line 114 of file HoldFlag.h.
References ThePEG::HoldFlag< T >::oldFlag, and ThePEG::HoldFlag< T >::theFlag.
|
private |
The value which will be restored when this is destroyed.
Definition at line 126 of file HoldFlag.h.
|
private |
The variable to be changed.
Definition at line 121 of file HoldFlag.h.