The empty copy constructor, assignemnts operator, default constructors added to the following classes:
The following classes use “new” function without Handles:
- Select3D_PointData
- BSB_T3Bits
- IntPatch_InfoPD
- LDOM_StringElem
- BinomAllocator
- ProjLib_OnSurface
- Standard_MMgrFactory
Useless declaration of default constructor have been deleted.
1048576,2097152,4194304,8388608,
16777216,33554432,67108864,134217728,
268435456,536870912,1073741824,2147483648U};
-class BSB_T3Bits { //-- size is power of 2 > 4
+
+//-- size is power of 2 > 4
+class BSB_T3Bits
+{
public:
Standard_Integer _DECAL;
Standard_Integer NbAxisZ(const Standard_Integer i) { return(axisZ[0][i]); }
inline Standard_Integer GrilleInteger(Standard_Integer ix,
- Standard_Integer iy,
- Standard_Integer iz) {
+ Standard_Integer iy,
+ Standard_Integer iz)
+ {
Standard_Integer tz = iz<<_DECAL2;
Standard_Integer ty = iy<<_DECAL;
Standard_Integer t = ix;
- t|=ty; t|=tz;
+ t|=ty;
+ t|=tz;
return(t);
}
-
+
inline void IntegerGrille(Standard_Integer t,
- Standard_Integer &ix,
- Standard_Integer &iy,
- Standard_Integer &iz) {
+ Standard_Integer &ix,
+ Standard_Integer &iy,
+ Standard_Integer &iz)
+ {
ix = t & _BASEM1; t>>=_DECAL;
iy = t & _BASEM1; t>>=_DECAL;
iz = t;
}
+
+private:
+
+ BSB_T3Bits (const BSB_T3Bits&);
+ BSB_T3Bits& operator= (const BSB_T3Bits&);
};
+
//=======================================================================
-BSB_T3Bits::~BSB_T3Bits() {
+BSB_T3Bits::~BSB_T3Bits()
+{
if(p) { delete [] p; p=0; }
#if DEBUG
printf("\n BASE:%d\n",_BASE);
const Standard_Integer j) {
return myP2[Index(i,j)];
};
-protected:
+
+private:
+
+ IntPatch_InfoPD (const IntPatch_InfoPD&);
+ IntPatch_InfoPD& operator=(const IntPatch_InfoPD&);
+
+private:
+
Standard_Integer myNBI;
char *myP1DS2;
char *myP2DS1;
// commercial license or contractual agreement.
#include <LDOM_OSStream.hxx>
-#include <NCollection_DefineAlloc.hxx>
#include <NCollection_IncAllocator.hxx>
#include <string.h>
#include <Standard.hxx>
#include <Standard_Integer.hxx>
-// One element of sequence
-/* Can only be allocated by the allocator and assumes it is IncAllocator, so
- no destructor is required.
-*/
-class LDOM_StringElem
+//=======================================================================
+//function : LDOM_StringElem()
+//purpose : Constructor
+//=======================================================================
+LDOM_SBuffer::LDOM_StringElem::LDOM_StringElem
+ ( const int theLength, const Handle_NCollection_BaseAllocator& theAlloc )
+: buf (reinterpret_cast<char*>(theAlloc->Allocate (theLength))),
+ len (0),
+ next(0)
{
- char* buf; // pointer on data string
- int len; // quantity of really written data
- LDOM_StringElem* next; // pointer on the next element of a sequence
-
- DEFINE_NCOLLECTION_ALLOC
-
- LDOM_StringElem (int aLen, const Handle_NCollection_BaseAllocator& theAlloc) :
- buf (reinterpret_cast<char*> (theAlloc->Allocate (aLen))),
- len (0),
- next (0)
- {
- }
-
-friend class LDOM_SBuffer;
-};
+}
//=======================================================================
//function : LDOM_SBuffer()
// and current element of sequence,
// also it has methods for the sequence management.
+#include <NCollection_DefineAlloc.hxx>
#include <NCollection_BaseAllocator.hxx>
#include <Standard_OStream.hxx>
#include <Standard_Boolean.hxx>
#include <stdlib.h>
#include <stdio.h> /* EOF */
-class LDOM_StringElem; // defined in cxx file
-
class LDOM_SBuffer : public streambuf
{
- public:
+ // One element of sequence.
+ // Can only be allocated by the allocator and assumes
+ // it is IncAllocator, so destructor isn't required.
+ struct LDOM_StringElem
+ {
+ char* buf; //!< pointer on data string
+ int len; //!< quantity of really written data
+ LDOM_StringElem* next; //!< pointer on the next element of a sequence
+
+ DEFINE_NCOLLECTION_ALLOC
+
+ LDOM_StringElem(const int, const Handle_NCollection_BaseAllocator&);
+ ~LDOM_StringElem();
+
+ private:
+ LDOM_StringElem (const LDOM_StringElem&);
+ LDOM_StringElem& operator= (const LDOM_StringElem&);
+ };
+
+public:
Standard_EXPORT LDOM_SBuffer (const Standard_Integer theMaxBuf);
// Constructor. Sets a default value for the
// length of each sequence element.
Standard_EXPORT ~LDOM_SBuffer ();
// Destructor
- private:
-
+private:
+
Standard_Integer myMaxBuf; // default length of one element
Standard_Integer myLength; // full length of contained data
LDOM_StringElem* myFirstString; // the head of the sequence
return Standard_Real (myBinom[N][P]);
}
+private:
+ BinomAllocator (const BinomAllocator&);
+ BinomAllocator& operator= (const BinomAllocator&);
+
private:
Standard_Integer** myBinom;
Standard_Integer myMaxBinom;
class ProjLib_OnSurface : public AppCont_Function
{
- Handle(Adaptor3d_HCurve) myCurve;
- Extrema_ExtPS *myExtPS;
-
- public :
+public:
ProjLib_OnSurface(const Handle(Adaptor3d_HCurve) & C,
const Handle(Adaptor3d_HSurface) & S)
gp_Pnt aPnt;
return OnSurface_D1(theT, aPnt, theVec(1), myCurve, myExtPS);
}
+
+private:
+ ProjLib_OnSurface (const ProjLib_OnSurface&);
+ ProjLib_OnSurface& operator= (const ProjLib_OnSurface&);
+
+private:
+ Handle(Adaptor3d_HCurve) myCurve;
+ Extrema_ExtPS* myExtPS;
};
}
private:
+ Select3D_PointData (const Select3D_PointData&);
+ Select3D_PointData& operator= (const Select3D_PointData&);
- // Default constructor
- Select3D_PointData () {}
+private:
Select3D_Pnt* mypolyg3d;
Select3D_Pnt2d* mypolyg2d;
// used to construct appropriate memory manager according
// to environment settings, and to ensure destruction upon exit
//=======================================================================
+class Standard_MMgrFactory
+{
+public:
+ static Standard_MMgrRoot* GetMMgr();
+ ~Standard_MMgrFactory();
-class Standard_MMgrFactory {
- public:
+private:
Standard_MMgrFactory();
- ~Standard_MMgrFactory();
- public:
+ Standard_MMgrFactory (const Standard_MMgrFactory&);
+ Standard_MMgrFactory& operator= (const Standard_MMgrFactory&);
+
+private:
Standard_MMgrRoot* myFMMgr;
};
Standard_MMgrFactory::~Standard_MMgrFactory()
{
- if ( myFMMgr ) {
+ if ( myFMMgr )
myFMMgr->Purge(Standard_True);
-// delete myFMMgr;
-// myFMMgr = 0;
- }
}
//=======================================================================
// be counting calls to Allocate() and Free()...
//
//=======================================================================
-
-static Standard_MMgrRoot* GetMMgr()
+Standard_MMgrRoot* Standard_MMgrFactory::GetMMgr()
{
static Standard_MMgrFactory aFactory;
return aFactory.myFMMgr;
Standard_Address Standard::Allocate(const Standard_Size size)
{
- return GetMMgr()->Allocate(size);
+ return Standard_MMgrFactory::GetMMgr()->Allocate(size);
}
//=======================================================================
void Standard::Free (Standard_Address theStorage)
{
- GetMMgr()->Free(theStorage);
+ Standard_MMgrFactory::GetMMgr()->Free(theStorage);
}
//=======================================================================
Standard_Address Standard::Reallocate (Standard_Address theStorage,
const Standard_Size theSize)
{
- return GetMMgr()->Reallocate (theStorage, theSize);
+ return Standard_MMgrFactory::GetMMgr()->Reallocate (theStorage, theSize);
}
//=======================================================================
Standard_Integer Standard::Purge()
{
- return GetMMgr()->Purge();
+ return Standard_MMgrFactory::GetMMgr()->Purge();
}
//=======================================================================