|
||||
File indexing completed on 2025-01-18 10:05:28
0001 // Created on: 2012-06-27 0002 // Created by: Dmitry BOBYLEV 0003 // Copyright (c) 2012-2014 OPEN CASCADE SAS 0004 // 0005 // This file is part of Open CASCADE Technology software library. 0006 // 0007 // This library is free software; you can redistribute it and/or modify it under 0008 // the terms of the GNU Lesser General Public License version 2.1 as published 0009 // by the Free Software Foundation, with special exception defined in the file 0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 0011 // distribution for complete text of the license and disclaimer of any warranty. 0012 // 0013 // Alternatively, this file may be used under the terms of Open CASCADE 0014 // commercial license or contractual agreement. 0015 0016 #ifndef _TopTools_MutexForShapeProvider_HeaderFile 0017 #define _TopTools_MutexForShapeProvider_HeaderFile 0018 0019 #include <TopoDS_TShape.hxx> 0020 #include <NCollection_DataMap.hxx> 0021 #include <TopAbs_ShapeEnum.hxx> 0022 0023 class Standard_Mutex; 0024 class TopoDS_Shape; 0025 0026 //! Class TopTools_MutexForShapeProvider 0027 //! This class is used to create and store mutexes associated with shapes. 0028 class TopTools_MutexForShapeProvider 0029 { 0030 public: 0031 //! Constructor 0032 Standard_EXPORT TopTools_MutexForShapeProvider(); 0033 0034 //! Destructor 0035 Standard_EXPORT ~TopTools_MutexForShapeProvider(); 0036 0037 //! Creates and associates mutexes with each sub-shape of type theType in theShape. 0038 Standard_EXPORT void CreateMutexesForSubShapes(const TopoDS_Shape& theShape, const TopAbs_ShapeEnum theType); 0039 0040 //! Creates and associates mutex with theShape 0041 Standard_EXPORT void CreateMutexForShape(const TopoDS_Shape& theShape); 0042 0043 //! Returns pointer to mutex associated with theShape. 0044 //! In case when mutex not found returns NULL. 0045 Standard_EXPORT Standard_Mutex* GetMutex(const TopoDS_Shape& theShape) const; 0046 0047 //! Removes all mutexes 0048 Standard_EXPORT void RemoveAllMutexes(); 0049 0050 private: 0051 //! This method should not be called (prohibited). 0052 TopTools_MutexForShapeProvider (const TopTools_MutexForShapeProvider &); 0053 //! This method should not be called (prohibited). 0054 TopTools_MutexForShapeProvider & operator = (const TopTools_MutexForShapeProvider &); 0055 0056 0057 NCollection_DataMap<Handle(TopoDS_TShape), Standard_Mutex *> myMap; 0058 0059 }; 0060 0061 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |