19 const auto &[it, inserted] =
m_theElements.try_emplace(el->GetName(), el);
21 std::cout <<
"Element " << el->GetName()<<
" already defined: skipping\n";
28 const auto &[it, inserted] =
m_theMaterials.try_emplace(mat->GetName(), mat);
30 std::cout <<
"Material " << mat->GetName() <<
" already defined: skipping\n";
40 std::cout <<
" Material " << mat <<
" not found!\n";
48 std::cout<<
" Element "<<el<<
" not found!"<<std::endl;
56 std::cout<<
"List of elements so far defined: "<<
58 AGDDElementMap::const_iterator it;
63 if (!(i%5)) std::cout<<std::endl<<
"-----> ";
64 std::cout<<(*it).first<<
",";
70 std::cout<<
"List of materials so far defined: "<<
72 AGDDMaterialMap::const_iterator it;
77 if (!(i%5)) std::cout<<std::endl<<
"-----> ";
78 std::cout<<(*it).first<<
",";
87 std::cout<<
"Element "<<n<<
" not found!"<<std::endl;
95 std::cout<<
"Material "<<n<<
" not found!"<<std::endl;
void RegisterElement(AGDDElement *)
AGDDMaterialMap m_theMaterials
void RegisterMaterial(AGDDSimpleMaterial *)
AGDDSimpleMaterial * GetMaterial(std::string_view)
void PrintElement(const std::string &n)
AGDDElementMap m_theElements
void PrintMaterialNames()
AGDDElement * GetElement(std::string_view)
void PrintMaterial(const std::string &n)