mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0022815: Missing delete operator for placement new
This commit is contained in:
parent
59f45b7cef
commit
1c35b92f5f
@ -25,6 +25,9 @@
|
|||||||
#ifndef _Standard_HeaderFile
|
#ifndef _Standard_HeaderFile
|
||||||
#include <Standard.hxx>
|
#include <Standard.hxx>
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef _Standard_DefineAlloc_HeaderFile
|
||||||
|
#include <Standard_DefineAlloc.hxx>
|
||||||
|
#endif
|
||||||
#ifndef _Standard_Macro_HeaderFile
|
#ifndef _Standard_Macro_HeaderFile
|
||||||
#include <Standard_Macro.hxx>
|
#include <Standard_Macro.hxx>
|
||||||
#endif
|
#endif
|
||||||
@ -76,18 +79,7 @@ class BRepExtrema_DistShapeShape
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
void* operator new(size_t,void* anAddress)
|
DEFINE_STANDARD_ALLOC
|
||||||
{
|
|
||||||
return anAddress;
|
|
||||||
}
|
|
||||||
void* operator new(size_t size)
|
|
||||||
{
|
|
||||||
return Standard::Allocate(size);
|
|
||||||
}
|
|
||||||
void operator delete(void *anAddress)
|
|
||||||
{
|
|
||||||
if (anAddress) Standard::Free((Standard_Address&)anAddress);
|
|
||||||
}
|
|
||||||
|
|
||||||
//! create empty tool <br>
|
//! create empty tool <br>
|
||||||
Standard_EXPORT BRepExtrema_DistShapeShape();
|
Standard_EXPORT BRepExtrema_DistShapeShape();
|
||||||
|
@ -25,6 +25,9 @@
|
|||||||
#ifndef _Standard_HeaderFile
|
#ifndef _Standard_HeaderFile
|
||||||
#include <Standard.hxx>
|
#include <Standard.hxx>
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef _Standard_DefineAlloc_HeaderFile
|
||||||
|
#include <Standard_DefineAlloc.hxx>
|
||||||
|
#endif
|
||||||
#ifndef _Standard_Macro_HeaderFile
|
#ifndef _Standard_Macro_HeaderFile
|
||||||
#include <Standard_Macro.hxx>
|
#include <Standard_Macro.hxx>
|
||||||
#endif
|
#endif
|
||||||
@ -60,18 +63,7 @@ class BRepExtrema_DistanceSS
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
void* operator new(size_t,void* anAddress)
|
DEFINE_STANDARD_ALLOC
|
||||||
{
|
|
||||||
return anAddress;
|
|
||||||
}
|
|
||||||
void* operator new(size_t size)
|
|
||||||
{
|
|
||||||
return Standard::Allocate(size);
|
|
||||||
}
|
|
||||||
void operator delete(void *anAddress)
|
|
||||||
{
|
|
||||||
if (anAddress) Standard::Free((Standard_Address&)anAddress);
|
|
||||||
}
|
|
||||||
|
|
||||||
//! computes the distance between two Shapes ( face edge vertex). <br>
|
//! computes the distance between two Shapes ( face edge vertex). <br>
|
||||||
Standard_EXPORT BRepExtrema_DistanceSS(const TopoDS_Shape& S1, const TopoDS_Shape& S2,
|
Standard_EXPORT BRepExtrema_DistanceSS(const TopoDS_Shape& S1, const TopoDS_Shape& S2,
|
||||||
|
@ -9,6 +9,9 @@
|
|||||||
#ifndef _Standard_HeaderFile
|
#ifndef _Standard_HeaderFile
|
||||||
#include <Standard.hxx>
|
#include <Standard.hxx>
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef _Standard_DefineAlloc_HeaderFile
|
||||||
|
#include <Standard_DefineAlloc.hxx>
|
||||||
|
#endif
|
||||||
#ifndef _Standard_Macro_HeaderFile
|
#ifndef _Standard_Macro_HeaderFile
|
||||||
#include <Standard_Macro.hxx>
|
#include <Standard_Macro.hxx>
|
||||||
#endif
|
#endif
|
||||||
@ -37,18 +40,7 @@ class BRepExtrema_ExtCC
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
void* operator new(size_t,void* anAddress)
|
DEFINE_STANDARD_ALLOC
|
||||||
{
|
|
||||||
return anAddress;
|
|
||||||
}
|
|
||||||
void* operator new(size_t size)
|
|
||||||
{
|
|
||||||
return Standard::Allocate(size);
|
|
||||||
}
|
|
||||||
void operator delete(void *anAddress)
|
|
||||||
{
|
|
||||||
if (anAddress) Standard::Free((Standard_Address&)anAddress);
|
|
||||||
}
|
|
||||||
|
|
||||||
Standard_EXPORT BRepExtrema_ExtCC()
|
Standard_EXPORT BRepExtrema_ExtCC()
|
||||||
{
|
{
|
||||||
|
@ -9,6 +9,9 @@
|
|||||||
#ifndef _Standard_HeaderFile
|
#ifndef _Standard_HeaderFile
|
||||||
#include <Standard.hxx>
|
#include <Standard.hxx>
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef _Standard_DefineAlloc_HeaderFile
|
||||||
|
#include <Standard_DefineAlloc.hxx>
|
||||||
|
#endif
|
||||||
#ifndef _Standard_Macro_HeaderFile
|
#ifndef _Standard_Macro_HeaderFile
|
||||||
#include <Standard_Macro.hxx>
|
#include <Standard_Macro.hxx>
|
||||||
#endif
|
#endif
|
||||||
@ -53,18 +56,7 @@ class BRepExtrema_ExtCF
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
void* operator new(size_t,void* anAddress)
|
DEFINE_STANDARD_ALLOC
|
||||||
{
|
|
||||||
return anAddress;
|
|
||||||
}
|
|
||||||
void* operator new(size_t size)
|
|
||||||
{
|
|
||||||
return Standard::Allocate(size);
|
|
||||||
}
|
|
||||||
void operator delete(void *anAddress)
|
|
||||||
{
|
|
||||||
if (anAddress) Standard::Free((Standard_Address&)anAddress);
|
|
||||||
}
|
|
||||||
|
|
||||||
Standard_EXPORT BRepExtrema_ExtCF()
|
Standard_EXPORT BRepExtrema_ExtCF()
|
||||||
{
|
{
|
||||||
|
@ -9,6 +9,9 @@
|
|||||||
#ifndef _Standard_HeaderFile
|
#ifndef _Standard_HeaderFile
|
||||||
#include <Standard.hxx>
|
#include <Standard.hxx>
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef _Standard_DefineAlloc_HeaderFile
|
||||||
|
#include <Standard_DefineAlloc.hxx>
|
||||||
|
#endif
|
||||||
#ifndef _Standard_Macro_HeaderFile
|
#ifndef _Standard_Macro_HeaderFile
|
||||||
#include <Standard_Macro.hxx>
|
#include <Standard_Macro.hxx>
|
||||||
#endif
|
#endif
|
||||||
@ -47,19 +50,7 @@ class BRepExtrema_ExtFF
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
void* operator new(size_t,void* anAddress)
|
DEFINE_STANDARD_ALLOC
|
||||||
{
|
|
||||||
return anAddress;
|
|
||||||
}
|
|
||||||
void* operator new(size_t size)
|
|
||||||
{
|
|
||||||
return Standard::Allocate(size);
|
|
||||||
}
|
|
||||||
void operator delete(void *anAddress)
|
|
||||||
{
|
|
||||||
if (anAddress) Standard::Free((Standard_Address&)anAddress);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Standard_EXPORT BRepExtrema_ExtFF()
|
Standard_EXPORT BRepExtrema_ExtFF()
|
||||||
{
|
{
|
||||||
|
@ -9,6 +9,9 @@
|
|||||||
#ifndef _Standard_HeaderFile
|
#ifndef _Standard_HeaderFile
|
||||||
#include <Standard.hxx>
|
#include <Standard.hxx>
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef _Standard_DefineAlloc_HeaderFile
|
||||||
|
#include <Standard_DefineAlloc.hxx>
|
||||||
|
#endif
|
||||||
#ifndef _Standard_Macro_HeaderFile
|
#ifndef _Standard_Macro_HeaderFile
|
||||||
#include <Standard_Macro.hxx>
|
#include <Standard_Macro.hxx>
|
||||||
#endif
|
#endif
|
||||||
@ -38,19 +41,7 @@ class BRepExtrema_ExtPC
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
void* operator new(size_t,void* anAddress)
|
DEFINE_STANDARD_ALLOC
|
||||||
{
|
|
||||||
return anAddress;
|
|
||||||
}
|
|
||||||
void* operator new(size_t size)
|
|
||||||
{
|
|
||||||
return Standard::Allocate(size);
|
|
||||||
}
|
|
||||||
void operator delete(void *anAddress)
|
|
||||||
{
|
|
||||||
if (anAddress) Standard::Free((Standard_Address&)anAddress);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Standard_EXPORT BRepExtrema_ExtPC()
|
Standard_EXPORT BRepExtrema_ExtPC()
|
||||||
{
|
{
|
||||||
|
@ -25,6 +25,9 @@
|
|||||||
#ifndef _Standard_HeaderFile
|
#ifndef _Standard_HeaderFile
|
||||||
#include <Standard.hxx>
|
#include <Standard.hxx>
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef _Standard_DefineAlloc_HeaderFile
|
||||||
|
#include <Standard_DefineAlloc.hxx>
|
||||||
|
#endif
|
||||||
#ifndef _Standard_Macro_HeaderFile
|
#ifndef _Standard_Macro_HeaderFile
|
||||||
#include <Standard_Macro.hxx>
|
#include <Standard_Macro.hxx>
|
||||||
#endif
|
#endif
|
||||||
@ -65,18 +68,7 @@ class BRepExtrema_ExtPF
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
void* operator new(size_t,void* anAddress)
|
DEFINE_STANDARD_ALLOC
|
||||||
{
|
|
||||||
return anAddress;
|
|
||||||
}
|
|
||||||
void* operator new(size_t size)
|
|
||||||
{
|
|
||||||
return Standard::Allocate(size);
|
|
||||||
}
|
|
||||||
void operator delete(void *anAddress)
|
|
||||||
{
|
|
||||||
if (anAddress) Standard::Free((Standard_Address&)anAddress);
|
|
||||||
}
|
|
||||||
|
|
||||||
Standard_EXPORT BRepExtrema_ExtPF()
|
Standard_EXPORT BRepExtrema_ExtPF()
|
||||||
{}
|
{}
|
||||||
|
@ -9,6 +9,9 @@
|
|||||||
#ifndef _Standard_HeaderFile
|
#ifndef _Standard_HeaderFile
|
||||||
#include <Standard.hxx>
|
#include <Standard.hxx>
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef _Standard_DefineAlloc_HeaderFile
|
||||||
|
#include <Standard_DefineAlloc.hxx>
|
||||||
|
#endif
|
||||||
#ifndef _Standard_Macro_HeaderFile
|
#ifndef _Standard_Macro_HeaderFile
|
||||||
#include <Standard_Macro.hxx>
|
#include <Standard_Macro.hxx>
|
||||||
#endif
|
#endif
|
||||||
@ -43,20 +46,8 @@ class BRepExtrema_SolutionElem
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
void* operator new(size_t,void* anAddress)
|
DEFINE_STANDARD_ALLOC
|
||||||
{
|
|
||||||
return anAddress;
|
|
||||||
}
|
|
||||||
void* operator new(size_t size)
|
|
||||||
{
|
|
||||||
return Standard::Allocate(size);
|
|
||||||
}
|
|
||||||
void operator delete(void *anAddress)
|
|
||||||
{
|
|
||||||
if (anAddress) Standard::Free((Standard_Address&)anAddress);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Standard_EXPORT BRepExtrema_SolutionElem()
|
Standard_EXPORT BRepExtrema_SolutionElem()
|
||||||
: myDist(0.), myPoint(0.,0.,0.), mySupType(BRepExtrema_IsVertex), myPar1(0.), myPar2(0.)
|
: myDist(0.), myPoint(0.,0.,0.), mySupType(BRepExtrema_IsVertex), myPar1(0.), myPar2(0.)
|
||||||
{
|
{
|
||||||
|
@ -57,6 +57,9 @@ class gp_Pnt2d;
|
|||||||
#ifndef _Standard_HeaderFile
|
#ifndef _Standard_HeaderFile
|
||||||
#include <Standard.hxx>
|
#include <Standard.hxx>
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef _Standard_DefineAlloc_HeaderFile
|
||||||
|
#include <Standard_DefineAlloc.hxx>
|
||||||
|
#endif
|
||||||
#ifndef _Standard_Macro_HeaderFile
|
#ifndef _Standard_Macro_HeaderFile
|
||||||
#include <Standard_Macro.hxx>
|
#include <Standard_Macro.hxx>
|
||||||
#endif
|
#endif
|
||||||
@ -65,18 +68,8 @@ class BRepPrim_OneAxis {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
void* operator new(size_t,void* anAddress)
|
DEFINE_STANDARD_ALLOC
|
||||||
{
|
|
||||||
return anAddress;
|
|
||||||
}
|
|
||||||
void* operator new(size_t size)
|
|
||||||
{
|
|
||||||
return Standard::Allocate(size);
|
|
||||||
}
|
|
||||||
void operator delete(void *anAddress)
|
|
||||||
{
|
|
||||||
if (anAddress) Standard::Free((Standard_Address&)anAddress);
|
|
||||||
}
|
|
||||||
// Methods PUBLIC
|
// Methods PUBLIC
|
||||||
//
|
//
|
||||||
Standard_EXPORT virtual void Delete() ;
|
Standard_EXPORT virtual void Delete() ;
|
||||||
|
@ -64,6 +64,9 @@ class BRepSweep_SequenceNodeOfSequenceOfShapesOfNumLinearRegularSweep;
|
|||||||
#ifndef _Standard_HeaderFile
|
#ifndef _Standard_HeaderFile
|
||||||
#include <Standard.hxx>
|
#include <Standard.hxx>
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef _Standard_DefineAlloc_HeaderFile
|
||||||
|
#include <Standard_DefineAlloc.hxx>
|
||||||
|
#endif
|
||||||
#ifndef _Standard_Macro_HeaderFile
|
#ifndef _Standard_Macro_HeaderFile
|
||||||
#include <Standard_Macro.hxx>
|
#include <Standard_Macro.hxx>
|
||||||
#endif
|
#endif
|
||||||
@ -72,18 +75,8 @@ class BRepSweep_NumLinearRegularSweep {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
void* operator new(size_t,void* anAddress)
|
DEFINE_STANDARD_ALLOC
|
||||||
{
|
|
||||||
return anAddress;
|
|
||||||
}
|
|
||||||
void* operator new(size_t size)
|
|
||||||
{
|
|
||||||
return Standard::Allocate(size);
|
|
||||||
}
|
|
||||||
void operator delete(void *anAddress)
|
|
||||||
{
|
|
||||||
if (anAddress) Standard::Free((Standard_Address&)anAddress);
|
|
||||||
}
|
|
||||||
// Methods PUBLIC
|
// Methods PUBLIC
|
||||||
//
|
//
|
||||||
Standard_EXPORT virtual void Delete() ;
|
Standard_EXPORT virtual void Delete() ;
|
||||||
|
@ -38,7 +38,7 @@ DBC_VArray::DBC_VArray(const Standard_Integer Size) : DBC_BaseArray(Size)
|
|||||||
if(Size > 0) {
|
if(Size > 0) {
|
||||||
#endif
|
#endif
|
||||||
#ifdef CSFDB
|
#ifdef CSFDB
|
||||||
myData = (DBC_VArrayTNode*)StandardCSFDB_Allocate(Size * sizeof(DBC_VArrayTNode));
|
myData = (DBC_VArrayTNode*)Standard::Allocate(Size * sizeof(DBC_VArrayTNode));
|
||||||
DBC_VArrayTNode* ptrtmp = (DBC_VArrayTNode*)myData;
|
DBC_VArrayTNode* ptrtmp = (DBC_VArrayTNode*)myData;
|
||||||
for (int i = 0; i < Size; i++) {
|
for (int i = 0; i < Size; i++) {
|
||||||
ptrtmp = new((Standard_Address)ptrtmp) DBC_VArrayTNode();
|
ptrtmp = new((Standard_Address)ptrtmp) DBC_VArrayTNode();
|
||||||
@ -69,7 +69,7 @@ DBC_VArray::DBC_VArray(const DBC_VArray& Varray) : DBC_BaseArray(Varray)
|
|||||||
#ifdef CSFDB
|
#ifdef CSFDB
|
||||||
//myData = new DBC_VArrayTNode[mySize];
|
//myData = new DBC_VArrayTNode[mySize];
|
||||||
|
|
||||||
myData = (DBC_VArrayTNode*)StandardCSFDB_Allocate(mySize * sizeof(DBC_VArrayTNode));
|
myData = (DBC_VArrayTNode*)Standard::Allocate(mySize * sizeof(DBC_VArrayTNode));
|
||||||
DBC_VArrayTNode* ptrtmp = (DBC_VArrayTNode*)myData;
|
DBC_VArrayTNode* ptrtmp = (DBC_VArrayTNode*)myData;
|
||||||
|
|
||||||
for(Standard_Integer i=0; i<mySize; i++) {
|
for(Standard_Integer i=0; i<mySize; i++) {
|
||||||
@ -143,7 +143,7 @@ void DBC_VArray::Resize (const Standard_Integer NewSize)
|
|||||||
|
|
||||||
DBC_VArrayTNode* ptr = 0L;
|
DBC_VArrayTNode* ptr = 0L;
|
||||||
if(NewSize) {
|
if(NewSize) {
|
||||||
ptr = (DBC_VArrayTNode*)StandardCSFDB_Allocate(NewSize * sizeof(DBC_VArrayTNode));
|
ptr = (DBC_VArrayTNode*)Standard::Allocate(NewSize * sizeof(DBC_VArrayTNode));
|
||||||
}
|
}
|
||||||
|
|
||||||
DBC_VArrayTNode* ptrtmp = ptr;
|
DBC_VArrayTNode* ptrtmp = ptr;
|
||||||
@ -162,8 +162,7 @@ void DBC_VArray::Resize (const Standard_Integer NewSize)
|
|||||||
ptrtmp->DBC_VArrayTNode::~DBC_VArrayTNode();
|
ptrtmp->DBC_VArrayTNode::~DBC_VArrayTNode();
|
||||||
ptrtmp++;
|
ptrtmp++;
|
||||||
}
|
}
|
||||||
// StandardCSFDB_Free((Standard_Address&)myData,mySize * sizeof(DBC_VArrayTNode));
|
Standard::Free((Standard_Address&)myData);
|
||||||
StandardCSFDB_Free((Standard_Address&)myData);
|
|
||||||
} else {
|
} else {
|
||||||
for(i = 0; i < NewSize; i++) {
|
for(i = 0; i < NewSize; i++) {
|
||||||
ptrtmp = new((Standard_Address)ptrtmp) DBC_VArrayTNode();
|
ptrtmp = new((Standard_Address)ptrtmp) DBC_VArrayTNode();
|
||||||
@ -278,8 +277,7 @@ void DBC_VArray::Destroy()
|
|||||||
ptrtmp->DBC_VArrayTNode::~DBC_VArrayTNode();
|
ptrtmp->DBC_VArrayTNode::~DBC_VArrayTNode();
|
||||||
ptrtmp++;
|
ptrtmp++;
|
||||||
}
|
}
|
||||||
// StandardCSFDB_Free((Standard_Address&)myData,mySize * sizeof(DBC_VArrayTNode));
|
Standard::Free((Standard_Address&)myData);
|
||||||
StandardCSFDB_Free((Standard_Address&)myData);
|
|
||||||
myData = 0L;
|
myData = 0L;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -14,7 +14,7 @@ struct _degeneration
|
|||||||
{
|
{
|
||||||
int mode;
|
int mode;
|
||||||
float skipRatio;
|
float skipRatio;
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
};
|
};
|
||||||
typedef _degeneration DEGENERATION;
|
typedef _degeneration DEGENERATION;
|
||||||
typedef _degeneration* PDEGENERATION;
|
typedef _degeneration* PDEGENERATION;
|
||||||
@ -28,7 +28,7 @@ struct _ds_internal
|
|||||||
int model;
|
int model;
|
||||||
float skipRatio;
|
float skipRatio;
|
||||||
unsigned char* bDraw;
|
unsigned char* bDraw;
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
};
|
};
|
||||||
typedef _ds_internal DS_INTERNAL;
|
typedef _ds_internal DS_INTERNAL;
|
||||||
typedef _ds_internal* PDS_INTERNAL;
|
typedef _ds_internal* PDS_INTERNAL;
|
||||||
|
@ -14,45 +14,14 @@ for InterfaceGraphic_Parray.hxx definitions
|
|||||||
#define INTERFACEGRAPHIC_TELEM_H
|
#define INTERFACEGRAPHIC_TELEM_H
|
||||||
|
|
||||||
#include <Standard.hxx>
|
#include <Standard.hxx>
|
||||||
|
#include <Standard_DefineAlloc.hxx>
|
||||||
#include <InterfaceGraphic_tgl_all.hxx>
|
#include <InterfaceGraphic_tgl_all.hxx>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
//if SUN compiler
|
|
||||||
#if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x530) && ! defined(typename)
|
|
||||||
#define IMPLEMENT_MEMORY_OPERATORS \
|
|
||||||
void* operator new (size_t size) {\
|
|
||||||
void* p = malloc( size );\
|
|
||||||
memset(p, 0, size);\
|
|
||||||
return p;\
|
|
||||||
}\
|
|
||||||
void operator delete(void* p) {\
|
|
||||||
free( p );\
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
//if other
|
|
||||||
#define IMPLEMENT_MEMORY_OPERATORS \
|
|
||||||
void* operator new (size_t size) {\
|
|
||||||
void* p = malloc( size );\
|
|
||||||
memset(p, 0, size);\
|
|
||||||
return p;\
|
|
||||||
}\
|
|
||||||
void* operator new[] (size_t size) {\
|
|
||||||
void* p = malloc( size );\
|
|
||||||
memset(p, 0, size);\
|
|
||||||
return p;\
|
|
||||||
}\
|
|
||||||
void operator delete(void* p) { \
|
|
||||||
free( p );\
|
|
||||||
}\
|
|
||||||
void operator delete[](void* p) {\
|
|
||||||
free( p );\
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct TEL_TEXTURE_COORD
|
struct TEL_TEXTURE_COORD
|
||||||
{
|
{
|
||||||
float xy[2];
|
float xy[2];
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef TEL_TEXTURE_COORD* tel_texture_coord;
|
typedef TEL_TEXTURE_COORD* tel_texture_coord;
|
||||||
@ -60,23 +29,7 @@ typedef TEL_TEXTURE_COORD* tel_texture_coord;
|
|||||||
struct TEL_POINT
|
struct TEL_POINT
|
||||||
{
|
{
|
||||||
float xyz[3];
|
float xyz[3];
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
/*void* operator new (size_t size) {
|
|
||||||
void* p = malloc( size );
|
|
||||||
memset(p, 0, size);
|
|
||||||
return p;
|
|
||||||
}
|
|
||||||
void* operator new[] (size_t size) {
|
|
||||||
void* p = malloc( size );
|
|
||||||
memset(p, 0, size);
|
|
||||||
return p;
|
|
||||||
}
|
|
||||||
void operator delete(void* p) {
|
|
||||||
free( p );
|
|
||||||
}
|
|
||||||
void operator delete[](void* p) {
|
|
||||||
free( p );
|
|
||||||
}*/
|
|
||||||
};
|
};
|
||||||
typedef TEL_POINT* tel_point;
|
typedef TEL_POINT* tel_point;
|
||||||
|
|
||||||
@ -84,7 +37,7 @@ struct TEL_COLOUR
|
|||||||
{
|
{
|
||||||
/* OCC8854: san -- number of color components increased to include alpha value */
|
/* OCC8854: san -- number of color components increased to include alpha value */
|
||||||
float rgb[4];
|
float rgb[4];
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
};
|
};
|
||||||
typedef TEL_COLOUR* tel_colour;
|
typedef TEL_COLOUR* tel_colour;
|
||||||
|
|
||||||
@ -92,7 +45,7 @@ struct TEL_POINT_DATA
|
|||||||
{
|
{
|
||||||
int num;
|
int num;
|
||||||
TEL_POINT* data;
|
TEL_POINT* data;
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
};
|
};
|
||||||
typedef TEL_POINT_DATA* tel_point_data;
|
typedef TEL_POINT_DATA* tel_point_data;
|
||||||
|
|
||||||
@ -100,7 +53,7 @@ struct TEL_TINT_DATA
|
|||||||
{
|
{
|
||||||
int num;
|
int num;
|
||||||
int* data;
|
int* data;
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
};
|
};
|
||||||
typedef TEL_TINT_DATA* tel_tint_data;
|
typedef TEL_TINT_DATA* tel_tint_data;
|
||||||
|
|
||||||
@ -108,7 +61,7 @@ struct TEL_MATRIX3_DATA
|
|||||||
{
|
{
|
||||||
TComposeType mode;
|
TComposeType mode;
|
||||||
Tmatrix3 mat;
|
Tmatrix3 mat;
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
};
|
};
|
||||||
typedef TEL_MATRIX3_DATA* tel_matrix3_data;
|
typedef TEL_MATRIX3_DATA* tel_matrix3_data;
|
||||||
|
|
||||||
@ -116,7 +69,7 @@ struct TEL_ALIGN_DATA
|
|||||||
{
|
{
|
||||||
Tint Hmode;
|
Tint Hmode;
|
||||||
Tint Vmode;
|
Tint Vmode;
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
};
|
};
|
||||||
typedef TEL_ALIGN_DATA* tel_align_data;
|
typedef TEL_ALIGN_DATA* tel_align_data;
|
||||||
|
|
||||||
@ -149,7 +102,7 @@ struct TEL_SURF_PROP
|
|||||||
int isamb, isdiff, isspec, isemsv;
|
int isamb, isdiff, isspec, isemsv;
|
||||||
int isphysic;
|
int isphysic;
|
||||||
TEL_COLOUR speccol, difcol, ambcol, emscol, matcol;
|
TEL_COLOUR speccol, difcol, ambcol, emscol, matcol;
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
};
|
};
|
||||||
typedef TEL_SURF_PROP* tel_surf_prop;
|
typedef TEL_SURF_PROP* tel_surf_prop;
|
||||||
|
|
||||||
@ -304,7 +257,7 @@ struct TEL_POFFSET_PARAM
|
|||||||
int mode;
|
int mode;
|
||||||
float factor;
|
float factor;
|
||||||
float units;
|
float units;
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
};
|
};
|
||||||
typedef TEL_POFFSET_PARAM* tel_poffset_param;
|
typedef TEL_POFFSET_PARAM* tel_poffset_param;
|
||||||
/* OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets */
|
/* OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets */
|
||||||
@ -316,7 +269,7 @@ struct TEL_TRANSFORM_PERSISTENCE
|
|||||||
float pointX;
|
float pointX;
|
||||||
float pointY;
|
float pointY;
|
||||||
float pointZ;
|
float pointZ;
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
};
|
};
|
||||||
typedef TEL_TRANSFORM_PERSISTENCE* tel_transform_persistence;
|
typedef TEL_TRANSFORM_PERSISTENCE* tel_transform_persistence;
|
||||||
/* ABD 29/10/04 Transform Persistence of Presentation( pan, zoom, rotate ) */
|
/* ABD 29/10/04 Transform Persistence of Presentation( pan, zoom, rotate ) */
|
||||||
|
@ -7,11 +7,6 @@
|
|||||||
#include <LDOM_BasicAttribute.hxx>
|
#include <LDOM_BasicAttribute.hxx>
|
||||||
#include <LDOM_MemManager.hxx>
|
#include <LDOM_MemManager.hxx>
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
// Disable the warning: "operator new unmatched by delete"
|
|
||||||
#pragma warning (disable:4291)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : LDOM_BasicAttribute
|
//function : LDOM_BasicAttribute
|
||||||
//purpose :
|
//purpose :
|
||||||
|
@ -15,20 +15,12 @@ class LDOM_Element;
|
|||||||
class LDOM_Attr;
|
class LDOM_Attr;
|
||||||
class LDOM_Node;
|
class LDOM_Node;
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
// Disable the warning: "operator new unmatched by delete"
|
|
||||||
#pragma warning (push)
|
|
||||||
#pragma warning (disable:4291)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Class LDOM_BasicAttribute
|
// Class LDOM_BasicAttribute
|
||||||
//
|
//
|
||||||
|
|
||||||
class LDOM_BasicAttribute : public LDOM_BasicNode
|
class LDOM_BasicAttribute : public LDOM_BasicNode
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
void * operator new (size_t, void * anAddress) { return anAddress; }
|
|
||||||
|
|
||||||
// ---------- PUBLIC METHODS ----------
|
// ---------- PUBLIC METHODS ----------
|
||||||
|
|
||||||
LDOM_BasicAttribute () : LDOM_BasicNode (LDOM_Node::UNKNOWN) {}
|
LDOM_BasicAttribute () : LDOM_BasicNode (LDOM_Node::UNKNOWN) {}
|
||||||
@ -72,8 +64,4 @@ class LDOM_BasicAttribute : public LDOM_BasicNode
|
|||||||
LDOMBasicString myValue;
|
LDOMBasicString myValue;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
#pragma warning (pop)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -9,11 +9,6 @@
|
|||||||
#include <LDOM_BasicText.hxx>
|
#include <LDOM_BasicText.hxx>
|
||||||
#include <LDOM_MemManager.hxx>
|
#include <LDOM_MemManager.hxx>
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
// Disable the warning: "operator new unmatched by delete"
|
|
||||||
#pragma warning (disable:4291)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Create
|
//function : Create
|
||||||
//purpose : construction in the Document's data pool
|
//purpose : construction in the Document's data pool
|
||||||
|
@ -17,19 +17,12 @@ class LDOM_NodeList;
|
|||||||
class LDOM_Element;
|
class LDOM_Element;
|
||||||
class LDOM_BasicAttribute;
|
class LDOM_BasicAttribute;
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
// Disable the warning: "operator new unmatched by delete"
|
|
||||||
#pragma warning (push)
|
|
||||||
#pragma warning (disable:4291)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Class LDOM_BasicElement
|
// Class LDOM_BasicElement
|
||||||
//
|
//
|
||||||
|
|
||||||
class LDOM_BasicElement : public LDOM_BasicNode
|
class LDOM_BasicElement : public LDOM_BasicNode
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
void * operator new (size_t, void * anAddress) { return anAddress; }
|
|
||||||
|
|
||||||
// ---------- PUBLIC METHODS ----------
|
// ---------- PUBLIC METHODS ----------
|
||||||
|
|
||||||
@ -128,8 +121,4 @@ class LDOM_BasicElement : public LDOM_BasicNode
|
|||||||
LDOM_BasicNode * myFirstChild;
|
LDOM_BasicNode * myFirstChild;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
#pragma warning (pop)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -18,6 +18,9 @@ class LDOMParser;
|
|||||||
|
|
||||||
class LDOM_BasicNode
|
class LDOM_BasicNode
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
|
DEFINE_STANDARD_ALLOC
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
Standard_Boolean isNull () const {return myNodeType ==LDOM_Node::UNKNOWN;}
|
Standard_Boolean isNull () const {return myNodeType ==LDOM_Node::UNKNOWN;}
|
||||||
|
@ -8,11 +8,6 @@
|
|||||||
#include <LDOM_BasicText.hxx>
|
#include <LDOM_BasicText.hxx>
|
||||||
#include <LDOM_MemManager.hxx>
|
#include <LDOM_MemManager.hxx>
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
// Disable the warning: "operator new unmatched by delete"
|
|
||||||
#pragma warning (disable:4291)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : LDOM_BasicText()
|
//function : LDOM_BasicText()
|
||||||
//purpose : Constructor
|
//purpose : Constructor
|
||||||
|
@ -15,19 +15,12 @@ class LDOM_CharacterData;
|
|||||||
class LDOMParser;
|
class LDOMParser;
|
||||||
class LDOM_BasicElement;
|
class LDOM_BasicElement;
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
// Disable the warning: "operator new unmatched by delete"
|
|
||||||
#pragma warning (push)
|
|
||||||
#pragma warning (disable:4291)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Class LDOM_BasicText
|
// Class LDOM_BasicText
|
||||||
//
|
//
|
||||||
|
|
||||||
class LDOM_BasicText : public LDOM_BasicNode
|
class LDOM_BasicText : public LDOM_BasicNode
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
void * operator new (size_t, void * anAddress) { return anAddress; }
|
|
||||||
|
|
||||||
// ---------- PUBLIC METHODS ----------
|
// ---------- PUBLIC METHODS ----------
|
||||||
|
|
||||||
@ -69,8 +62,4 @@ class LDOM_BasicText : public LDOM_BasicNode
|
|||||||
LDOMBasicString myValue;
|
LDOMBasicString myValue;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
#pragma warning (pop)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -79,6 +79,6 @@ NCollection_Comparator.hxx
|
|||||||
NCollection_QuickSort.hxx
|
NCollection_QuickSort.hxx
|
||||||
|
|
||||||
NCollection_Haft.h
|
NCollection_Haft.h
|
||||||
|
NCollection_DefaultHasher.hxx
|
||||||
|
NCollection_DefineAlloc.hxx
|
||||||
|
|
||||||
|
|
||||||
NCollection_DefaultHasher.hxx
|
|
@ -15,12 +15,6 @@
|
|||||||
|
|
||||||
#include <NCollection_BaseCollection.hxx>
|
#include <NCollection_BaseCollection.hxx>
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
// Disable the warning "operator new unmatched by delete"
|
|
||||||
#pragma warning (push)
|
|
||||||
#pragma warning (disable:4291)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// *********************************************** Template for Array1 class
|
// *********************************************** Template for Array1 class
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -86,10 +80,6 @@ template <class TheItemType> class NCollection_Array1
|
|||||||
//! Variable value access
|
//! Variable value access
|
||||||
virtual TheItemType& ChangeValue (void) const
|
virtual TheItemType& ChangeValue (void) const
|
||||||
{ return myArray->ChangeValue(myCurrent); }
|
{ return myArray->ChangeValue(myCurrent); }
|
||||||
//! Operator new for allocating iterators
|
|
||||||
void* operator new(size_t theSize,
|
|
||||||
const Handle(NCollection_BaseAllocator)& theAllocator)
|
|
||||||
{ return theAllocator->Allocate(theSize); }
|
|
||||||
private:
|
private:
|
||||||
Standard_Integer myCurrent; //!< Index of the current item
|
Standard_Integer myCurrent; //!< Index of the current item
|
||||||
NCollection_Array1* myArray; //!< Pointer to the array being iterated
|
NCollection_Array1* myArray; //!< Pointer to the array being iterated
|
||||||
@ -277,8 +267,4 @@ template <class TheItemType> class NCollection_Array1
|
|||||||
TheItemType* myData; //!< Pointer to '0'th array item
|
TheItemType* myData; //!< Pointer to '0'th array item
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
#pragma warning (pop)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -15,11 +15,6 @@
|
|||||||
|
|
||||||
#include <NCollection_BaseCollection.hxx>
|
#include <NCollection_BaseCollection.hxx>
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
// Disable the warning "operator new unmatched by delete"
|
|
||||||
#pragma warning (disable:4291)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// *********************************************** Template for Array2 class
|
// *********************************************** Template for Array2 class
|
||||||
/**
|
/**
|
||||||
* Purpose: The class Array2 represents bi-dimensional arrays
|
* Purpose: The class Array2 represents bi-dimensional arrays
|
||||||
@ -70,10 +65,6 @@ template <class TheItemType> class NCollection_Array2
|
|||||||
//! Variable value access
|
//! Variable value access
|
||||||
virtual TheItemType& ChangeValue (void) const
|
virtual TheItemType& ChangeValue (void) const
|
||||||
{ return myArray->myStart[myCurrent]; }
|
{ return myArray->myStart[myCurrent]; }
|
||||||
//! Operator new for allocating iterators
|
|
||||||
void* operator new(size_t theSize,
|
|
||||||
const Handle(NCollection_BaseAllocator)& theAllocator)
|
|
||||||
{ return theAllocator->Allocate(theSize); }
|
|
||||||
private:
|
private:
|
||||||
Standard_Integer myCurrent; //!< Index of the current item
|
Standard_Integer myCurrent; //!< Index of the current item
|
||||||
Standard_Integer mySize; //!< Total amount of items
|
Standard_Integer mySize; //!< Total amount of items
|
||||||
@ -316,8 +307,4 @@ template <class TheItemType> class NCollection_Array2
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
#pragma warning (default:4291)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
#define NCollection_BaseCollection_HeaderFile
|
#define NCollection_BaseCollection_HeaderFile
|
||||||
|
|
||||||
#include <NCollection_IncAllocator.hxx>
|
#include <NCollection_IncAllocator.hxx>
|
||||||
|
#include <NCollection_DefineAlloc.hxx>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Purpose: NCollection_BaseCollection is the base abstract class for
|
* Purpose: NCollection_BaseCollection is the base abstract class for
|
||||||
@ -45,6 +46,9 @@ template<class TheItemType> class NCollection_BaseCollection
|
|||||||
virtual const TheItemType& Value(void) const=0;
|
virtual const TheItemType& Value(void) const=0;
|
||||||
//! Value change access
|
//! Value change access
|
||||||
virtual TheItemType& ChangeValue(void) const=0;
|
virtual TheItemType& ChangeValue(void) const=0;
|
||||||
|
public:
|
||||||
|
DEFINE_STANDARD_ALLOC
|
||||||
|
DEFINE_NCOLLECTION_ALLOC
|
||||||
protected:
|
protected:
|
||||||
//! Empty constructor
|
//! Empty constructor
|
||||||
Iterator (void) {}
|
Iterator (void) {}
|
||||||
|
@ -20,11 +20,6 @@
|
|||||||
#include <Standard_NoSuchObject.hxx>
|
#include <Standard_NoSuchObject.hxx>
|
||||||
#include <NCollection_ListNode.hxx>
|
#include <NCollection_ListNode.hxx>
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
// Disable the warning "operator new unmatched by delete"
|
|
||||||
#pragma warning (disable:4291)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef void (* NCollection_DelListNode)
|
typedef void (* NCollection_DelListNode)
|
||||||
(NCollection_ListNode*, Handle(NCollection_BaseAllocator)& theAl);
|
(NCollection_ListNode*, Handle(NCollection_BaseAllocator)& theAl);
|
||||||
|
|
||||||
|
@ -16,11 +16,6 @@
|
|||||||
#include <NCollection_BaseAllocator.hxx>
|
#include <NCollection_BaseAllocator.hxx>
|
||||||
#include <NCollection_ListNode.hxx>
|
#include <NCollection_ListNode.hxx>
|
||||||
|
|
||||||
//#ifdef WNT
|
|
||||||
//// Disable the warning "operator new unmatched by delete"
|
|
||||||
//#pragma warning (disable:4291)
|
|
||||||
//#endif
|
|
||||||
|
|
||||||
typedef void (* NCollection_DelMapNode)
|
typedef void (* NCollection_DelMapNode)
|
||||||
(NCollection_ListNode*, Handle(NCollection_BaseAllocator)& theAl);
|
(NCollection_ListNode*, Handle(NCollection_BaseAllocator)& theAl);
|
||||||
|
|
||||||
|
@ -11,12 +11,7 @@
|
|||||||
#include <NCollection_Map.hxx>
|
#include <NCollection_Map.hxx>
|
||||||
#include <NCollection_DataMap.hxx>
|
#include <NCollection_DataMap.hxx>
|
||||||
#include <NCollection_BaseAllocator.hxx>
|
#include <NCollection_BaseAllocator.hxx>
|
||||||
|
#include <NCollection_TypeDef.hxx>
|
||||||
// work-around for obsolete SUN WorkShop 5.3 compiler
|
|
||||||
// which does not recognize typename keyword
|
|
||||||
#if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x530) && ! defined(typename)
|
|
||||||
#define typename
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//! Auxiliary enumeration serving as responce from method Inspect
|
//! Auxiliary enumeration serving as responce from method Inspect
|
||||||
enum NCollection_CellFilter_Action
|
enum NCollection_CellFilter_Action
|
||||||
@ -109,8 +104,8 @@ template <class Inspector>
|
|||||||
class NCollection_CellFilter
|
class NCollection_CellFilter
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef typename Inspector::Target Target;
|
typedef TYPENAME Inspector::Target Target;
|
||||||
typedef typename Inspector::Point Point;
|
typedef TYPENAME Inspector::Point Point;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
@ -15,12 +15,6 @@
|
|||||||
#include <Standard_TypeMismatch.hxx>
|
#include <Standard_TypeMismatch.hxx>
|
||||||
#include <Standard_NoSuchObject.hxx>
|
#include <Standard_NoSuchObject.hxx>
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
// Disable the warning "operator new unmatched by delete"
|
|
||||||
#pragma warning (push)
|
|
||||||
#pragma warning (disable:4291)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Purpose: The DataMap is a Map to store keys with associated
|
* Purpose: The DataMap is a Map to store keys with associated
|
||||||
* Items. See Map from NCollection for a discussion
|
* Items. See Map from NCollection for a discussion
|
||||||
@ -119,10 +113,6 @@ template < class TheKeyType,
|
|||||||
#endif
|
#endif
|
||||||
return ((DataMapNode *) myNode)->Key();
|
return ((DataMapNode *) myNode)->Key();
|
||||||
}
|
}
|
||||||
//! Operator new for allocating iterators
|
|
||||||
void* operator new(size_t theSize,
|
|
||||||
const Handle(NCollection_BaseAllocator)& theAllocator)
|
|
||||||
{ return theAllocator->Allocate(theSize); }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -342,9 +332,5 @@ template < class TheKeyType,
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
#pragma warning (pop)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
33
src/NCollection/NCollection_DefineAlloc.hxx
Normal file
33
src/NCollection/NCollection_DefineAlloc.hxx
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
// File: Standard_DefineAlloc.hxx
|
||||||
|
// Created: Jan 19 14:15:16 2012
|
||||||
|
// Author: Dmitry BOBYLEV
|
||||||
|
// Copyright: Open CASCADE SAS 2012
|
||||||
|
|
||||||
|
#ifndef _NCollection_DefineAlloc_HeaderFile
|
||||||
|
# define _NCollection_DefineAlloc_HeaderFile
|
||||||
|
|
||||||
|
// Macro to overload placement new and delete operators for NCollection allocators.
|
||||||
|
// For Borland C and old SUN compilers do not define placement delete
|
||||||
|
// as it is not supported.
|
||||||
|
# if defined(__BORLANDC__) || (defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x530))
|
||||||
|
# define DEFINE_NCOLLECTION_ALLOC \
|
||||||
|
void* operator new (size_t theSize, \
|
||||||
|
const Handle(NCollection_BaseAllocator)& theAllocator) \
|
||||||
|
{ \
|
||||||
|
return theAllocator->Allocate(theSize); \
|
||||||
|
}
|
||||||
|
# else
|
||||||
|
# define DEFINE_NCOLLECTION_ALLOC \
|
||||||
|
void* operator new (size_t theSize, \
|
||||||
|
const Handle(NCollection_BaseAllocator)& theAllocator) \
|
||||||
|
{ \
|
||||||
|
return theAllocator->Allocate(theSize); \
|
||||||
|
} \
|
||||||
|
void operator delete (void* theAddress, \
|
||||||
|
const Handle(NCollection_BaseAllocator)& theAllocator) \
|
||||||
|
{ \
|
||||||
|
theAllocator->Free(theAddress); \
|
||||||
|
}
|
||||||
|
# endif
|
||||||
|
|
||||||
|
#endif
|
@ -39,11 +39,6 @@
|
|||||||
#include <NCollection_DefineBaseCollection.hxx>
|
#include <NCollection_DefineBaseCollection.hxx>
|
||||||
#include <NCollection_Array1.hxx>
|
#include <NCollection_Array1.hxx>
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
// Disable the warning "operator new unmatched by delete"
|
|
||||||
#pragma warning (disable:4291)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// *********************************************** Template for Array1 class
|
// *********************************************** Template for Array1 class
|
||||||
|
|
||||||
#define DEFINE_ARRAY1(_ClassName_, _BaseCollection_, TheItemType) \
|
#define DEFINE_ARRAY1(_ClassName_, _BaseCollection_, TheItemType) \
|
||||||
|
@ -23,11 +23,6 @@
|
|||||||
#include <NCollection_DefineBaseCollection.hxx>
|
#include <NCollection_DefineBaseCollection.hxx>
|
||||||
#include <NCollection_Array2.hxx>
|
#include <NCollection_Array2.hxx>
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
// Disable the warning "operator new unmatched by delete"
|
|
||||||
#pragma warning (disable:4291)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// *********************************************** Template for Array2 class
|
// *********************************************** Template for Array2 class
|
||||||
|
|
||||||
#define DEFINE_ARRAY2(_ClassName_, _BaseCollection_, TheItemType) \
|
#define DEFINE_ARRAY2(_ClassName_, _BaseCollection_, TheItemType) \
|
||||||
|
@ -26,11 +26,6 @@
|
|||||||
#include <NCollection_DefineBaseCollection.hxx>
|
#include <NCollection_DefineBaseCollection.hxx>
|
||||||
#include <NCollection_DataMap.hxx>
|
#include <NCollection_DataMap.hxx>
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
// Disable the warning "operator new unmatched by delete"
|
|
||||||
#pragma warning (disable:4291)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// *********************************************** Class DataMap *************
|
// *********************************************** Class DataMap *************
|
||||||
|
|
||||||
#define DEFINE_DATAMAP(_ClassName_, _BaseCollection_, TheKeyType, TheItemType) \
|
#define DEFINE_DATAMAP(_ClassName_, _BaseCollection_, TheKeyType, TheItemType) \
|
||||||
|
@ -16,11 +16,6 @@
|
|||||||
#include <NCollection_DefineBaseCollection.hxx>
|
#include <NCollection_DefineBaseCollection.hxx>
|
||||||
#include <NCollection_DoubleMap.hxx>
|
#include <NCollection_DoubleMap.hxx>
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
// Disable the warning "operator new unmatched by delete"
|
|
||||||
#pragma warning (disable:4291)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// *********************************************** Class DoubleMap ************
|
// *********************************************** Class DoubleMap ************
|
||||||
|
|
||||||
#define DEFINE_DOUBLEMAP(_ClassName_, _BaseCollection_, TheKey1Type, TheKey2Type) \
|
#define DEFINE_DOUBLEMAP(_ClassName_, _BaseCollection_, TheKey1Type, TheKey2Type) \
|
||||||
|
@ -27,11 +27,6 @@
|
|||||||
#include <NCollection_DefineBaseCollection.hxx>
|
#include <NCollection_DefineBaseCollection.hxx>
|
||||||
#include <NCollection_IndexedDataMap.hxx>
|
#include <NCollection_IndexedDataMap.hxx>
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
// Disable the warning "operator new unmatched by delete"
|
|
||||||
#pragma warning (disable:4291)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// *********************************************** Class IndexedDataMap ******
|
// *********************************************** Class IndexedDataMap ******
|
||||||
|
|
||||||
#define DEFINE_INDEXEDDATAMAP(_ClassName_, _BaseCollection_, TheKeyType, TheItemType) \
|
#define DEFINE_INDEXEDDATAMAP(_ClassName_, _BaseCollection_, TheKeyType, TheItemType) \
|
||||||
|
@ -19,11 +19,6 @@
|
|||||||
#include <NCollection_DefineBaseCollection.hxx>
|
#include <NCollection_DefineBaseCollection.hxx>
|
||||||
#include <NCollection_IndexedMap.hxx>
|
#include <NCollection_IndexedMap.hxx>
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
// Disable the warning "operator new unmatched by delete"
|
|
||||||
#pragma warning (disable:4291)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// *********************************************** Class IndexedMap ***********
|
// *********************************************** Class IndexedMap ***********
|
||||||
|
|
||||||
#define DEFINE_INDEXEDMAP(_ClassName_, _BaseCollection_, TheKeyType) \
|
#define DEFINE_INDEXEDMAP(_ClassName_, _BaseCollection_, TheKeyType) \
|
||||||
|
@ -16,11 +16,6 @@
|
|||||||
|
|
||||||
#include <NCollection_List.hxx>
|
#include <NCollection_List.hxx>
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
// Disable the warning "operator new unmatched by delete"
|
|
||||||
#pragma warning (disable:4291)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// **************************************** Template for List class ********
|
// **************************************** Template for List class ********
|
||||||
|
|
||||||
#define DEFINE_LIST(_ClassName_, _BaseCollection_, TheItemType) \
|
#define DEFINE_LIST(_ClassName_, _BaseCollection_, TheItemType) \
|
||||||
|
@ -36,11 +36,6 @@
|
|||||||
#include <NCollection_DefineBaseCollection.hxx>
|
#include <NCollection_DefineBaseCollection.hxx>
|
||||||
#include <NCollection_Map.hxx>
|
#include <NCollection_Map.hxx>
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
// Disable the warning "operator new unmatched by delete"
|
|
||||||
#pragma warning (disable:4291)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// *********************************************** Class Map *****************
|
// *********************************************** Class Map *****************
|
||||||
|
|
||||||
#define DEFINE_MAP(_ClassName_, _BaseCollection_, TheKeyType) \
|
#define DEFINE_MAP(_ClassName_, _BaseCollection_, TheKeyType) \
|
||||||
|
@ -18,11 +18,6 @@
|
|||||||
|
|
||||||
#include <NCollection_Queue.hxx>
|
#include <NCollection_Queue.hxx>
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
// Disable the warning "operator new unmatched by delete"
|
|
||||||
#pragma warning (disable:4291)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// **************************************** Template for Queue class ********
|
// **************************************** Template for Queue class ********
|
||||||
|
|
||||||
#define DEFINE_QUEUE(_ClassName_, _BaseCollection_, TheItemType) \
|
#define DEFINE_QUEUE(_ClassName_, _BaseCollection_, TheItemType) \
|
||||||
|
@ -43,11 +43,6 @@
|
|||||||
#include <NCollection_DefineBaseCollection.hxx>
|
#include <NCollection_DefineBaseCollection.hxx>
|
||||||
#include <NCollection_SList.hxx>
|
#include <NCollection_SList.hxx>
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
// Disable the warning "operator new unmatched by delete"
|
|
||||||
#pragma warning (disable:4291)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// **************************************** Template for SList class ********
|
// **************************************** Template for SList class ********
|
||||||
|
|
||||||
#define DEFINE_SLIST(_ClassName_, _BaseCollection_, TheItemType) \
|
#define DEFINE_SLIST(_ClassName_, _BaseCollection_, TheItemType) \
|
||||||
|
@ -15,11 +15,6 @@
|
|||||||
#include <NCollection_DefineBaseCollection.hxx>
|
#include <NCollection_DefineBaseCollection.hxx>
|
||||||
#include <NCollection_Sequence.hxx>
|
#include <NCollection_Sequence.hxx>
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
// Disable the warning "operator new unmatched by delete"
|
|
||||||
#pragma warning (disable:4291)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// **************************************** Template for Sequence class ********
|
// **************************************** Template for Sequence class ********
|
||||||
|
|
||||||
#define DEFINE_SEQUENCE(_ClassName_, _BaseCollection_, TheItemType) \
|
#define DEFINE_SEQUENCE(_ClassName_, _BaseCollection_, TheItemType) \
|
||||||
|
@ -18,11 +18,6 @@
|
|||||||
#include <NCollection_DefineBaseCollection.hxx>
|
#include <NCollection_DefineBaseCollection.hxx>
|
||||||
#include <NCollection_Set.hxx>
|
#include <NCollection_Set.hxx>
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
// Disable the warning "operator new unmatched by delete"
|
|
||||||
#pragma warning (disable:4291)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// **************************************** Template for Set class ********
|
// **************************************** Template for Set class ********
|
||||||
|
|
||||||
#define DEFINE_SET(_ClassName_, _BaseCollection_, TheItemType) \
|
#define DEFINE_SET(_ClassName_, _BaseCollection_, TheItemType) \
|
||||||
|
@ -19,11 +19,6 @@
|
|||||||
#include <NCollection_DefineBaseCollection.hxx>
|
#include <NCollection_DefineBaseCollection.hxx>
|
||||||
#include <NCollection_Stack.hxx>
|
#include <NCollection_Stack.hxx>
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
// Disable the warning "operator new unmatched by delete"
|
|
||||||
#pragma warning (disable:4291)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// **************************************** Template for Stack class ********
|
// **************************************** Template for Stack class ********
|
||||||
|
|
||||||
#define DEFINE_STACK(_ClassName_, _BaseCollection_, TheItemType) \
|
#define DEFINE_STACK(_ClassName_, _BaseCollection_, TheItemType) \
|
||||||
|
@ -14,11 +14,6 @@
|
|||||||
#include <NCollection_DefineBaseCollection.hxx>
|
#include <NCollection_DefineBaseCollection.hxx>
|
||||||
#include <NCollection_TListIterator.hxx>
|
#include <NCollection_TListIterator.hxx>
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
// Disable the warning "operator new unmatched by delete"
|
|
||||||
#pragma warning (disable:4291)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ********************************** Implementation of the Iterator interface
|
// ********************************** Implementation of the Iterator interface
|
||||||
#define DEFINE_TLISTITERATOR(_ClassName_, _BaseCollection_, TheItemType) \
|
#define DEFINE_TLISTITERATOR(_ClassName_, _BaseCollection_, TheItemType) \
|
||||||
typedef NCollection_TListIterator<TheItemType > _ClassName_;
|
typedef NCollection_TListIterator<TheItemType > _ClassName_;
|
||||||
|
@ -12,11 +12,6 @@
|
|||||||
|
|
||||||
#include <NCollection_TListNode.hxx>
|
#include <NCollection_TListNode.hxx>
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
// Disable the warning "operator new unmatched by delete"
|
|
||||||
#pragma warning (disable:4291)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ******************************* Class defining list node - for internal use
|
// ******************************* Class defining list node - for internal use
|
||||||
#define DEFINE_TLISTNODE(_ClassName_, _BaseCollection_, TheItemType) \
|
#define DEFINE_TLISTNODE(_ClassName_, _BaseCollection_, TheItemType) \
|
||||||
typedef NCollection_TListNode<TheItemType > _ClassName_;
|
typedef NCollection_TListNode<TheItemType > _ClassName_;
|
||||||
|
@ -11,11 +11,6 @@
|
|||||||
#include <NCollection_DefineBaseCollection.hxx>
|
#include <NCollection_DefineBaseCollection.hxx>
|
||||||
#include <NCollection_Vector.hxx>
|
#include <NCollection_Vector.hxx>
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
// Disable the warning: "operator new unmatched by delete"
|
|
||||||
#pragma warning (disable:4291)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Class NCollection_Vector (dynamic array of objects)
|
// Class NCollection_Vector (dynamic array of objects)
|
||||||
//
|
//
|
||||||
// This class is similar to NCollection_Array1 though the indices always start
|
// This class is similar to NCollection_Array1 though the indices always start
|
||||||
|
@ -17,12 +17,6 @@
|
|||||||
|
|
||||||
#include <NCollection_DefaultHasher.hxx>
|
#include <NCollection_DefaultHasher.hxx>
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
// Disable the warning "operator new unmatched by delete"
|
|
||||||
#pragma warning (push)
|
|
||||||
#pragma warning (disable:4291)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Purpose: The DoubleMap is used to bind pairs (Key1,Key2)
|
* Purpose: The DoubleMap is used to bind pairs (Key1,Key2)
|
||||||
* and retrieve them in linear time.
|
* and retrieve them in linear time.
|
||||||
@ -128,10 +122,6 @@ template < class TheKey1Type,
|
|||||||
Standard_ImmutableObject::Raise("NCollection_DoubleMap::Iterator::ChangeValue");
|
Standard_ImmutableObject::Raise("NCollection_DoubleMap::Iterator::ChangeValue");
|
||||||
return * (TheKey2Type *) NULL; // For compiler
|
return * (TheKey2Type *) NULL; // For compiler
|
||||||
}
|
}
|
||||||
//! Operator new for allocating iterators
|
|
||||||
void* operator new(size_t theSize,
|
|
||||||
const Handle(NCollection_BaseAllocator)& theAllocator)
|
|
||||||
{ return theAllocator->Allocate(theSize); }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -476,8 +466,4 @@ template < class TheKey1Type,
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
#pragma warning (pop)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -18,12 +18,6 @@
|
|||||||
#include <Standard_OutOfRange.hxx>
|
#include <Standard_OutOfRange.hxx>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
// Disable the warning "operator new unmatched by delete"
|
|
||||||
#pragma warning (push)
|
|
||||||
#pragma warning (disable:4291)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Purpose: An indexed map is used to store keys and to bind
|
* Purpose: An indexed map is used to store keys and to bind
|
||||||
* an index to them. Each new key stored in the map
|
* an index to them. Each new key stored in the map
|
||||||
@ -127,10 +121,6 @@ template < class TheKeyType,
|
|||||||
#endif
|
#endif
|
||||||
return myMap->ChangeFromIndex(myIndex);
|
return myMap->ChangeFromIndex(myIndex);
|
||||||
}
|
}
|
||||||
//! Operator new for allocating iterators
|
|
||||||
void* operator new(size_t theSize,
|
|
||||||
const Handle(NCollection_BaseAllocator)& theAllocator)
|
|
||||||
{ return theAllocator->Allocate(theSize); }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
NCollection_IndexedDataMap * myMap; //!< Pointer to the map being iterated
|
NCollection_IndexedDataMap * myMap; //!< Pointer to the map being iterated
|
||||||
@ -505,8 +495,4 @@ template < class TheKeyType,
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
#pragma warning (pop)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -18,12 +18,6 @@
|
|||||||
#include <Standard_OutOfRange.hxx>
|
#include <Standard_OutOfRange.hxx>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
// Disable the warning "operator new unmatched by delete"
|
|
||||||
#pragma warning (push)
|
|
||||||
#pragma warning (disable:4291)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Purpose: An indexed map is used to store keys and to bind
|
* Purpose: An indexed map is used to store keys and to bind
|
||||||
* an index to them. Each new key stored in the map
|
* an index to them. Each new key stored in the map
|
||||||
@ -115,11 +109,6 @@ template < class TheKeyType,
|
|||||||
return * (TheKeyType *) NULL; // This for compiler
|
return * (TheKeyType *) NULL; // This for compiler
|
||||||
}
|
}
|
||||||
|
|
||||||
//! Operator new for allocating iterators
|
|
||||||
void* operator new(size_t theSize,
|
|
||||||
const Handle(NCollection_BaseAllocator)& theAllocator)
|
|
||||||
{ return theAllocator->Allocate(theSize); }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
NCollection_IndexedMap * myMap; // Pointer to the map being iterated
|
NCollection_IndexedMap * myMap; // Pointer to the map being iterated
|
||||||
Standard_Integer myIndex; // Current index
|
Standard_Integer myIndex; // Current index
|
||||||
@ -417,8 +406,4 @@ template < class TheKeyType,
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
#pragma warning (pop)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -13,12 +13,6 @@
|
|||||||
#include <Standard_NoSuchObject.hxx>
|
#include <Standard_NoSuchObject.hxx>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
// Disable the warning "operator new unmatched by delete"
|
|
||||||
#pragma warning (push)
|
|
||||||
#pragma warning (disable:4291)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Purpose: Simple list to link items together keeping the first
|
* Purpose: Simple list to link items together keeping the first
|
||||||
* and the last one.
|
* and the last one.
|
||||||
@ -291,8 +285,4 @@ template <class TheItemType> class NCollection_List
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
#pragma warning (pop)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -8,11 +8,6 @@
|
|||||||
|
|
||||||
#include <NCollection_BaseAllocator.hxx>
|
#include <NCollection_BaseAllocator.hxx>
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
// Disable the warning "operator new unmatched by delete"
|
|
||||||
#pragma warning (disable:4291)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Purpose: This class is used to represent a node in the BaseList and
|
* Purpose: This class is used to represent a node in the BaseList and
|
||||||
* BaseMap.
|
* BaseMap.
|
||||||
|
@ -18,12 +18,6 @@
|
|||||||
#include <Standard_NoSuchObject.hxx>
|
#include <Standard_NoSuchObject.hxx>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
// Disable the warning "operator new unmatched by delete"
|
|
||||||
#pragma warning (push)
|
|
||||||
#pragma warning (disable:4291)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Purpose: Single hashed Map. This Map is used to store and
|
* Purpose: Single hashed Map. This Map is used to store and
|
||||||
* retrieve keys in linear time.
|
* retrieve keys in linear time.
|
||||||
@ -116,10 +110,6 @@ template < class TheKeyType,
|
|||||||
#endif
|
#endif
|
||||||
return ((MapNode *) myNode)->Value();
|
return ((MapNode *) myNode)->Value();
|
||||||
}
|
}
|
||||||
//! Operator new for allocating iterators
|
|
||||||
void* operator new(size_t theSize,
|
|
||||||
const Handle(NCollection_BaseAllocator)& theAllocator)
|
|
||||||
{ return theAllocator->Allocate(theSize); }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -318,8 +308,4 @@ template < class TheKeyType,
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
#pragma warning (pop)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -13,11 +13,6 @@
|
|||||||
#include <Standard_NoSuchObject.hxx>
|
#include <Standard_NoSuchObject.hxx>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
// Disable the warning "operator new unmatched by delete"
|
|
||||||
#pragma warning (disable:4291)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Purpose: A queue is a structure where Items are added at
|
* Purpose: A queue is a structure where Items are added at
|
||||||
* the end and removed from the front. The first
|
* the end and removed from the front. The first
|
||||||
@ -135,8 +130,4 @@ template <class TheItemType> class NCollection_Queue
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
#pragma warning (default:4291)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -12,11 +12,6 @@
|
|||||||
#include <Standard_NoSuchObject.hxx>
|
#include <Standard_NoSuchObject.hxx>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
// Disable the warning "operator new unmatched by delete"
|
|
||||||
#pragma warning (disable:4291)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Purpose: An SList is a LISP like list of Items.
|
* Purpose: An SList is a LISP like list of Items.
|
||||||
* An SList is :
|
* An SList is :
|
||||||
@ -76,15 +71,10 @@ template <class TheItemType> class NCollection_SList
|
|||||||
myTail->Clear();
|
myTail->Clear();
|
||||||
myTail->myAllocator->Free(myTail);
|
myTail->myAllocator->Free(myTail);
|
||||||
}
|
}
|
||||||
//! Operator new for allocating nodes
|
|
||||||
void* operator new(size_t theSize,
|
DEFINE_STANDARD_ALLOC
|
||||||
const Handle(NCollection_BaseAllocator)& theAllocator)
|
DEFINE_NCOLLECTION_ALLOC
|
||||||
{ return theAllocator->Allocate(theSize); }
|
|
||||||
//! news to avoid warnings on hiding - not for use
|
|
||||||
void* operator new(size_t theSize)
|
|
||||||
{ return Standard::Allocate(theSize); }
|
|
||||||
void* operator new(size_t /*theSize*/, void* theAddress)
|
|
||||||
{ return theAddress; }
|
|
||||||
private:
|
private:
|
||||||
// ---------- PRIVATE FIELDS ------------
|
// ---------- PRIVATE FIELDS ------------
|
||||||
Standard_Integer myCount; //!< Reference count
|
Standard_Integer myCount; //!< Reference count
|
||||||
@ -118,11 +108,6 @@ template <class TheItemType> class NCollection_SList
|
|||||||
myNode->myCount++;
|
myNode->myCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! Operator new for creating 'iterator'
|
|
||||||
void* operator new(size_t theSize,
|
|
||||||
const Handle(NCollection_BaseAllocator)& theAllocator)
|
|
||||||
{ return theAllocator->Allocate(theSize); }
|
|
||||||
|
|
||||||
//! Clear the items out
|
//! Clear the items out
|
||||||
void Clear (void)
|
void Clear (void)
|
||||||
{
|
{
|
||||||
@ -287,8 +272,4 @@ template <class TheItemType> class NCollection_SList
|
|||||||
friend class SListNode;
|
friend class SListNode;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
#pragma warning (default:4291)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -14,12 +14,6 @@
|
|||||||
#include <Standard_NoSuchObject.hxx>
|
#include <Standard_NoSuchObject.hxx>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
// Disable the warning "operator new unmatched by delete"
|
|
||||||
#pragma warning (push)
|
|
||||||
#pragma warning (disable:4291)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Purpose: Definition of a sequence of elements indexed by
|
* Purpose: Definition of a sequence of elements indexed by
|
||||||
* an Integer in range of 1..n
|
* an Integer in range of 1..n
|
||||||
@ -43,9 +37,8 @@ template <class TheItemType> class NCollection_Sequence
|
|||||||
//! Variable value access
|
//! Variable value access
|
||||||
TheItemType& ChangeValue () { return myValue; }
|
TheItemType& ChangeValue () { return myValue; }
|
||||||
//! Memory allocation
|
//! Memory allocation
|
||||||
void* operator new(size_t theSize,
|
DEFINE_STANDARD_ALLOC
|
||||||
const Handle(NCollection_BaseAllocator)& theAllocator)
|
DEFINE_NCOLLECTION_ALLOC
|
||||||
{ return theAllocator->Allocate(theSize); }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
TheItemType myValue;
|
TheItemType myValue;
|
||||||
@ -82,10 +75,6 @@ template <class TheItemType> class NCollection_Sequence
|
|||||||
//! Variable value access
|
//! Variable value access
|
||||||
virtual TheItemType& ChangeValue (void) const
|
virtual TheItemType& ChangeValue (void) const
|
||||||
{ return ((Node *)myCurrent)->ChangeValue(); }
|
{ return ((Node *)myCurrent)->ChangeValue(); }
|
||||||
//! Operator new for allocating iterators
|
|
||||||
void* operator new(size_t theSize,
|
|
||||||
const Handle(NCollection_BaseAllocator)& theAllocator)
|
|
||||||
{ return theAllocator->Allocate(theSize); }
|
|
||||||
}; // End of nested class Iterator
|
}; // End of nested class Iterator
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -315,8 +304,4 @@ template <class TheItemType> class NCollection_Sequence
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
#pragma warning (pop)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -12,11 +12,6 @@
|
|||||||
#include <NCollection_TListNode.hxx>
|
#include <NCollection_TListNode.hxx>
|
||||||
#include <NCollection_TListIterator.hxx>
|
#include <NCollection_TListIterator.hxx>
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
// Disable the warning "operator new unmatched by delete"
|
|
||||||
#pragma warning (disable:4291)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Purpose: A set is an unordered collection of items without
|
* Purpose: A set is an unordered collection of items without
|
||||||
* duplications. To test for duplications the operators == and !=
|
* duplications. To test for duplications the operators == and !=
|
||||||
@ -220,8 +215,4 @@ template <class TheItemType> class NCollection_Set
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
#pragma warning (default:4291)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -8,12 +8,6 @@
|
|||||||
|
|
||||||
#include <NCollection_SparseArrayBase.hxx>
|
#include <NCollection_SparseArrayBase.hxx>
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
// Disable the warning "operator new unmatched by delete"
|
|
||||||
#pragma warning (push)
|
|
||||||
#pragma warning (disable:4291)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dynamically resizable sparse array of objects
|
* Dynamically resizable sparse array of objects
|
||||||
*
|
*
|
||||||
@ -266,9 +260,5 @@ private:
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
#pragma warning (pop)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -15,11 +15,6 @@
|
|||||||
#include <Standard_NoSuchObject.hxx>
|
#include <Standard_NoSuchObject.hxx>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
// Disable the warning "operator new unmatched by delete"
|
|
||||||
#pragma warning (disable:4291)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Purpose: A stack is a structure where item can be added and
|
* Purpose: A stack is a structure where item can be added and
|
||||||
* removed from the top. Like a stack of plates in a
|
* removed from the top. Like a stack of plates in a
|
||||||
@ -135,8 +130,4 @@ template <class TheItemType> class NCollection_Stack
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
#pragma warning (default:4291)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -10,12 +10,6 @@
|
|||||||
#include <NCollection_BaseList.hxx>
|
#include <NCollection_BaseList.hxx>
|
||||||
#include <NCollection_TListNode.hxx>
|
#include <NCollection_TListNode.hxx>
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
// Disable the warning "operator new unmatched by delete"
|
|
||||||
#pragma warning (push)
|
|
||||||
#pragma warning (disable:4291)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Purpose: This Iterator class iterates on BaseList of TListNode and is
|
* Purpose: This Iterator class iterates on BaseList of TListNode and is
|
||||||
* instantiated in List/Set/Queue/Stack
|
* instantiated in List/Set/Queue/Stack
|
||||||
@ -54,14 +48,6 @@ template <class TheItemType> class NCollection_TListIterator
|
|||||||
//! Variable Value access
|
//! Variable Value access
|
||||||
virtual TheItemType& ChangeValue (void) const
|
virtual TheItemType& ChangeValue (void) const
|
||||||
{ return ((NCollection_TListNode<TheItemType> *)myCurrent)->ChangeValue(); }
|
{ return ((NCollection_TListNode<TheItemType> *)myCurrent)->ChangeValue(); }
|
||||||
//! Operator new for allocating iterators
|
|
||||||
void* operator new(size_t theSize,
|
|
||||||
const Handle(NCollection_BaseAllocator)& theAllocator)
|
|
||||||
{ return theAllocator->Allocate(theSize); }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
#pragma warning (pop)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -8,12 +8,7 @@
|
|||||||
|
|
||||||
#include <NCollection_ListNode.hxx>
|
#include <NCollection_ListNode.hxx>
|
||||||
#include <NCollection_BaseAllocator.hxx>
|
#include <NCollection_BaseAllocator.hxx>
|
||||||
|
#include <NCollection_DefineAlloc.hxx>
|
||||||
#ifdef WNT
|
|
||||||
// Disable the warning "operator new unmatched by delete"
|
|
||||||
#pragma warning (push)
|
|
||||||
#pragma warning (disable:4291)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Purpose: Abstract list node class. Used by BaseList
|
* Purpose: Abstract list node class. Used by BaseList
|
||||||
@ -32,9 +27,8 @@ template <class TheItemType> class NCollection_TListNode
|
|||||||
//! Variable value access
|
//! Variable value access
|
||||||
TheItemType& ChangeValue () { return myValue; }
|
TheItemType& ChangeValue () { return myValue; }
|
||||||
//! Memory allocation
|
//! Memory allocation
|
||||||
void* operator new(size_t theSize,
|
DEFINE_STANDARD_ALLOC
|
||||||
const Handle(NCollection_BaseAllocator)& theAllocator)
|
DEFINE_NCOLLECTION_ALLOC
|
||||||
{ return theAllocator->Allocate(theSize); }
|
|
||||||
//! Static deleter to be passed to BaseList
|
//! Static deleter to be passed to BaseList
|
||||||
static void delNode (NCollection_ListNode * theNode,
|
static void delNode (NCollection_ListNode * theNode,
|
||||||
Handle(NCollection_BaseAllocator)& theAl)
|
Handle(NCollection_BaseAllocator)& theAl)
|
||||||
@ -49,8 +43,4 @@ template <class TheItemType> class NCollection_TListNode
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
#pragma warning (pop)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -7,12 +7,7 @@
|
|||||||
#define NCollection_UBTree_HeaderFile
|
#define NCollection_UBTree_HeaderFile
|
||||||
|
|
||||||
#include <NCollection_BaseAllocator.hxx>
|
#include <NCollection_BaseAllocator.hxx>
|
||||||
|
#include <NCollection_DefineAlloc.hxx>
|
||||||
#ifdef WNT
|
|
||||||
// Disable the warning: "operator new unmatched by delete"
|
|
||||||
#pragma warning (push)
|
|
||||||
#pragma warning (disable:4291)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The algorithm of unbalanced binary tree of overlapped bounding boxes.
|
* The algorithm of unbalanced binary tree of overlapped bounding boxes.
|
||||||
@ -116,6 +111,10 @@ template <class TheObjType, class TheBndType> class NCollection_UBTree
|
|||||||
*/
|
*/
|
||||||
class TreeNode
|
class TreeNode
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
|
DEFINE_STANDARD_ALLOC
|
||||||
|
DEFINE_NCOLLECTION_ALLOC
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TreeNode (const TheObjType& theObj, const TheBndType& theBnd)
|
TreeNode (const TheObjType& theObj, const TheBndType& theBnd)
|
||||||
: myBnd(theBnd), myObject(theObj), myChildren(0), myParent(0) {}
|
: myBnd(theBnd), myObject(theObj), myChildren(0), myParent(0) {}
|
||||||
@ -195,20 +194,6 @@ template <class TheObjType, class TheBndType> class NCollection_UBTree
|
|||||||
// ~TreeNode () { if (myChildren) delete [] myChildren; }
|
// ~TreeNode () { if (myChildren) delete [] myChildren; }
|
||||||
~TreeNode () { myChildren = 0L; }
|
~TreeNode () { myChildren = 0L; }
|
||||||
|
|
||||||
/**
|
|
||||||
* Allocator of a tree node.
|
|
||||||
*/
|
|
||||||
void * operator new (size_t theSize,
|
|
||||||
const Handle(NCollection_BaseAllocator)& theAllocator)
|
|
||||||
{ return theAllocator->Allocate(theSize); }
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Allocator of a tree node.
|
|
||||||
*/
|
|
||||||
void * operator new (size_t,
|
|
||||||
void * theMem)
|
|
||||||
{ return theMem; }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Deleter of tree node. The whole hierarchy of its children also deleted.
|
* Deleter of tree node. The whole hierarchy of its children also deleted.
|
||||||
* This method should be used instead of operator delete.
|
* This method should be used instead of operator delete.
|
||||||
@ -500,8 +485,4 @@ DEFINE_STANDARD_HANDLE (_HUBTREE, _HPARENT)
|
|||||||
IMPLEMENT_STANDARD_HANDLE (_HUBTREE, _HPARENT) \
|
IMPLEMENT_STANDARD_HANDLE (_HUBTREE, _HPARENT) \
|
||||||
IMPLEMENT_STANDARD_RTTIEXT(_HUBTREE, _HPARENT)
|
IMPLEMENT_STANDARD_RTTIEXT(_HUBTREE, _HPARENT)
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
#pragma warning (pop)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -14,12 +14,6 @@
|
|||||||
#include <Standard_OutOfRange.hxx>
|
#include <Standard_OutOfRange.hxx>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
// Disable the warning: "operator new unmatched by delete"
|
|
||||||
#pragma warning (push)
|
|
||||||
#pragma warning (disable:4291)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class NCollection_Vector (dynamic array of objects)
|
* Class NCollection_Vector (dynamic array of objects)
|
||||||
*
|
*
|
||||||
@ -54,8 +48,9 @@ template <class TheItemType> class NCollection_Vector
|
|||||||
//! Nested class MemBlock
|
//! Nested class MemBlock
|
||||||
class MemBlock : public NCollection_BaseVector::MemBlock
|
class MemBlock : public NCollection_BaseVector::MemBlock
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
void * operator new (size_t, void * theAddress) { return theAddress; }
|
DEFINE_STANDARD_ALLOC
|
||||||
|
|
||||||
//! Empty constructor
|
//! Empty constructor
|
||||||
MemBlock (NCollection_BaseAllocator* theAlloc)
|
MemBlock (NCollection_BaseAllocator* theAlloc)
|
||||||
: NCollection_BaseVector::MemBlock(0,0,theAlloc)
|
: NCollection_BaseVector::MemBlock(0,0,theAlloc)
|
||||||
@ -156,10 +151,6 @@ template <class TheItemType> class NCollection_Vector
|
|||||||
//! Variable value access
|
//! Variable value access
|
||||||
virtual TheItemType& ChangeValue (void) const {
|
virtual TheItemType& ChangeValue (void) const {
|
||||||
return ((MemBlock *) CurBlockV()) -> ChangeValue(myCurIndex); }
|
return ((MemBlock *) CurBlockV()) -> ChangeValue(myCurIndex); }
|
||||||
//! Operator new for allocating iterators
|
|
||||||
void* operator new(size_t theSize,
|
|
||||||
const Handle(NCollection_BaseAllocator)& theAllocator)
|
|
||||||
{ return theAllocator->Allocate(theSize); }
|
|
||||||
}; // End of the nested class Iterator
|
}; // End of the nested class Iterator
|
||||||
|
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
@ -306,8 +297,4 @@ template <class TheItemType> class NCollection_Vector
|
|||||||
friend class Iterator;
|
friend class Iterator;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
#pragma warning (pop)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -15,8 +15,8 @@
|
|||||||
#include <Bnd_B3f.hxx>
|
#include <Bnd_B3f.hxx>
|
||||||
|
|
||||||
#ifdef WNT
|
#ifdef WNT
|
||||||
// Disable the warning "operator new unmatched by delete"
|
|
||||||
#pragma warning (push)
|
#pragma warning (push)
|
||||||
|
// Disable warning 4480: nonstandard extension used: specifying underlying type for enum 'enum'
|
||||||
#pragma warning (disable:4480)
|
#pragma warning (disable:4480)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -10,12 +10,6 @@
|
|||||||
#include <NIS_InteractiveObject.hxx>
|
#include <NIS_InteractiveObject.hxx>
|
||||||
#include <Quantity_Color.hxx>
|
#include <Quantity_Color.hxx>
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
// Disable the warning "operator new unmatched by delete"
|
|
||||||
#pragma warning (push)
|
|
||||||
#pragma warning (disable:4291)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
class Handle_NIS_TriangulatedDrawer;
|
class Handle_NIS_TriangulatedDrawer;
|
||||||
class NCollection_BaseAllocator;
|
class NCollection_BaseAllocator;
|
||||||
class Handle_NCollection_BaseAllocator;
|
class Handle_NCollection_BaseAllocator;
|
||||||
@ -465,24 +459,13 @@ class NIS_Triangulated : public NIS_InteractiveObject
|
|||||||
*/
|
*/
|
||||||
Standard_EXPORT virtual void Delete () const;
|
Standard_EXPORT virtual void Delete () const;
|
||||||
|
|
||||||
/**
|
|
||||||
* Operator new for memory allocation uses Open CASCADE memory manager
|
|
||||||
*/
|
|
||||||
void* operator new (size_t size)
|
|
||||||
{
|
|
||||||
return Standard::Allocate(size);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Allocator-based operator new for dynamic allocations in method Clone()
|
* Allocator-based operator new for dynamic allocations in method Clone()
|
||||||
*/
|
*/
|
||||||
void* operator new (Standard_Size theSz,
|
DEFINE_STANDARD_ALLOC
|
||||||
const Handle(NCollection_BaseAllocator)& theAllocator)
|
DEFINE_NCOLLECTION_ALLOC
|
||||||
{
|
|
||||||
return theAllocator->Allocate(theSz);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a 3D bounding box of the object.
|
* Create a 3D bounding box of the object.
|
||||||
@ -536,8 +519,4 @@ DEFINE_STANDARD_RTTI (NIS_Triangulated)
|
|||||||
// Definition of HANDLE object using Standard_DefineHandle.hxx
|
// Definition of HANDLE object using Standard_DefineHandle.hxx
|
||||||
DEFINE_STANDARD_HANDLE (NIS_Triangulated, NIS_InteractiveObject)
|
DEFINE_STANDARD_HANDLE (NIS_Triangulated, NIS_InteractiveObject)
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
#pragma warning (pop)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -24,7 +24,7 @@ struct OPENGL_SURF_PROP
|
|||||||
int isphysic;
|
int isphysic;
|
||||||
unsigned int color_mask;
|
unsigned int color_mask;
|
||||||
TEL_COLOUR speccol, difcol, ambcol, emscol, matcol;
|
TEL_COLOUR speccol, difcol, ambcol, emscol, matcol;
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
};
|
};
|
||||||
|
|
||||||
struct TEL_CONTEXT_FACE
|
struct TEL_CONTEXT_FACE
|
||||||
@ -39,7 +39,7 @@ struct TEL_CONTEXT_FACE
|
|||||||
int doTextureMap;
|
int doTextureMap;
|
||||||
int TexId;
|
int TexId;
|
||||||
TEL_POFFSET_PARAM PolygonOffset;
|
TEL_POFFSET_PARAM PolygonOffset;
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
};
|
};
|
||||||
|
|
||||||
#include <OpenGl_Element.hxx>
|
#include <OpenGl_Element.hxx>
|
||||||
@ -67,7 +67,7 @@ class OpenGl_AspectFace : public OpenGl_Element
|
|||||||
OpenGl_AspectLine myAspectEdge;
|
OpenGl_AspectLine myAspectEdge;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //_OpenGl_AspectFace_Header
|
#endif //_OpenGl_AspectFace_Header
|
||||||
|
@ -34,7 +34,7 @@ class OpenGl_AspectLine : public OpenGl_Element
|
|||||||
float myWidth;
|
float myWidth;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //_OpenGl_AspectLine_Header
|
#endif //_OpenGl_AspectLine_Header
|
||||||
|
@ -33,7 +33,7 @@ class OpenGl_AspectMarker : public OpenGl_Element
|
|||||||
float myScale;
|
float myScale;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //OpenGl_AspectMarker_Header
|
#endif //OpenGl_AspectMarker_Header
|
||||||
|
@ -49,7 +49,7 @@ class OpenGl_AspectText : public OpenGl_Element
|
|||||||
TEL_COLOUR mySubtitleColor;
|
TEL_COLOUR mySubtitleColor;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //OpenGl_AspectText_Header
|
#endif //OpenGl_AspectText_Header
|
||||||
|
@ -15,7 +15,7 @@ struct OpenGl_CView
|
|||||||
{
|
{
|
||||||
Handle_OpenGl_Workspace WS;
|
Handle_OpenGl_Workspace WS;
|
||||||
Handle_OpenGl_View View;
|
Handle_OpenGl_View View;
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //OpenGl_CView_Header
|
#endif //OpenGl_CView_Header
|
||||||
|
@ -40,7 +40,7 @@ struct OPENGL_MARKER_DATA
|
|||||||
unsigned int Width;
|
unsigned int Width;
|
||||||
unsigned int Height;
|
unsigned int Height;
|
||||||
unsigned char* Array;
|
unsigned char* Array;
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef NCollection_DataMap<int,OPENGL_MARKER_DATA> OpenGl_MapOfUserMarker;
|
typedef NCollection_DataMap<int,OPENGL_MARKER_DATA> OpenGl_MapOfUserMarker;
|
||||||
@ -150,7 +150,7 @@ class OpenGl_Display : public MMgt_TShared
|
|||||||
Standard_Integer myFontSize;
|
Standard_Integer myFontSize;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
};
|
};
|
||||||
|
|
||||||
extern Handle(OpenGl_Display) openglDisplay;
|
extern Handle(OpenGl_Display) openglDisplay;
|
||||||
|
@ -17,7 +17,7 @@ class OpenGl_Element
|
|||||||
virtual void Render (const Handle(OpenGl_Workspace) &AWorkspace) const = 0;
|
virtual void Render (const Handle(OpenGl_Workspace) &AWorkspace) const = 0;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //OpenGl_Element_Header
|
#endif //OpenGl_Element_Header
|
||||||
|
@ -58,7 +58,7 @@ class OpenGl_GraduatedTrihedron : public MMgt_TShared
|
|||||||
void* myPtrVisual3dView;
|
void* myPtrVisual3dView;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //_OpenGl_GraduatedTrihedron_Header
|
#endif //_OpenGl_GraduatedTrihedron_Header
|
||||||
|
@ -22,7 +22,7 @@ struct OpenGl_ElementNode
|
|||||||
TelType type;
|
TelType type;
|
||||||
OpenGl_Element *elem;
|
OpenGl_Element *elem;
|
||||||
OpenGl_ElementNode *next;
|
OpenGl_ElementNode *next;
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
};
|
};
|
||||||
|
|
||||||
class OpenGl_Group : public OpenGl_Element
|
class OpenGl_Group : public OpenGl_Element
|
||||||
@ -53,7 +53,7 @@ class OpenGl_Group : public OpenGl_Element
|
|||||||
OpenGl_ElementNode *myFirst, *myLast;
|
OpenGl_ElementNode *myFirst, *myLast;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //_OpenGl_Group_Header
|
#endif //_OpenGl_Group_Header
|
||||||
|
@ -22,7 +22,7 @@ struct OpenGl_Light
|
|||||||
Tfloat shine;
|
Tfloat shine;
|
||||||
Tfloat atten[2];
|
Tfloat atten[2];
|
||||||
Tfloat angle;
|
Tfloat angle;
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef NCollection_List<OpenGl_Light> OpenGl_ListOfLight;
|
typedef NCollection_List<OpenGl_Light> OpenGl_ListOfLight;
|
||||||
|
@ -24,7 +24,7 @@ class OpenGl_Marker : public OpenGl_Element
|
|||||||
TEL_POINT myPoint;
|
TEL_POINT myPoint;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //OpenGl_Marker_Header
|
#endif //OpenGl_Marker_Header
|
||||||
|
@ -27,7 +27,7 @@ class OpenGl_MarkerSet : public OpenGl_Element
|
|||||||
TEL_POINT *myPoints;
|
TEL_POINT *myPoints;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //OpenGl_MarkerSet_Header
|
#endif //OpenGl_MarkerSet_Header
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
struct OpenGl_Matrix
|
struct OpenGl_Matrix
|
||||||
{
|
{
|
||||||
float mat[4][4];
|
float mat[4][4];
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
};
|
};
|
||||||
|
|
||||||
Standard_EXPORT void OpenGl_Multiplymat3 (OpenGl_Matrix *c, const OpenGl_Matrix *a, const OpenGl_Matrix *b);
|
Standard_EXPORT void OpenGl_Multiplymat3 (OpenGl_Matrix *c, const OpenGl_Matrix *a, const OpenGl_Matrix *b);
|
||||||
|
@ -33,7 +33,7 @@ struct TEL_INDEXPOLY_DATA
|
|||||||
tel_colour vcolours; /* Vertex colour values */
|
tel_colour vcolours; /* Vertex colour values */
|
||||||
tel_point vnormals; /* Vertex normals */
|
tel_point vnormals; /* Vertex normals */
|
||||||
tel_texture_coord vtexturecoord; /* Texture Coordinates */
|
tel_texture_coord vtexturecoord; /* Texture Coordinates */
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
};
|
};
|
||||||
|
|
||||||
class OpenGl_Mesh : public OpenGl_Element
|
class OpenGl_Mesh : public OpenGl_Element
|
||||||
@ -72,7 +72,7 @@ class OpenGl_Mesh : public OpenGl_Element
|
|||||||
DS_INTERNAL *myDS;
|
DS_INTERNAL *myDS;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //OpenGl_Mesh_Header
|
#endif //OpenGl_Mesh_Header
|
||||||
|
@ -27,7 +27,7 @@ struct EXTRA_VERTEX
|
|||||||
{
|
{
|
||||||
GLfloat vert[3];
|
GLfloat vert[3];
|
||||||
int ind;
|
int ind;
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
};
|
};
|
||||||
typedef EXTRA_VERTEX* extra_vertex;
|
typedef EXTRA_VERTEX* extra_vertex;
|
||||||
|
|
||||||
@ -36,7 +36,7 @@ struct SEQ_
|
|||||||
Tint ts_num, ts_alloc;
|
Tint ts_num, ts_alloc;
|
||||||
void **tmesh_sequence;
|
void **tmesh_sequence;
|
||||||
GLenum triangle_type; /* FSXXX OPTI */
|
GLenum triangle_type; /* FSXXX OPTI */
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
};
|
};
|
||||||
|
|
||||||
struct OPENGL_DISPLAY_PGN
|
struct OPENGL_DISPLAY_PGN
|
||||||
@ -44,7 +44,7 @@ struct OPENGL_DISPLAY_PGN
|
|||||||
Tint num_of_seq;
|
Tint num_of_seq;
|
||||||
Tint num_alloc;
|
Tint num_alloc;
|
||||||
SEQ_ *seq;
|
SEQ_ *seq;
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
};
|
};
|
||||||
|
|
||||||
static void bgntriangulate( const TEL_POLYGON_DATA *, void (APIENTRY*)() );
|
static void bgntriangulate( const TEL_POLYGON_DATA *, void (APIENTRY*)() );
|
||||||
|
@ -30,7 +30,7 @@ struct TEL_POLYGON_DATA
|
|||||||
tel_point vnormals; /* Vertex normals */
|
tel_point vnormals; /* Vertex normals */
|
||||||
tel_texture_coord vtexturecoord; /* Texture Coordinates */
|
tel_texture_coord vtexturecoord; /* Texture Coordinates */
|
||||||
OPENGL_DISPLAY_PGN *dsply;
|
OPENGL_DISPLAY_PGN *dsply;
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
};
|
};
|
||||||
|
|
||||||
class OpenGl_Polygon : public OpenGl_Element
|
class OpenGl_Polygon : public OpenGl_Element
|
||||||
@ -56,7 +56,7 @@ class OpenGl_Polygon : public OpenGl_Element
|
|||||||
TEL_POLYGON_DATA myData;
|
TEL_POLYGON_DATA myData;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //OpenGl_Polygon_Header
|
#endif //OpenGl_Polygon_Header
|
||||||
|
@ -32,7 +32,7 @@ class OpenGl_Polyline : public OpenGl_Element
|
|||||||
tel_colour myColors; // Vertex color values for each vertex
|
tel_colour myColors; // Vertex color values for each vertex
|
||||||
|
|
||||||
public:
|
public:
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //OpenGl_Polyline_Header
|
#endif //OpenGl_Polyline_Header
|
||||||
|
@ -79,7 +79,7 @@ protected:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ class OpenGl_PriorityList
|
|||||||
Standard_Integer myNbStructures;
|
Standard_Integer myNbStructures;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //_OpenGl_PriorityList_Header
|
#endif //_OpenGl_PriorityList_Header
|
||||||
|
@ -27,7 +27,7 @@ struct OPENGL_QSTRIP_DATA
|
|||||||
tel_colour vcolours; /* Vertex colour values */
|
tel_colour vcolours; /* Vertex colour values */
|
||||||
tel_point vnormals; /* Vertex normals */
|
tel_point vnormals; /* Vertex normals */
|
||||||
tel_texture_coord vtexturecoord; /* Texture coordinates */
|
tel_texture_coord vtexturecoord; /* Texture coordinates */
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
};
|
};
|
||||||
|
|
||||||
class OpenGl_QuadrangleStrip : public OpenGl_Element
|
class OpenGl_QuadrangleStrip : public OpenGl_Element
|
||||||
@ -60,7 +60,7 @@ class OpenGl_QuadrangleStrip : public OpenGl_Element
|
|||||||
DS_INTERNAL *myDS;
|
DS_INTERNAL *myDS;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //OpenGl_QuadrangleStrip_Header
|
#endif //OpenGl_QuadrangleStrip_Header
|
||||||
|
@ -83,7 +83,7 @@ class OpenGl_Structure : public OpenGl_Element
|
|||||||
OpenGl_ListOfGroup myGroups;
|
OpenGl_ListOfGroup myGroups;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //OpenGl_Structure_Header
|
#endif //OpenGl_Structure_Header
|
||||||
|
@ -35,7 +35,7 @@ class OpenGl_Text : public OpenGl_Element
|
|||||||
const wchar_t *myString;
|
const wchar_t *myString;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //OpenGl_Text_Header
|
#endif //OpenGl_Text_Header
|
||||||
|
@ -15,7 +15,7 @@ struct OpenGl_TextParam
|
|||||||
int Height;
|
int Height;
|
||||||
Graphic3d_HorizontalTextAlignment HAlign;
|
Graphic3d_HorizontalTextAlignment HAlign;
|
||||||
Graphic3d_VerticalTextAlignment VAlign;
|
Graphic3d_VerticalTextAlignment VAlign;
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //_OpenGl_TextParam_Header
|
#endif //_OpenGl_TextParam_Header
|
||||||
|
@ -85,7 +85,7 @@ struct texData
|
|||||||
texDataStatus status;
|
texDataStatus status;
|
||||||
GLint type;
|
GLint type;
|
||||||
int share_count;
|
int share_count;
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -110,7 +110,7 @@ struct texDraw
|
|||||||
GLfloat transx, transy;
|
GLfloat transx, transy;
|
||||||
GLfloat angle;
|
GLfloat angle;
|
||||||
|
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -48,6 +48,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <OpenGl_tgl_all.hxx>
|
#include <OpenGl_tgl_all.hxx>
|
||||||
|
#include <Standard_DefineAlloc.hxx>
|
||||||
|
|
||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
|
|
||||||
@ -76,7 +77,7 @@ struct _TextureData
|
|||||||
GLfloat scalex, scaley;
|
GLfloat scalex, scaley;
|
||||||
GLfloat transx, transy;
|
GLfloat transx, transy;
|
||||||
GLfloat angle;
|
GLfloat angle;
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
};
|
};
|
||||||
typedef _TextureData TextureData;
|
typedef _TextureData TextureData;
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ struct TEL_TMESH_DATA
|
|||||||
tel_colour vcolours; /* length = num_facets + 2 */
|
tel_colour vcolours; /* length = num_facets + 2 */
|
||||||
tel_point vnormals; /* length = num_facets + 2 */
|
tel_point vnormals; /* length = num_facets + 2 */
|
||||||
tel_texture_coord vtexturecoord; /* Texture coordinates */
|
tel_texture_coord vtexturecoord; /* Texture coordinates */
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
};
|
};
|
||||||
|
|
||||||
class OpenGl_TriangleStrip : public OpenGl_Element
|
class OpenGl_TriangleStrip : public OpenGl_Element
|
||||||
@ -58,7 +58,7 @@ class OpenGl_TriangleStrip : public OpenGl_Element
|
|||||||
DS_INTERNAL *myDS;
|
DS_INTERNAL *myDS;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //OpenGl_TriangleStrip_Header
|
#endif //OpenGl_TriangleStrip_Header
|
||||||
|
@ -49,7 +49,7 @@ class OpenGl_Trihedron : public MMgt_TShared
|
|||||||
OpenGl_AspectText myAspectText;
|
OpenGl_AspectText myAspectText;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //_OpenGl_Trihedron_Header
|
#endif //_OpenGl_Trihedron_Header
|
||||||
|
@ -61,7 +61,7 @@ struct OPENGL_EXTRA_REP
|
|||||||
struct OPENGL_CLIP_REP
|
struct OPENGL_CLIP_REP
|
||||||
{
|
{
|
||||||
Standard_Real equation[4];
|
Standard_Real equation[4];
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
};
|
};
|
||||||
|
|
||||||
struct OPENGL_ZCLIP
|
struct OPENGL_ZCLIP
|
||||||
@ -226,7 +226,7 @@ class OpenGl_View : public MMgt_TShared
|
|||||||
Standard_Boolean myResetFLIST;
|
Standard_Boolean myResetFLIST;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //_OpenGl_View_Header
|
#endif //_OpenGl_View_Header
|
||||||
|
@ -59,7 +59,7 @@ struct OPENGL_CLIP_PLANE
|
|||||||
{
|
{
|
||||||
GLboolean isEnabled;
|
GLboolean isEnabled;
|
||||||
GLdouble Equation[4];
|
GLdouble Equation[4];
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
};
|
};
|
||||||
|
|
||||||
/*----------------------------------------------------------------------*/
|
/*----------------------------------------------------------------------*/
|
||||||
|
@ -99,7 +99,7 @@ protected:
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
DEFINE_STANDARD_RTTI(OpenGl_Window) // Type definition
|
DEFINE_STANDARD_RTTI(OpenGl_Window) // Type definition
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -217,7 +217,7 @@ protected:
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
DEFINE_STANDARD_RTTI(OpenGl_Workspace) // Type definition
|
DEFINE_STANDARD_RTTI(OpenGl_Workspace) // Type definition
|
||||||
IMPLEMENT_MEMORY_OPERATORS
|
DEFINE_STANDARD_ALLOC
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
#include <Poly_CoherentTriangle.hxx>
|
#include <Poly_CoherentTriangle.hxx>
|
||||||
|
|
||||||
#ifdef WNT
|
#ifdef WNT
|
||||||
#pragma warning(disable:4291 4996)
|
#pragma warning(disable:4996)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
@ -6,10 +6,6 @@
|
|||||||
|
|
||||||
#include <Poly_CoherentTriPtr.hxx>
|
#include <Poly_CoherentTriPtr.hxx>
|
||||||
|
|
||||||
#ifdef WNT
|
|
||||||
#pragma warning(disable:4291)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Iterator::Next
|
//function : Iterator::Next
|
||||||
//purpose :
|
//purpose :
|
||||||
|
@ -8,12 +8,13 @@
|
|||||||
#define Poly_CoherentTriPtr_HeaderFile
|
#define Poly_CoherentTriPtr_HeaderFile
|
||||||
|
|
||||||
#include <NCollection_BaseAllocator.hxx>
|
#include <NCollection_BaseAllocator.hxx>
|
||||||
|
#include <NCollection_DefineAlloc.hxx>
|
||||||
|
|
||||||
class Poly_CoherentTriangle;
|
class Poly_CoherentTriangle;
|
||||||
|
|
||||||
#ifdef WNT
|
#ifdef WNT
|
||||||
#pragma warning (push)
|
#pragma warning (push)
|
||||||
#pragma warning(disable:4355 4291) //'this' : used in base member initializer list
|
#pragma warning(disable:4355) //'this' : used in base member initializer list
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -78,11 +79,7 @@ class Poly_CoherentTriPtr
|
|||||||
/**
|
/**
|
||||||
* Operator new for dynamic allocations
|
* Operator new for dynamic allocations
|
||||||
*/
|
*/
|
||||||
void* operator new (Standard_Size theSize,
|
DEFINE_NCOLLECTION_ALLOC
|
||||||
const Handle(NCollection_BaseAllocator)& theAllocator)
|
|
||||||
{
|
|
||||||
return theAllocator->Allocate(theSize);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Query the stored pointer to Triangle.
|
* Query the stored pointer to Triangle.
|
||||||
|
@ -22,13 +22,7 @@ struct polyedge {
|
|||||||
Standard_Integer nd; // the second node of the edge
|
Standard_Integer nd; // the second node of the edge
|
||||||
Standard_Integer nt[2]; // the two adjacent triangles
|
Standard_Integer nt[2]; // the two adjacent triangles
|
||||||
Standard_Integer nn[2]; // the two adjacent nodes
|
Standard_Integer nn[2]; // the two adjacent nodes
|
||||||
void* operator new(size_t aSize)
|
DEFINE_STANDARD_ALLOC
|
||||||
{return (void*)(Standard::Allocate(aSize));}
|
|
||||||
// void operator delete(void* aNode, size_t aSize) {
|
|
||||||
void operator delete(void* aNode) {
|
|
||||||
Standard_Address anAdress = (Standard_Address)aNode;
|
|
||||||
Standard::Free(anAdress);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Poly_Connect::Poly_Connect(const Handle(Poly_Triangulation)& T) :
|
Poly_Connect::Poly_Connect(const Handle(Poly_Triangulation)& T) :
|
||||||
|
@ -62,7 +62,6 @@ Standard_values.h
|
|||||||
Standard_DefineHandle.hxx
|
Standard_DefineHandle.hxx
|
||||||
Standard_UUID.cxx
|
Standard_UUID.cxx
|
||||||
Standard_UUID.hxx
|
Standard_UUID.hxx
|
||||||
StandardCSFDB.cxx
|
|
||||||
Standard_Version.hxx
|
Standard_Version.hxx
|
||||||
Standard_Mutex.hxx
|
Standard_Mutex.hxx
|
||||||
Standard_Mutex.cxx
|
Standard_Mutex.cxx
|
||||||
@ -73,3 +72,4 @@ Standard_DefineException.hxx
|
|||||||
Standard_MMgrTBBalloc.cxx
|
Standard_MMgrTBBalloc.cxx
|
||||||
Standard_MMgrTBBalloc.hxx
|
Standard_MMgrTBBalloc.hxx
|
||||||
Standard_Assert.hxx
|
Standard_Assert.hxx
|
||||||
|
Standard_DefineAlloc.hxx
|
||||||
|
@ -8,6 +8,9 @@
|
|||||||
#ifndef _Handle_Standard_Persistent_HeaderFile
|
#ifndef _Handle_Standard_Persistent_HeaderFile
|
||||||
#define _Handle_Standard_Persistent_HeaderFile
|
#define _Handle_Standard_Persistent_HeaderFile
|
||||||
|
|
||||||
|
#ifndef _Standard_DefineAlloc_HeaderFile
|
||||||
|
#include <Standard_DefineAlloc.hxx>
|
||||||
|
#endif
|
||||||
#ifndef _Standard_Macro_HeaderFile
|
#ifndef _Standard_Macro_HeaderFile
|
||||||
#include <Standard_Macro.hxx>
|
#include <Standard_Macro.hxx>
|
||||||
#endif
|
#endif
|
||||||
@ -38,8 +41,6 @@ class Handle_Standard_Persistent;
|
|||||||
|
|
||||||
Standard_EXPORT Standard_Integer HashCode(const Handle(Standard_Persistent)& ,
|
Standard_EXPORT Standard_Integer HashCode(const Handle(Standard_Persistent)& ,
|
||||||
const Standard_Integer);
|
const Standard_Integer);
|
||||||
Standard_EXPORT Standard_Address StandardCSFDB_Allocate(const Standard_Size);
|
|
||||||
Standard_EXPORT void StandardCSFDB_Free(Standard_Address&);
|
|
||||||
|
|
||||||
class Handle(Standard_Persistent)
|
class Handle(Standard_Persistent)
|
||||||
{
|
{
|
||||||
@ -69,18 +70,7 @@ class Handle(Standard_Persistent)
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
void* operator new(size_t,void* anAddress)
|
DEFINE_STANDARD_ALLOC
|
||||||
{
|
|
||||||
return anAddress;
|
|
||||||
}
|
|
||||||
void* operator new(size_t size)
|
|
||||||
{
|
|
||||||
return StandardCSFDB_Allocate(size);
|
|
||||||
}
|
|
||||||
void operator delete(void *anAddress)
|
|
||||||
{
|
|
||||||
if (anAddress) StandardCSFDB_Free(anAddress);
|
|
||||||
}
|
|
||||||
|
|
||||||
Handle(Standard_Persistent)()
|
Handle(Standard_Persistent)()
|
||||||
{
|
{
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user