// This file is generated by WOK (CPPExt). // Please do not edit this file; modify original file instead. // The copyright and license terms as defined for the original file apply to // this header file considered to be the "object code" form of the original source. #ifndef _MMgt_StackManager_HeaderFile #define _MMgt_StackManager_HeaderFile #ifndef _Standard_HeaderFile #include #endif #ifndef _Standard_Macro_HeaderFile #include #endif #ifndef _Standard_Integer_HeaderFile #include #endif #ifndef _Standard_Address_HeaderFile #include #endif #ifndef _Standard_OStream_HeaderFile #include #endif class Standard_OutOfMemory; class Standard_ProgramError; //! The class provides primitive facilities for managing
//! stack-based storage.
//!
class MMgt_StackManager { public: void* operator new(size_t,void* anAddress) { return anAddress; } void* operator new(size_t size) { return Standard::Allocate(size); } void operator delete(void *anAddress) { if (anAddress) Standard::Free((Standard_Address&)anAddress); } //! Constructs a StackManager with an empty free stack.
Standard_EXPORT MMgt_StackManager(); //! Returns the address of a storage of the given size located on
//! the top of the free stack.
Standard_EXPORT Standard_Address Allocate(const Standard_Integer size) ; //! Deallocates the storage of the given size from the free stack
//! and nullify the address.
Standard_EXPORT void Free(Standard_Address& aStack,const Standard_Integer aSize) ; //! There is no way to have a "ShallowCopy" of a "StackManager"
Standard_EXPORT MMgt_StackManager ShallowCopy() const; //! Prints the contents of on the stream .
Standard_EXPORT void ShallowDump(Standard_OStream& S) const; //! Deallocates the storage associated to stack.
//! Delete .
Standard_EXPORT void Destructor() ; ~MMgt_StackManager() { Destructor(); } protected: private: //! Deallocates the storage associated to stack.
Standard_EXPORT void Purge() ; Standard_Integer myFreeListSize; Standard_Address myFreeList; }; // other Inline functions and methods (like "C++: function call" methods) inline MMgt_StackManager ShallowCopy(const MMgt_StackManager& me) { return me.ShallowCopy(); } inline void ShallowDump(const MMgt_StackManager& me,Standard_OStream& S) { me.ShallowDump(S); } #endif