Files
IfcOpenShell/src/ifcgeom_schema_agnostic/IteratorImplementation.h
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

55 lines
1.6 KiB
C++
Raw Normal View History

2017-12-19 20:24:00 +01:00
#ifndef ITERATOR_IMPLEMENTATION_H
#define ITERATOR_IMPLEMENTATION_H
#include "../ifcgeom_schema_agnostic/IfcGeomFilter.h"
2017-12-19 20:24:00 +01:00
#include "../ifcparse/IfcFile.h"
#include "../ifcgeom/IfcGeomIteratorSettings.h"
#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;
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