ThePEG is hosted by Hepforge, IPPP Durham
ThePEG  2.1.4
ThePEG::HoldFlag< bool > Class Template Reference

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. More...
 
 HoldFlag (bool &newFlag, bool holdFlag, bool finalFlag)
 Constructor setting the a temporary value for the bool variable. More...
 
 ~HoldFlag ()
 Destructor. More...
 

Private Member Functions

 HoldFlag ()
 Default constructor is private and not implemented.
 
 HoldFlag (const HoldFlag &)
 Copy constructor is private and not implemented.
 
HoldFlagoperator= (const HoldFlag &)
 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.
 

Detailed Description

template<>
class ThePEG::HoldFlag< bool >

Specialization of HoldFlag for boolean variables.

Definition at line 88 of file HoldFlag.h.

Constructor & Destructor Documentation

◆ HoldFlag() [1/2]

ThePEG::HoldFlag< bool >::HoldFlag ( bool &  newFlag,
bool  holdFlag = true 
)
inline

Constructor setting the a temporary value for the bool variable.

Parameters
newFlagthe boolean variable which value is temporarily changed.
holdFlagthe temporary value for the newFlag variable.

Definition at line 97 of file HoldFlag.h.

References ThePEG::HoldFlag< T >::theFlag.

◆ HoldFlag() [2/2]

ThePEG::HoldFlag< bool >::HoldFlag ( bool &  newFlag,
bool  holdFlag,
bool  finalFlag 
)
inline

Constructor setting the a temporary value for the bool variable.

Parameters
newFlagthe boolean variable which value is temporarily changed.
holdFlagthe temporary value for the newFlag variable.
finalFlagthe 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.

◆ ~HoldFlag()

ThePEG::HoldFlag< bool >::~HoldFlag ( )
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.


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