#include "IteratorImplementation.h" #include template IteratorFactoryImplementation& iterator_implementations() { static IteratorFactoryImplementation impl; return impl; } template IteratorFactoryImplementation& iterator_implementations(); template IteratorFactoryImplementation& iterator_implementations(); template IteratorFactoryImplementation& iterator_implementations(); template extern void init_IteratorImplementation_Ifc2x3(IteratorFactoryImplementation*); template extern void init_IteratorImplementation_Ifc4(IteratorFactoryImplementation*); template extern void init_IteratorImplementation_Ifc4x1(IteratorFactoryImplementation*); template extern void init_IteratorImplementation_Ifc4x2(IteratorFactoryImplementation*); template extern void init_IteratorImplementation_Ifc4x3_rc1(IteratorFactoryImplementation*); template IteratorFactoryImplementation::IteratorFactoryImplementation() { init_IteratorImplementation_Ifc2x3(this); init_IteratorImplementation_Ifc4(this); init_IteratorImplementation_Ifc4x1(this); init_IteratorImplementation_Ifc4x2(this); init_IteratorImplementation_Ifc4x3_rc1(this); } template void IteratorFactoryImplementation::bind(const std::string& schema_name, typename get_factory_type::type fn) { const std::string schema_name_lower = boost::to_lower_copy(schema_name); this->insert(std::make_pair(schema_name_lower, fn)); } template IfcGeom::IteratorImplementation* IteratorFactoryImplementation::construct(const std::string& schema_name, const IfcGeom::IteratorSettings& settings, IfcParse::IfcFile* file, const std::vector& filters, int num_threads) { const std::string schema_name_lower = boost::to_lower_copy(schema_name); typename std::map::type>::const_iterator it; it = this->find(schema_name_lower); if (it == this->end()) { throw IfcParse::IfcException("No geometry iterator registered for " + schema_name); } return it->second(settings, file, filters, num_threads); } template class IteratorFactoryImplementation; template class IteratorFactoryImplementation; template class IteratorFactoryImplementation;