From 1842dc64da3ebcdebc1c3c93651a90c7c0e8cfda Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Wed, 24 Aug 2011 12:35:42 +0000 Subject: [PATCH] Added missing file --- src/ifcgeom/IfcRegister.cpp | 56 +++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 src/ifcgeom/IfcRegister.cpp diff --git a/src/ifcgeom/IfcRegister.cpp b/src/ifcgeom/IfcRegister.cpp new file mode 100644 index 0000000000..ace2835a46 --- /dev/null +++ b/src/ifcgeom/IfcRegister.cpp @@ -0,0 +1,56 @@ +/******************************************************************************** +* * +* This file is part of IfcOpenShell. * +* * +* IfcOpenShell is free software: you can redistribute it and/or modify * +* it under the terms of the Lesser GNU General Public License as published by * +* the Free Software Foundation, either version 3.0 of the License, or * +* (at your option) any later version. * +* * +* IfcOpenShell is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* Lesser GNU General Public License for more details. * +* * +* You should have received a copy of the Lesser GNU General Public License * +* along with this program. If not, see . * +* * +********************************************************************************/ + +#include "IfcGeom.h" + +namespace IfcGeom { + namespace Cache { + std::map Shape; + void PurgeShapeCache() { + Shape.clear(); + } + } +} + +using namespace Ifc2x3; +using namespace IfcUtil; + +bool IfcGeom::convert_shape(const SHARED_PTR& l, TopoDS_Shape& r) { + const unsigned int id = l->entity->id(); + std::map::const_iterator it = Cache::Shape.find(id); + if ( it != Cache::Shape.end() ) { r = it->second; return true; } +#include "IfcRegisterConvertShape.h" + Ifc::LogMessage("Error","No operation defined for:",l->entity); + return false; +} +bool IfcGeom::convert_wire(const SHARED_PTR& l, TopoDS_Wire& r) { +#include "IfcRegisterConvertWire.h" + Ifc::LogMessage("Error","No operation defined for:",l->entity); + return false; +} +bool IfcGeom::convert_face(const SHARED_PTR& l, TopoDS_Face& r) { +#include "IfcRegisterConvertFace.h" + Ifc::LogMessage("Error","No operation defined for:",l->entity); + return false; +} +bool IfcGeom::convert_curve(const SHARED_PTR& l, Handle(Geom_Curve)& r) { +#include "IfcRegisterConvertCurve.h" + Ifc::LogMessage("Error","No operation defined for:",l->entity); + return false; +} \ No newline at end of file