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

Constructor & Destructor Documentation

◆ NativeProxy() [1/3]

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

Definition at line 203 of file DLG4Units.hh.

203: parent(p) { }

◆ NativeProxy() [2/3]

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

◆ NativeProxy() [3/3]

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

212 {
213 parent.CheckValue("NativeProxy");
214 return *(parent.NativeValue_);
215 }
void CheckValue(const G4String &context) const
Definition DLG4Units.hh:260
std::optional< NativeType > NativeValue_
Definition DLG4Units.hh:98

◆ operator=()

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

Definition at line 210 of file DLG4Units.hh.

210{ 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 217 of file DLG4Units.hh.

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


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