.. _program_listing_file_src_ifcgeom_schema_agnostic_IteratorImplementation.h: Program Listing for File IteratorImplementation.h ================================================= |exhale_lsh| :ref:`Return to documentation for file ` (``src/ifcgeom_schema_agnostic/IteratorImplementation.h``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #ifndef ITERATOR_IMPLEMENTATION_H #define ITERATOR_IMPLEMENTATION_H #include "../ifcgeom_schema_agnostic/IfcGeomFilter.h" #include "../ifcparse/IfcFile.h" #include "../ifcgeom/IfcGeomIteratorSettings.h" #include #include #include #include namespace IfcGeom { template class IteratorImplementation; template class Element; template class BRepElement; } typedef boost::function4*, const IfcGeom::IteratorSettings&, IfcParse::IfcFile*, const std::vector&, int> iterator_float_float_fn; typedef boost::function4*, const IfcGeom::IteratorSettings&, IfcParse::IfcFile*, const std::vector&, int> iterator_float_double_fn; typedef boost::function4*, const IfcGeom::IteratorSettings&, IfcParse::IfcFile*, const std::vector&, int> iterator_double_double_fn; template struct get_factory_type {}; template <> struct get_factory_type { typedef iterator_float_float_fn type; }; template <> struct get_factory_type { typedef iterator_float_double_fn type; }; template <> struct get_factory_type { typedef iterator_double_double_fn type; }; template class IteratorFactoryImplementation : public std::map::type> { public: IteratorFactoryImplementation(); void bind(const std::string& schema_name, typename get_factory_type::type fn); IfcGeom::IteratorImplementation* construct(const std::string& schema_name, const IfcGeom::IteratorSettings&, IfcParse::IfcFile*, const std::vector&, int); }; template IteratorFactoryImplementation& iterator_implementations(); namespace IfcGeom { template class IteratorImplementation { public: virtual bool initialize() = 0; virtual void compute_bounds(bool with_geometry) = 0; virtual const gp_XYZ& bounds_min() const = 0; virtual const gp_XYZ& bounds_max() const = 0; 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; virtual Element* get() = 0; virtual BRepElement* get_native() = 0; virtual const Element* get_object(int id) = 0; virtual IfcUtil::IfcBaseClass* create() = 0; }; } #endif