DLG4::VolumeBuilders
A fluent interface for Geant4 geometry definition.
Loading...
Searching...
No Matches
Namespaces | Classes | Typedefs | Functions
DLG4::VolumeBuilders::_internals_ Namespace Reference

Namespaces

namespace  PersistentObjectRegistry
 

Classes

class  Assembly
 
struct  BooleanConfigs
 
struct  BooleanSolid
 
class  BoxBuilder
 
struct  BuilderConfigs
 
class  FromG4VSolid
 
class  i_shared_ptr
 
class  ISolidBuilder
 
class  IStructureBuilder
 
class  IVolumeBuilder
 
class  Linkable
 
struct  PlacementConfigs
 
class  PlacementNameRegistry
 
class  RZBuilder
 
class  StructureBuilder
 
class  StructureBuilderReference
 
class  Unit3Vec
 
class  VolumeBuilder
 
class  VolumeBuilderReference
 
struct  VolumeConfigs
 
struct  VolumeConfigsValueTypes
 

Typedefs

using UnitlessG4Transform3D = G4Transform3D
 
template<typename T >
using SharedPtr = i_shared_ptr< T >
 
using ISolidPtr = SharedPtr< ISolidBuilder >
 
using IStructurePtr = SharedPtr< IStructureBuilder >
 
using BuilderView = SharedPtr< VolumeBuilderReference >
 
using StructureView = SharedPtr< StructureBuilderReference >
 
using RZBuilderPtr = SharedPtr< RZBuilder >
 
using FromG4VSolidPtr = SharedPtr< FromG4VSolid >
 
using BoxBuilderPtr = SharedPtr< BoxBuilder >
 
using AssemblyPtr = SharedPtr< Assembly >
 
using BuilderViewList = std::vector< BuilderView >
 
using StructureViewList = std::vector< StructureView >
 
template<typename U >
using VolumeBuilderPtr = SharedPtr< U >
 
template<typename U >
using ENABLE_SHARED_WRAPPER = Utilities::disableable_shared_from_this< U >
 
using Unitless3Vec = G4ThreeVector
 

Functions

template<typename TargetType , typename SourceType >
i_shared_ptr< TargetType > i_dynamic_pointer_cast (const i_shared_ptr< SourceType > &sourcePtr) noexcept
 
void SetGlobalDefaultUnit (G4double unit)
 
template<typename T >
std::shared_ptr< T > shared_mutable_this (const std::enable_shared_from_this< T > *obj)
 

Typedef Documentation

◆ AssemblyPtr

   @typedef AssemblyPtr
   @brief Assembly type to hold Structures, ie other assemblies or buidlers.

/

See also
StructureView for the common interface.

Definition at line 83 of file VolumeBuildersTypes.hh.

◆ BoxBuilderPtr

See also
BuilderView for the common interface.

Definition at line 76 of file VolumeBuildersTypes.hh.

◆ BuilderView

Common interface for all volume builder types.

All specific builder pointer types (RZBuilderPtr, FromG4VSolidPtr, etc.) are implicitly convertible to this type and provide polymorphic access to volume operations.

Definition at line 61 of file VolumeBuildersTypes.hh.

◆ BuilderViewList

using BuilderViewList = std::vector<BuilderView>

a user type to hold many builders

You can add to them directly with ->EmplaceBackInto(yourlist) But you should be able to add builders to a vector of, for example, 4LogicalVolume * as well since type converting operators are defined.!!!

Definition at line 91 of file VolumeBuildersTypes.hh.

◆ ENABLE_SHARED_WRAPPER

Definition at line 106 of file VolumeBuildersTypes.hh.

◆ FromG4VSolidPtr

See also
BuilderView for the common interface.

Definition at line 73 of file VolumeBuildersTypes.hh.

◆ ISolidPtr

using ISolidPtr = SharedPtr<ISolidBuilder>

True polymorphic class base view for all builders Mostly for internal use.

Definition at line 46 of file VolumeBuildersTypes.hh.

◆ IStructurePtr

True polymorphic class base view for all structures Mostly for internal use.

Definition at line 52 of file VolumeBuildersTypes.hh.

◆ RZBuilderPtr

See also
BuilderView for the common interface.

Definition at line 70 of file VolumeBuildersTypes.hh.

◆ SharedPtr

template<typename T >
using SharedPtr = i_shared_ptr<T>

Definition at line 27 of file VolumeBuildersTypes.hh.

◆ StructureView

Common interface for all structure types.


Includes builders and assemblies, and methods for LogicalVolume rendering and placement.

Definition at line 67 of file VolumeBuildersTypes.hh.

◆ StructureViewList

using StructureViewList = std::vector<StructureView>

a user type to hold many structures

You can add to them directly with ->EmplaceBackInto(yourlist) But you should be able to add builders to a vector of, for example, 4LogicalVolume * as well since type converting operators are defined.!!!

Definition at line 99 of file VolumeBuildersTypes.hh.

◆ Unitless3Vec

using Unitless3Vec = G4ThreeVector

Definition at line 109 of file VolumeBuildersTypes.hh.

◆ UnitlessG4Transform3D

typedef G4Transform3D UnitlessG4Transform3D

Definition at line 28 of file VolumeBuilderConfigs.hh.

◆ VolumeBuilderPtr

template<typename U >
using VolumeBuilderPtr = SharedPtr<U>

Definition at line 103 of file VolumeBuildersTypes.hh.

Function Documentation

◆ i_dynamic_pointer_cast()

template<typename TargetType , typename SourceType >
i_shared_ptr< TargetType > i_dynamic_pointer_cast ( const i_shared_ptr< SourceType > &  sourcePtr)
noexcept

Definition at line 151 of file i_shared_ptr.hh.

151 {
152 using SharedPtrToTarget = std::shared_ptr<TargetType>;
153 if (auto *rawPointer = dynamic_cast<typename SharedPtrToTarget::element_type *>(sourcePtr.
154 get())) {
155 return SharedPtrToTarget(sourcePtr, rawPointer);
156 }
157 return SharedPtrToTarget();
158 }

◆ shared_mutable_this()

template<typename T >
std::shared_ptr< T > shared_mutable_this ( const std::enable_shared_from_this< T > *  obj)

Definition at line 143 of file VolumeBuildersTypes.hh.

143 {
144 // Call shared_from_this() (returns shared_ptr<const T> if obj is const)
145 auto sp_const = obj->shared_from_this();
146
147 // Cast away constness safely
148 return std::const_pointer_cast<std::remove_const_t<T>>(sp_const);
149 }