Wrapper class for initially unset data. More...
#include "utl/Validated.h"
Public Member Functions | |
T & | Get () |
const T & | Get () const |
bool | IsValid () const |
Validated & | operator= (const T &value) |
void | Set (const T &value) |
void | SetValid (const bool valid=true) |
Validated () | |
Validated (const T &value) | |
Private Attributes | |
bool | fIsValid = false |
T | fValue |
Wrapper class for initially unset data.
This class is intended as a replacement of lazy evaluation through pointers, i.e. when zero value of a pointer to some field indicates that this field has not been initialized yet. Previously, it was usualy done in the following way:
This can now be replaced with more elegant construct which does not trash the heap allocator with small memory chunks:
Definition at line 17 of file ResponseMap.h.
|
inline |
Definition at line 58 of file Validated.h.
|
inline |
Definition at line 60 of file Validated.h.
|
inline |
Definition at line 68 of file Validated.h.
Referenced by rdet::AntennaType::BufferAntennaPattern(), rdet::AntennaType::GetAntennaData(), sdet::Station::GetAxes(), rdet::Channel::GetChannelData(), cdet::Station::GetCommissionTimeRange(), rdet::Station::GetCommissionTimeRange(), sdet::Station::GetCommissionTimeRange(), mdet::PMT::GetCrossTalkNormalizationFactor(), cdet::Station::GetDeadTime(), sdet::Station::GetFADCBinSize(), sdet::Station::GetFADCTraceLength(), sdet::Station::GetGroupId(), sdet::Station::GetHeight(), sdet::Station::GetLatchBin(), sdet::Station::GetLinerSigmaAlpha(), cdet::Station::GetListPadIds(), cdet::Station::GetName(), rdet::Station::GetName(), sdet::Station::GetName(), cdet::Station::GetNumberPadsX(), cdet::Station::GetNumberPadsY(), cdet::Station::GetNumberRPCChambers(), io::CorsikaShowerFileParticleIterator::GetOneParticle(), cdet::Station::GetPadArea(), cdet::Station::GetPadSizeX(), cdet::Station::GetPadSizeY(), rdet::Channel::GetPosition(), cdet::Station::GetPosition(), rdet::Station::GetPosition(), sdet::Station::GetPosition(), sdet::Station::GetRadius(), rdet::Channel::GetResponseMap(), cdet::Station::GetRPCHousingInnerDimensions(), cdet::Station::GetRPCHousingThickness(), cdet::Station::GetRPCSizeX(), cdet::Station::GetRPCSizeY(), sdet::Station::GetSaturationValue(), cdet::Station::GetTankSupportCentralFootBaseDimensions(), cdet::Station::GetTankSupportCentralFootDimensions(), cdet::Station::GetTankSupportOuterFootBaseDimensions(), cdet::Station::GetTankSupportOuterFootDimensions(), cdet::Station::GetTankSupportOuterFootDistanceToCenter(), cdet::Station::GetTankSupportTopSlabDimensions(), sdet::Station::GetThickness(), sdet::Station::GetTimingUncertainty(), sdet::Station::GetUUBCommissionTime(), sdet::Station::IsInAcquisition(), rdet::Station::IsInGrid(), cdet::Station::IsInGrid(), sdet::Station::IsInGrid(), io::RadioSimulation_ROOT::operator>>(), io::RadioSimulation_ROOT::RadioSimulation_ROOT(), sdet::Station::SetPartnerIds(), and cdet::Station::Update().
|
inline |
Definition at line 70 of file Validated.h.
|
inlinevirtual |
Implements utl::VValidated.
Definition at line 64 of file Validated.h.
Referenced by rdet::AntennaType::GetAntennaData(), sdet::Station::GetAxes(), rdet::Channel::GetChannelData(), cdet::Station::GetCommissionTimeRange(), rdet::Station::GetCommissionTimeRange(), sdet::Station::GetCommissionTimeRange(), mdet::PMT::GetCrossTalkNormalizationFactor(), cdet::Station::GetDeadTime(), sdet::Station::GetFADCBinSize(), sdet::Station::GetFADCTraceLength(), sdet::Station::GetGroupId(), sdet::Station::GetHeight(), sdet::Station::GetLatchBin(), sdet::Station::GetLinerSigmaAlpha(), cdet::Station::GetListPadIds(), cdet::Station::GetName(), rdet::Station::GetName(), sdet::Station::GetName(), cdet::Station::GetNumberPadsX(), cdet::Station::GetNumberPadsY(), cdet::Station::GetNumberRPCChambers(), io::CorsikaShowerFileParticleIterator::GetOneParticle(), cdet::Station::GetPadArea(), cdet::Station::GetPadSizeX(), cdet::Station::GetPadSizeY(), rdet::Channel::GetPosition(), cdet::Station::GetPosition(), rdet::Station::GetPosition(), sdet::Station::GetPosition(), sdet::Station::GetRadius(), rdet::Channel::GetResponseMap(), cdet::Station::GetRPCHousingInnerDimensions(), cdet::Station::GetRPCHousingThickness(), cdet::Station::GetRPCSizeX(), cdet::Station::GetRPCSizeY(), sdet::Station::GetSaturationValue(), cdet::Station::GetTankSupportCentralFootBaseDimensions(), cdet::Station::GetTankSupportCentralFootDimensions(), cdet::Station::GetTankSupportOuterFootBaseDimensions(), cdet::Station::GetTankSupportOuterFootDimensions(), cdet::Station::GetTankSupportOuterFootDistanceToCenter(), cdet::Station::GetTankSupportTopSlabDimensions(), sdet::Station::GetThickness(), sdet::Station::GetTimingUncertainty(), sdet::Station::GetUUBCommissionTime(), evt::RadioSimulation::HasCorePosition(), sdet::Station::IsInAcquisition(), rdet::Station::IsInGrid(), cdet::Station::IsInGrid(), sdet::Station::IsInGrid(), io::RadioSimulation_ROOT::RadioSimulation_ROOT(), and sdet::Station::SetPartnerIds().
|
inline |
Definition at line 62 of file Validated.h.
|
inline |
Definition at line 72 of file Validated.h.
Referenced by rdet::Channel::GetPosition(), rdet::Channel::GetResponseMap(), and utl::Validated< PulseParametrizationForConfig >::operator=().
|
inlinevirtual |
Implements utl::VValidated.
Definition at line 66 of file Validated.h.
Referenced by io::CorsikaShowerFileParticleIterator::CorsikaShowerFileParticleIterator(), rdet::AntennaType::GetAntennaData(), sdet::Station::GetAxes(), rdet::Channel::GetChannelData(), cdet::Station::GetDeadTime(), sdet::Station::GetFADCTraceLength(), sdet::Station::GetGroupId(), sdet::Station::GetHeight(), sdet::Station::GetLatchBin(), cdet::Station::GetListPadIds(), cdet::Station::GetName(), rdet::Station::GetName(), sdet::Station::GetName(), cdet::Station::GetNumberPadsX(), cdet::Station::GetNumberPadsY(), cdet::Station::GetNumberRPCChambers(), io::CorsikaShowerFileParticleIterator::GetOneParticle(), cdet::Station::GetPadArea(), cdet::Station::GetPadSizeX(), cdet::Station::GetPadSizeY(), sdet::Station::GetRadius(), cdet::Station::GetRPCHousingInnerDimensions(), cdet::Station::GetRPCHousingThickness(), cdet::Station::GetRPCSizeX(), cdet::Station::GetRPCSizeY(), cdet::Station::GetTankSupportCentralFootBaseDimensions(), cdet::Station::GetTankSupportCentralFootDimensions(), cdet::Station::GetTankSupportOuterFootBaseDimensions(), cdet::Station::GetTankSupportOuterFootDimensions(), cdet::Station::GetTankSupportOuterFootDistanceToCenter(), cdet::Station::GetTankSupportTopSlabDimensions(), sdet::Station::GetThickness(), sdet::Station::GetTimingUncertainty(), rdet::Station::IsInGrid(), cdet::Station::IsInGrid(), sdet::Station::IsInGrid(), io::RadioSimulation_ROOT::operator>>(), sdet::Station::SetPartnerIds(), rdet::Channel::Update(), sdet::Scintillator::Update(), rdet::Station::Update(), and cdet::Station::Update().
|
private |
Definition at line 75 of file Validated.h.
Referenced by utl::Validated< PulseParametrizationForConfig >::IsValid(), utl::Validated< PulseParametrizationForConfig >::Set(), and utl::Validated< PulseParametrizationForConfig >::SetValid().
|
private |
Definition at line 76 of file Validated.h.
Referenced by utl::Validated< PulseParametrizationForConfig >::Get(), and utl::Validated< PulseParametrizationForConfig >::Set().