DLG4::VolumeBuilders
A fluent interface for Geant4 geometry definition.
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Friends | List of all members
UnitBase< T, NativeType >::DefaultUnitsProxy Struct Reference

#include <DLG4Units.hh>

Collaboration diagram for UnitBase< T, NativeType >::DefaultUnitsProxy:
[legend]

Public Member Functions

 DefaultUnitsProxy (const DefaultUnitsProxy &)=delete
 
 DefaultUnitsProxy (DefaultUnitsProxy &&)=delete
 
void operator= (NativeType val)
 
 operator NativeType () const
 

Public Attributes

UnitBaseparent
 

Friends

std::istream & operator>> (std::istream &is, DefaultUnitsProxy &proxy)
 

Detailed Description

template<class T, typename NativeType>
struct DLG4::Units::UnitBase< T, NativeType >::DefaultUnitsProxy

Definition at line 172 of file DLG4Units.hh.

Constructor & Destructor Documentation

◆ DefaultUnitsProxy() [1/2]

template<class T , typename NativeType >
DefaultUnitsProxy ( const DefaultUnitsProxy )
delete

◆ DefaultUnitsProxy() [2/2]

template<class T , typename NativeType >
DefaultUnitsProxy ( DefaultUnitsProxy &&  )
delete

Member Function Documentation

◆ operator NativeType()

template<class T , typename NativeType >
operator NativeType ( ) const
inline

Definition at line 185 of file DLG4Units.hh.

185{ return Evaluator{parent, GetGlobalDefault().NativeValue_.value()}; }
std::optional< NativeType > NativeValue_
Definition DLG4Units.hh:96
static T GetGlobalDefault()
Definition DLG4Units.hh:260

◆ operator=()

template<class T , typename NativeType >
void operator= ( NativeType  val)
inline

Definition at line 183 of file DLG4Units.hh.

183{ Evaluator{parent, GetGlobalDefault().NativeValue_.value()} = val; }

Friends And Related Symbol Documentation

◆ operator>>

template<class T , typename NativeType >
std::istream & operator>> ( std::istream &  is,
DefaultUnitsProxy proxy 
)
friend

Definition at line 187 of file DLG4Units.hh.

187 {
188 NativeType temp_val;
189 if (is >> temp_val) {
190 proxy = temp_val; // Reuses your assignment operator above safely
191 }
192 return is;
193 }
std::conditional_t< std::is_base_of_v< Unit3Vec, T >, G4ThreeVector, std::conditional_t< std::is_base_of_v< UnitTag, T >, G4double, T > > NativeType
Definition DLG4Units.hh:615

Member Data Documentation

◆ parent

template<class T , typename NativeType >
UnitBase& parent

Definition at line 175 of file DLG4Units.hh.


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