X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAPI%2FGeomAPI_DataMapOfShapeShape.cpp;h=c42ef1562edac8a5ea29487a597c983ba77c68ba;hb=60e95a5502a6940c6c27ce5d561b3c684b0b0a4f;hp=56002d3a58018623bd1bc2895313e9f52124003b;hpb=db3da60baa0e8cb3dec62db38063d3b9a951a4cd;p=modules%2Fshaper.git diff --git a/src/GeomAPI/GeomAPI_DataMapOfShapeShape.cpp b/src/GeomAPI/GeomAPI_DataMapOfShapeShape.cpp index 56002d3a5..c42ef1562 100644 --- a/src/GeomAPI/GeomAPI_DataMapOfShapeShape.cpp +++ b/src/GeomAPI/GeomAPI_DataMapOfShapeShape.cpp @@ -1,3 +1,5 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + // File: GeomAPI_DataMapOfShapeShape.cpp // Created: 28 Oct 2014 // Author: Sergey Zaritchny @@ -18,8 +20,14 @@ void GeomAPI_DataMapOfShapeShape::clear() implPtr()->Clear(); } +/// Size +int GeomAPI_DataMapOfShapeShape::size() +{ + return implPtr()->Extent(); +} + /// Adds the Key to the Map with the Item. Returns True if the Key was not already in the map -bool GeomAPI_DataMapOfShapeShape::bind (boost::shared_ptr theKey, boost::shared_ptr theItem) +bool GeomAPI_DataMapOfShapeShape::bind (std::shared_ptr theKey, std::shared_ptr theItem) { bool flag(false); if(implPtr()->Bind(theKey->impl(), theItem->impl())) @@ -28,7 +36,7 @@ bool GeomAPI_DataMapOfShapeShape::bind (boost::shared_ptr theKey, } /// Returns true if theKey is stored in the map. -bool GeomAPI_DataMapOfShapeShape::isBound (boost::shared_ptr theKey) +bool GeomAPI_DataMapOfShapeShape::isBound (std::shared_ptr theKey) { bool flag(false); if(impl().IsBound(theKey->impl())) @@ -37,15 +45,15 @@ bool GeomAPI_DataMapOfShapeShape::isBound (boost::shared_ptr theK } /// Returns the Item stored with the Key in the Map. To be checked before with isBound() -const boost::shared_ptr GeomAPI_DataMapOfShapeShape::find(boost::shared_ptr theKey) +const std::shared_ptr GeomAPI_DataMapOfShapeShape::find(std::shared_ptr theKey) { - boost::shared_ptr aShape(new GeomAPI_Shape()); + std::shared_ptr aShape(new GeomAPI_Shape()); aShape->setImpl(new TopoDS_Shape(impl().Find(theKey->impl()))); return aShape; } /// Removes the Key from the map. Returns true if the Key was in the Map -bool GeomAPI_DataMapOfShapeShape::unBind(boost::shared_ptr theKey) +bool GeomAPI_DataMapOfShapeShape::unBind(std::shared_ptr theKey) { bool flag(false); if(implPtr()->UnBind(theKey->impl()))