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 >::NativeProxy Struct Reference

#include <DLG4Units.hh>

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

Public Member Functions

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

Public Attributes

UnitBaseparent
 

Friends

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

Detailed Description

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

Definition at line 196 of file DLG4Units.hh.

Constructor & Destructor Documentation

◆ NativeProxy() [1/2]

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

◆ NativeProxy() [2/2]

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

Member Function Documentation

◆ operator NativeType()

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

Definition at line 209 of file DLG4Units.hh.

209 {
210 parent.CheckValue("NativeProxy");
211 return *(parent.NativeValue_);
212 }
void CheckValue(const G4String &context) const
Definition DLG4Units.hh:262
std::optional< NativeType > NativeValue_
Definition DLG4Units.hh:96

◆ operator=()

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

Definition at line 207 of file DLG4Units.hh.

207{ parent.NativeValue_ = val; }

Friends And Related Symbol Documentation

◆ operator>>

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

Definition at line 214 of file DLG4Units.hh.

214 {
215 NativeType temp_val;
216 if (is >> temp_val) {
217 proxy = temp_val; // Reuses your assignment operator above safely
218 }
219 return is;
220 }
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 199 of file DLG4Units.hh.


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