9#include <G4Exception.hh>
10#include <G4Material.hh>
14 G4Exception(
"G4OCCTMaterialMap::Add",
"G4OCCT_MatMap000", FatalException,
15 (
"Null G4Material* provided for STEP material name: \"" + stepName +
16 "\". G4OCCTMaterialMap::Add() requires a non-null material pointer.")
20 fMap[stepName] = material;
24 auto it = fMap.find(stepName);
25 if (it == fMap.end()) {
26 G4Exception(
"G4OCCTMaterialMap::Resolve",
"G4OCCT_MatMap001", FatalException,
27 (
"Unresolved STEP material name: \"" + stepName +
28 "\". Register it with G4OCCTMaterialMap::Add() before importing.")
36 return fMap.count(stepName) > 0;
40 for (
const auto& [name, mat] : other.fMap) {
Declaration of G4OCCTMaterialMap.
Maps STEP material names to Geant4 G4Material objects.
void Add(const G4String &stepName, G4Material *material)
bool Contains(const G4String &stepName) const
void Merge(const G4OCCTMaterialMap &other)
G4Material * Resolve(const G4String &stepName) const