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

#include <DLG4Units.hh>

Public Member Functions

 PropertySetter (const PropertySetter &)=delete
 
PropertySetteroperator= (const PropertySetter &)=delete
 
void operator= (G4double val)
 
G4double operator() () const
 
 operator G4double () const
 

Public Attributes

Unit< T > & parent
 
G4double scale
 

Friends

std::istream & operator>> (std::istream &is, const PropertySetter &ap)
 

Detailed Description

template<class T>
struct DLG4::Units::Unit< T >::PropertySetter

Definition at line 158 of file DLG4Units.hh.

Constructor & Destructor Documentation

◆ PropertySetter()

template<class T >
PropertySetter ( const PropertySetter )
delete

Member Function Documentation

◆ operator G4double()

template<class T >
operator G4double ( ) const
inline

Definition at line 171 of file DLG4Units.hh.

171{ return (*this)(); }

◆ operator()()

template<class T >
G4double operator() ( ) const
inline

Definition at line 170 of file DLG4Units.hh.

170{ return parent.GetScaled(1.0 / scale); }

◆ operator=() [1/2]

template<class T >
PropertySetter & operator= ( const PropertySetter )
delete

◆ operator=() [2/2]

template<class T >
void operator= ( G4double  val)
inline

Definition at line 167 of file DLG4Units.hh.

167{ parent.NativeValue_ = val * scale; }

Friends And Related Symbol Documentation

◆ operator>>

template<class T >
std::istream & operator>> ( std::istream &  is,
const PropertySetter ap 
)
friend

Definition at line 174 of file DLG4Units.hh.

174 {
175 G4double val;
176 if (is >> val) ap.parent.NativeValue_ = val * ap.scale;
177 return is;
178 }

Member Data Documentation

◆ parent

template<class T >
Unit<T>& parent

Definition at line 159 of file DLG4Units.hh.

◆ scale

template<class T >
G4double scale

Definition at line 160 of file DLG4Units.hh.


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