72 if(
nullptr == instance) {
89 std::size_t n = xSections.size();
90 for (std::size_t i=0; i<n; ++i) {
94 xSections[i] =
nullptr;
97 n = xComponents.size();
98 for (std::size_t i=0; i<n; ++i) {
99 auto p = xComponents[i];
102 xComponents[i] =
nullptr;
109 if(
nullptr == p) {
return; }
110 for (
auto & xsec : xSections) {
111 if(xsec == p) {
return; }
113 xSections.push_back(p);
118 if(
nullptr == p) {
return; }
119 std::size_t n = xSections.size();
120 for (std::size_t i=0; i<n; ++i) {
121 if(xSections[i] == p) {
122 xSections[i] =
nullptr;
130 if(
nullptr == p) {
return; }
131 for (
auto & xsec : xComponents) {
132 if(xsec == p) {
return; }
134 xComponents.push_back(p);
139 if(
nullptr == p) {
return; }
140 std::size_t n = xComponents.size();
141 for (std::size_t i=0; i<n; ++i) {
142 if(xComponents[i] == p) {
143 xComponents[i] =
nullptr;
152 if(
nullptr == p) {
return; }
153 std::size_t n = xComponents.size();
154 for (std::size_t i=0; i<n; ++i) {
155 if(xComponents[i] == p) {
166 for (
auto const & xsec : xSections) {
167 if (
nullptr != xsec && xsec->GetName() == name) {
return xsec; }
176 if (
nullptr != factory ) {
187 for (
auto & xsec : xComponents) {
188 if(
nullptr != xsec && xsec->GetName() == name) {
return xsec; }
#define G4_REFERENCE_XS_FACTORY(cross_section)
void DeRegister(G4VCrossSectionDataSet *)
~G4CrossSectionDataSetRegistry()
G4VCrossSectionDataSet * GetCrossSectionDataSet(const G4String &name, G4bool warning=false)
G4VComponentCrossSection * GetComponentCrossSection(const G4String &name)
G4CrossSectionDataSetRegistry(G4CrossSectionDataSetRegistry &)=delete
void Register(G4VCrossSectionDataSet *)
static G4CrossSectionDataSetRegistry * Instance()
void DeleteComponent(G4VComponentCrossSection *)
static G4CrossSectionFactoryRegistry * Instance()
G4VBaseXSFactory * GetFactory(const G4String &name, G4bool abortIfNotFound=true) const
virtual G4VCrossSectionDataSet * Instantiate()=0