Use extra data in PolyPtr to create particles and layer containers (#1031)
There was a design problem.
Cataloged classes objects are normally created by Catalog::create(Type type)
.
But there are two special catalogs, ParticleCatalog
and LayeredComponentCatalog
, which have Catalog::create(Type type, const MaterialsSet* materials)
.
When a new object was created through Catalog::create
the const MaterialsSet* materials
was set to nullptr
and this caused failure.
Now a new class PolyPtrExtra
accepts MaterialsSet
in constructor and passes it to Catalog::create
Resolves #1031 (closed)
Edited by Mikhail Svechnikov