1 // File generated by CPPExt (Value)
2 // Copyright (C) 1991,1995 by
4 // MATRA DATAVISION, FRANCE
6 // This software is furnished in accordance with the terms and conditions
7 // of the contract and with the inclusion of the above copyright notice.
8 // This software or any other copy thereof may not be provided or otherwise
9 // be made available to any other person. No title to an ownership of the
10 // software is hereby transferred.
12 // At the termination of the contract, the software and all copies of this
13 // software must be deleted.
15 #ifndef _NMTTools_CommonBlockPool_HeaderFile
16 #define _NMTTools_CommonBlockPool_HeaderFile
18 #ifndef _Standard_Address_HeaderFile
19 #include <Standard_Address.hxx>
21 #ifndef _Standard_Integer_HeaderFile
22 #include <Standard_Integer.hxx>
24 #ifndef _Standard_Boolean_HeaderFile
25 #include <Standard_Boolean.hxx>
27 class Standard_OutOfRange;
28 class Standard_OutOfMemory;
29 class NMTTools_ListOfCommonBlock;
32 #ifndef _Standard_HeaderFile
33 #include <Standard.hxx>
35 #ifndef _Standard_Macro_HeaderFile
36 #include <Standard_Macro.hxx>
39 class NMTTools_CommonBlockPool {
43 void* operator new(size_t,void* anAddress)
47 void* operator new(size_t size)
49 return Standard::Allocate(size);
51 void operator delete(void *anAddress)
53 if (anAddress) Standard::Free((Standard_Address&)anAddress);
57 Standard_EXPORT NMTTools_CommonBlockPool(const Standard_Integer Length = 0,const Standard_Integer BlockLength = 5);
58 Standard_EXPORT void Resize(const Standard_Integer theNewLength) ;
59 Standard_EXPORT void Destroy() ;
60 ~NMTTools_CommonBlockPool()
65 Standard_EXPORT Standard_Integer Length() const;
66 Standard_EXPORT Standard_Integer Extent() const;
67 Standard_EXPORT Standard_Integer FactLength() const;
68 Standard_EXPORT Standard_Integer Append(const NMTTools_ListOfCommonBlock& Value) ;
69 Standard_EXPORT void Remove(const Standard_Integer Index) ;
70 Standard_EXPORT const NMTTools_ListOfCommonBlock& Value(const Standard_Integer Index) const;
71 const NMTTools_ListOfCommonBlock& operator ()(const Standard_Integer Index) const
76 Standard_EXPORT NMTTools_ListOfCommonBlock& ChangeValue(const Standard_Integer Index) ;
77 NMTTools_ListOfCommonBlock& operator ()(const Standard_Integer Index)
79 return ChangeValue(Index);
82 Standard_EXPORT void SetBlockLength(const Standard_Integer aBL) ;
83 Standard_EXPORT Standard_Integer BlockLength() const;
103 Standard_EXPORT NMTTools_CommonBlockPool(const NMTTools_CommonBlockPool& AnArray);
104 Standard_EXPORT NMTTools_CommonBlockPool& Assign(const NMTTools_CommonBlockPool& Other) ;
105 NMTTools_CommonBlockPool& operator =(const NMTTools_CommonBlockPool& Other)
107 return Assign(Other);
110 Standard_EXPORT Standard_Boolean IsInvalidIndex(const Standard_Integer Index) const;
115 Standard_Address myStart;
116 Standard_Integer myLength;
117 Standard_Integer myFactLength;
118 Standard_Integer myBlockLength;
119 Standard_Boolean myIsAllocated;
128 // other Inline functions and methods (like "C++: function call" methods)