Warning, file /include/opencascade/NCollection_DefineAlloc.hxx was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef _NCollection_DefineAlloc_HeaderFile
0017 # define _NCollection_DefineAlloc_HeaderFile
0018
0019 #include <NCollection_BaseAllocator.hxx>
0020
0021
0022
0023
0024 # if defined(__BORLANDC__) || (defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x530))
0025 # define DEFINE_NCOLLECTION_ALLOC \
0026 void* operator new (size_t theSize, \
0027 const Handle(NCollection_BaseAllocator)& theAllocator) \
0028 { \
0029 return theAllocator->Allocate(theSize); \
0030 }
0031 # else
0032 # define DEFINE_NCOLLECTION_ALLOC \
0033 void* operator new (size_t theSize, \
0034 const Handle(NCollection_BaseAllocator)& theAllocator) \
0035 { \
0036 return theAllocator->Allocate(theSize); \
0037 } \
0038 void operator delete (void* theAddress, \
0039 const Handle(NCollection_BaseAllocator)& theAllocator) \
0040 { \
0041 theAllocator->Free(theAddress); \
0042 }
0043 # endif
0044
0045 #endif