Files
IfcOpenShell/src/ifcgeom/serialization/serialization.h
T

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

50 lines
1.9 KiB
C++
Raw Normal View History

2026-04-14 13:50:23 +02:00
#ifndef IFC_GEOM_SERIALIZATION_H
#define IFC_GEOM_SERIALIZATION_H
#include "../../ifcparse/express.h"
2026-04-14 13:50:23 +02:00
#include "../../plugin/plugin.h"
2026-08-08 14:19:57 +02:00
#include "../../ifcgeom/conversion_result.h"
2017-12-22 17:37:58 +01:00
2025-09-26 14:24:49 +02:00
#include "ifc_geomserialization_api.h"
2022-06-15 13:56:47 +02:00
2026-04-14 13:50:23 +02:00
#include <boost/function.hpp>
2017-12-22 17:37:58 +01:00
2026-04-14 13:50:23 +02:00
#include <map>
2017-12-22 17:37:58 +01:00
#include <string>
2026-04-14 13:50:23 +02:00
class TopoDS_Shape;
namespace ifcopenshell {
class file;
}
2026-08-08 07:42:45 +02:00
namespace ifcopenshell::geom {
2026-04-14 13:50:23 +02:00
class IFC_GEOMSERIALIZATION_API opencascade_geometry_ifc_writer_registry {
public:
2026-08-08 07:42:45 +02:00
typedef boost::function3<express::base, ifcopenshell::file&, const conversion_result_shape&, double> tesselate_fn;
typedef boost::function3<express::base, ifcopenshell::file&, const conversion_result_shape&, bool> serialise_fn;
2026-04-14 13:50:23 +02:00
void bind(const std::string& schema_name, serialise_fn serialise, tesselate_fn tesselate, const ifcopenshell::plugin::module& module = ifcopenshell::plugin::module());
2026-08-08 07:42:45 +02:00
express::base tesselate(ifcopenshell::file& f, const conversion_result_shape& shape, double deflection) const;
express::base serialise(ifcopenshell::file& f, const conversion_result_shape& shape, bool advanced) const;
2026-04-14 13:50:23 +02:00
private:
struct entry {
serialise_fn serialise_;
tesselate_fn tesselate_;
ifcopenshell::plugin::module module_;
};
std::map<std::string, entry> entries_;
};
IFC_GEOMSERIALIZATION_API opencascade_geometry_ifc_writer_registry& opencascade_geometry_ifc_writer_registry_instance();
2026-08-08 07:42:45 +02:00
IFC_GEOMSERIALIZATION_API express::base tesselate(ifcopenshell::file& f, const conversion_result_shape& shape, double deflection);
IFC_GEOMSERIALIZATION_API express::base serialise(ifcopenshell::file& f, const conversion_result_shape& shape, bool advanced);
IFC_GEOMSERIALIZATION_API express::base tesselate(ifcopenshell::file& f, const TopoDS_Shape& shape, double deflection);
IFC_GEOMSERIALIZATION_API express::base serialise(ifcopenshell::file& f, const TopoDS_Shape& shape, bool advanced);
} // namespace ifcopenshell::geom
2026-04-14 13:50:23 +02:00
#endif