DLG4::VolumeBuilders
A fluent interface for Geant4 geometry definition.
Loading...
Searching...
No Matches
ISolidBuilder.hh
Go to the documentation of this file.
1#pragma once
19#ifndef ISOLIDBUIDLER_HH
20#define ISOLIDBUIDLER_HH
21
22#include <G4LogicalVolume.hh>
23#include <G4Transform3D.hh>
24#include <G4VSolid.hh>
25
26#include "Linkable.hh"
28
29
33
37 protected:
38 friend class VolumeBuilderCore; // for tye erasing polymorphism
39 friend class StructureBuilderCore; // for tye erasing polymorphism
40 template <typename T>
42 friend class AssemblyCore;
43 virtual G4VSolid *SolidConstructor(const G4String &name) = 0;
44 virtual ~IStructureBuilder() = default;
45 // clones and returns a base class pointer
46 [[nodiscard]] virtual SharedPtr<IStructureBuilder> clone_impl() const = 0;
47 // Returns a type-erased view ptr.
48 [[nodiscard]] virtual StructureBuilder ToStructureView() const = 0;
49 [[nodiscard]] virtual VolumeBuilder ToVolumeBuilder() const = 0;
50 // store type erased views of underlying objects...
51 // combined with above we can get a view from an object and store the view
52 // in the tye-erased object being copied or constructed.
53 };
54
55 //Just a tag class to mark IStructureBuilders that are also ISolidBuilders
56 class ISolidBuilder: public IStructureBuilder {
57 };
58}
59
60
61//
62
63
64#endif //ISOLIDBUIDLER_HH
A type-erased (data shared view) view of a builder or assembly, ie a "structure.".
a non-fluent polymorphic class to access the derived solid-builder from a base reference: This gets u...
virtual G4VSolid * SolidConstructor(const G4String &name)=0
virtual StructureBuilder ToStructureView() const =0
virtual VolumeBuilder ToVolumeBuilder() const =0
virtual SharedPtr< IStructureBuilder > clone_impl() const =0
A type-erased (data shared view) view of a builder or assembly, ie a "structure.".
A type-erased (data shared view) view of a builder or assembly, ie a "structure.".
A polymorphic, type-erased "view" of any specialized builder.