1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: GeomAPI_DataMapOfShapeShape.cpp
4 // Created: 28 Oct 2014
5 // Author: Sergey Zaritchny
7 #include <GeomAPI_Shape.h>
8 #include <GeomAPI_DataMapOfShapeShape.h>
9 #include <TopTools_DataMapOfShapeShape.hxx>
10 #include <TopoDS_Shape.hxx>
14 GeomAPI_DataMapOfShapeShape::GeomAPI_DataMapOfShapeShape()
15 :GeomAPI_Interface((void *)new TopTools_DataMapOfShapeShape){}
17 void GeomAPI_DataMapOfShapeShape::clear()
19 implPtr<TopTools_DataMapOfShapeShape>()->Clear();
22 int GeomAPI_DataMapOfShapeShape::size()
24 return implPtr<TopTools_DataMapOfShapeShape>()->Extent();
27 bool GeomAPI_DataMapOfShapeShape::bind (std::shared_ptr<GeomAPI_Shape> theKey, std::shared_ptr<GeomAPI_Shape> theItem)
30 if(implPtr<TopTools_DataMapOfShapeShape>()->Bind(theKey->impl<TopoDS_Shape>(), theItem->impl<TopoDS_Shape>()))
35 bool GeomAPI_DataMapOfShapeShape::isBound (std::shared_ptr<GeomAPI_Shape> theKey)
38 if(impl<TopTools_DataMapOfShapeShape>().IsBound(theKey->impl<TopoDS_Shape>()))
43 const std::shared_ptr<GeomAPI_Shape> GeomAPI_DataMapOfShapeShape::find(std::shared_ptr<GeomAPI_Shape> theKey)
45 std::shared_ptr<GeomAPI_Shape> aShape(new GeomAPI_Shape());
46 aShape->setImpl(new TopoDS_Shape(impl<TopTools_DataMapOfShapeShape>().Find(theKey->impl<TopoDS_Shape>())));
50 bool GeomAPI_DataMapOfShapeShape::unBind(std::shared_ptr<GeomAPI_Shape> theKey)
53 if(implPtr<TopTools_DataMapOfShapeShape>()->UnBind(theKey->impl<TopoDS_Shape>()))
58 GeomAPI_DataMapOfShapeShape::~GeomAPI_DataMapOfShapeShape()
61 implPtr<TopTools_DataMapOfShapeShape>()->Clear();