#ifndef ABSTRACT_MAPPING_H #define ABSTRACT_MAPPING_H #include "../ifcparse/IfcBaseClass.h" #include "../ifcparse/IfcEntityList.h" #include "../ifcgeom/taxonomy.h" #include "../ifcgeom/settings.h" #include #include #include namespace ifcopenshell { namespace geometry { class Element; class NativeElement; struct geometry_conversion_task { int index; IfcUtil::IfcBaseEntity* representation; IfcEntityList::ptr products; std::vector breps; std::vector elements; }; typedef boost::function filter_t; class abstract_mapping { public: virtual ifcopenshell::geometry::taxonomy::item* map(const IfcUtil::IfcBaseClass*) = 0; virtual void get_representations(std::vector& tasks, std::vector& filters, settings& s) = 0; virtual IfcUtil::IfcBaseEntity* get_decomposing_entity(IfcUtil::IfcBaseEntity* product, bool include_openings = true) = 0; virtual std::map get_layers(IfcUtil::IfcBaseEntity*); }; namespace impl { typedef boost::function1 mapping_fn; class MappingFactoryImplementation : public std::map { public: MappingFactoryImplementation(); void bind(const std::string& schema_name, mapping_fn); abstract_mapping* construct(IfcParse::IfcFile*); }; MappingFactoryImplementation& mapping_implementations(); } } } #endif