2017-12-19 20:24:00 +01:00
|
|
|
#ifndef ITERATOR_IMPLEMENTATION_H
|
|
|
|
|
#define ITERATOR_IMPLEMENTATION_H
|
|
|
|
|
|
2018-09-07 14:08:56 +02:00
|
|
|
#include "../ifcgeom_schema_agnostic/IfcGeomFilter.h"
|
2017-12-19 20:24:00 +01:00
|
|
|
#include "../ifcparse/IfcFile.h"
|
|
|
|
|
#include "../ifcgeom/IfcGeomIteratorSettings.h"
|
|
|
|
|
|
2018-09-07 14:08:56 +02:00
|
|
|
#include <gp_XYZ.hxx>
|
|
|
|
|
|
2017-12-19 20:24:00 +01:00
|
|
|
#include <boost/function.hpp>
|
|
|
|
|
|
|
|
|
|
#include <map>
|
|
|
|
|
#include <string>
|
|
|
|
|
|
2017-12-20 11:10:27 +01:00
|
|
|
namespace IfcGeom {
|
|
|
|
|
class IteratorImplementation;
|
|
|
|
|
|
|
|
|
|
class Element;
|
|
|
|
|
|
|
|
|
|
class BRepElement;
|
|
|
|
|
}
|
2017-12-19 20:24:00 +01:00
|
|
|
|
2021-07-11 15:00:59 +02:00
|
|
|
typedef boost::function4<IfcGeom::IteratorImplementation*, const IfcGeom::IteratorSettings&, IfcParse::IfcFile*, const std::vector<IfcGeom::filter_t>&, int> iterator_fn;
|
2017-12-19 20:24:00 +01:00
|
|
|
|
2021-07-11 15:00:59 +02:00
|
|
|
class IteratorFactoryImplementation : public std::map<std::string, iterator_fn> {
|
2017-12-19 20:24:00 +01:00
|
|
|
public:
|
|
|
|
|
IteratorFactoryImplementation();
|
2021-07-11 15:00:59 +02:00
|
|
|
void bind(const std::string& schema_name, iterator_fn fn);
|
|
|
|
|
IfcGeom::IteratorImplementation* construct(const std::string& schema_name, const IfcGeom::IteratorSettings&, IfcParse::IfcFile*, const std::vector<IfcGeom::filter_t>&, int);
|
2017-12-19 20:24:00 +01:00
|
|
|
};
|
|
|
|
|
|
2021-07-11 15:00:59 +02:00
|
|
|
IteratorFactoryImplementation& iterator_implementations();
|
2017-12-19 20:24:00 +01:00
|
|
|
|
2017-12-20 11:10:27 +01:00
|
|
|
namespace IfcGeom {
|
2017-12-19 20:24:00 +01:00
|
|
|
|
2017-12-20 11:10:27 +01:00
|
|
|
class IteratorImplementation {
|
|
|
|
|
public:
|
|
|
|
|
virtual bool initialize() = 0;
|
2020-02-12 11:38:08 +01:00
|
|
|
virtual void compute_bounds(bool with_geometry) = 0;
|
2018-09-07 14:08:56 +02:00
|
|
|
virtual const gp_XYZ& bounds_min() const = 0;
|
|
|
|
|
virtual const gp_XYZ& bounds_max() const = 0;
|
2017-12-20 11:10:27 +01:00
|
|
|
virtual int progress() const = 0;
|
|
|
|
|
virtual const std::string& getUnitName() const = 0;
|
|
|
|
|
virtual double getUnitMagnitude() const = 0;
|
|
|
|
|
virtual IfcParse::IfcFile* file() const = 0;
|
|
|
|
|
virtual IfcUtil::IfcBaseClass* next() = 0;
|
2021-07-11 15:00:59 +02:00
|
|
|
virtual Element* get() = 0;
|
|
|
|
|
virtual BRepElement* get_native() = 0;
|
|
|
|
|
virtual const Element* get_object(int id) = 0;
|
2017-12-20 11:10:27 +01:00
|
|
|
virtual IfcUtil::IfcBaseClass* create() = 0;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|
2017-12-19 20:24:00 +01:00
|
|
|
|
|
|
|
|
#endif
|