// Created on: 2016-04-07 // Copyright (c) 2016 OPEN CASCADE SAS // Created by: Oleg AGASHIN // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 2.1 as published // by the Free Software Foundation, with special exception defined in the file // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT // distribution for complete text of the license and disclaimer of any warranty. // // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. #ifndef _IMeshData_Types_HeaderFile #define _IMeshData_Types_HeaderFile #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include class IMeshData_Shape; class IMeshData_Face; class IMeshData_Wire; class IMeshData_Edge; class IMeshData_Curve; class IMeshData_PCurve; class IMeshData_Model; class BRepMesh_VertexInspector; class BRepMesh_CircleInspector; #define DEFINE_INC_ALLOC \ DEFINE_NCOLLECTION_ALLOC \ void operator delete (void* /*theAddress*/) \ { \ /*it's inc allocator, nothing to do*/ \ } namespace IMeshData { //! Default size for memory block allocated by IncAllocator. /** * The idea here is that blocks of the given size are returned to the system * rather than retained in the malloc heap, at least on WIN32 and WIN64 platforms. */ #ifdef _WIN64 const size_t MEMORY_BLOCK_SIZE_HUGE = 1024 * 1024; #else const size_t MEMORY_BLOCK_SIZE_HUGE = 512 * 1024; #endif typedef IMeshData_Edge* IEdgePtr; typedef IMeshData_Face* IFacePtr; typedef Handle(IMeshData_Edge) IEdgeHandle; typedef Handle(IMeshData_Wire) IWireHandle; typedef Handle(IMeshData_Face) IFaceHandle; typedef Handle(IMeshData_Curve) ICurveHandle; typedef Handle(IMeshData_PCurve) IPCurveHandle; typedef IMeshData_ParametersListArrayAdaptor ICurveArrayAdaptor; typedef Handle(ICurveArrayAdaptor) ICurveArrayAdaptorHandle; typedef NCollection_Shared > BndBox2dTree; typedef NCollection_UBTreeFiller BndBox2dTreeFiller; // Vectors typedef NCollection_Shared > VectorOfIFaceHandles; typedef NCollection_Shared > VectorOfIWireHandles; typedef NCollection_Shared > VectorOfIEdgeHandles; typedef NCollection_Shared > VectorOfIPCurveHandles; typedef NCollection_Shared > VectorOfIEdgePtrs; typedef NCollection_Shared > VectorOfBoolean; typedef NCollection_Shared > VectorOfInteger; typedef NCollection_Shared > VectorOfOrientation; typedef NCollection_Shared > VectorOfElements; typedef NCollection_Shared > VectorOfCircle; typedef NCollection_Shared > Array1OfVertexOfDelaun; typedef NCollection_Shared > VectorOfVertex; // Sequences typedef NCollection_Shared > SequenceOfBndB2d; typedef NCollection_Shared > SequenceOfInteger; typedef NCollection_Shared > SequenceOfReal; namespace Model { typedef std::deque > SequenceOfPnt; typedef std::deque > SequenceOfPnt2d; typedef std::deque > SequenceOfReal; typedef std::deque > SequenceOfInteger; } // Lists typedef NCollection_Shared > ListOfInteger; typedef NCollection_Shared > ListOfPnt2d; typedef NCollection_Shared > ListOfIPCurves; typedef NCollection_Shared MapOfInteger; typedef TColStd_MapIteratorOfPackedMapOfInteger IteratorOfMapOfInteger; typedef NCollection_CellFilter CircleCellFilter; typedef NCollection_CellFilter VertexCellFilter; // Data Maps template struct WeakEqual { static Standard_Boolean IsEqual(const Type* theFirst, const Type* theSecond) { return (theFirst == theSecond); } //! Computes a hash code for the given pointer, in the range [1, theUpperBound] //! @param thePointer the pointer which hash code is to be computed //! @param theUpperBound the upper bound of the range a computing hash code must be within //! @return a computed hash code, in the range [1, theUpperBound] static Standard_Integer HashCode (const Type* const thePointer, Standard_Integer theUpperBound) { return ::HashCode (thePointer, theUpperBound); } }; typedef NCollection_Shared > DMapOfShapeInteger; typedef NCollection_Shared > > DMapOfIFacePtrsListOfInteger; typedef NCollection_Shared > > MapOfIEdgePtr; typedef NCollection_Shared > > MapOfIFacePtr; typedef NCollection_Shared > MapOfOrientedEdges; typedef NCollection_Shared > MapOfReal; typedef NCollection_Shared > > IDMapOfIFacePtrsListOfIPCurves; typedef NCollection_Shared > > DMapOfIFacePtrsMapOfIEdgePtrs; typedef NCollection_Shared > IDMapOfLink; typedef NCollection_Shared > DMapOfIntegerListOfInteger; typedef NCollection_Shared > MapOfIntegerInteger; typedef NCollection_Shared > IMapOfReal; typedef NCollection_Shared > Array1OfInteger; } #endif