mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-16 18:44:47 +00:00
27 lines
855 B
C++
27 lines
855 B
C++
|
|
#include "IteratorImplementation.h"
|
||
|
|
|
||
|
|
template <typename P>
|
||
|
|
IteratorFactoryImplementation<P>& iterator_implementations() {
|
||
|
|
static IteratorFactoryImplementation<P> impl;
|
||
|
|
return impl;
|
||
|
|
}
|
||
|
|
|
||
|
|
template IteratorFactoryImplementation<float>& iterator_implementations<float>();
|
||
|
|
template IteratorFactoryImplementation<double>& iterator_implementations<double>();
|
||
|
|
|
||
|
|
#define INIT(a) extern void init_##a(); init_##a();
|
||
|
|
|
||
|
|
template <typename P>
|
||
|
|
IteratorFactoryImplementation<P>::IteratorFactoryImplementation() {
|
||
|
|
INIT(IteratorImplementation_Ifc2x3);
|
||
|
|
INIT(IteratorImplementation_Ifc4);
|
||
|
|
}
|
||
|
|
|
||
|
|
template <class P>
|
||
|
|
void IteratorFactoryImplementation<P>::bind(const std::string& schema_name, typename get_factory_type<P>::type fn) {
|
||
|
|
this->insert(std::make_pair(schema_name, fn));
|
||
|
|
}
|
||
|
|
|
||
|
|
template IteratorFactoryImplementation<float>;
|
||
|
|
template IteratorFactoryImplementation<double>;
|