OCC22540 Regression: Exception during building of patch by GeomPlate
[occt.git] / src / NCollection / NCollection_HeapAllocator.hxx
CommitLineData
7fd59977 1// File: NCollection_HeapAllocator.hxx
2// Created: 30.12.09 00:33
3// Author: Alexander GRIGORIEV
4// Copyright: Open Cascade 2009
5
6
7#ifndef NCollection_HeapAllocator_HeaderFile
8#define NCollection_HeapAllocator_HeaderFile
9
10#include <NCollection_BaseAllocator.hxx>
11
12class Handle_NCollection_HeapAllocator;
13
14/**
15 * Allocator that uses the global dynamic heap (malloc / free).
16 */
17
18class NCollection_HeapAllocator : public NCollection_BaseAllocator
19{
20 public:
21 // ---------- PUBLIC METHODS ----------
22 Standard_EXPORT virtual void* Allocate (const Standard_Size theSize);
23 Standard_EXPORT virtual void Free (void * anAddress);
24
25 Standard_EXPORT static const Handle_NCollection_HeapAllocator&
26 GlobalHeapAllocator();
27
28 protected:
29 //! Constructor - prohibited
30 NCollection_HeapAllocator(void) {};
31
32 private:
33 //! Copy constructor - prohibited
34 NCollection_HeapAllocator(const NCollection_HeapAllocator&);
35
36 public:
37// Declaration of CASCADE RTTI
38DEFINE_STANDARD_RTTI (NCollection_HeapAllocator)
39};
40
41// Definition of HANDLE object using Standard_DefineHandle.hxx
42DEFINE_STANDARD_HANDLE (NCollection_HeapAllocator, NCollection_BaseAllocator)
43
44#endif