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 (UnitBase &p)
 
 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 173 of file DLG4Units.hh.

Constructor & Destructor Documentation

◆ DefaultUnitsProxy() [1/3]

template<class T , typename NativeType >
DefaultUnitsProxy ( UnitBase p)
inline

Definition at line 178 of file DLG4Units.hh.

◆ DefaultUnitsProxy() [2/3]

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

◆ DefaultUnitsProxy() [3/3]

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 187 of file DLG4Units.hh.

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

◆ operator=()

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

Definition at line 185 of file DLG4Units.hh.

185{ 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 189 of file DLG4Units.hh.

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

Member Data Documentation

◆ parent

template<class T , typename NativeType >
UnitBase& parent

Definition at line 176 of file DLG4Units.hh.


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