diff options
Diffstat (limited to 'XMPCommon/Interfaces/IMemoryAllocator_I.h')
-rw-r--r-- | XMPCommon/Interfaces/IMemoryAllocator_I.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/XMPCommon/Interfaces/IMemoryAllocator_I.h b/XMPCommon/Interfaces/IMemoryAllocator_I.h new file mode 100644 index 0000000..77cdec0 --- /dev/null +++ b/XMPCommon/Interfaces/IMemoryAllocator_I.h @@ -0,0 +1,53 @@ +#ifndef IMemoryAllocator_I_h__ +#define IMemoryAllocator_I_h__ 1 + +// ================================================================================================= +// ADOBE SYSTEMS INCORPORATED +// Copyright 2014 Adobe Systems Incorporated +// All Rights Reserved +// +// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms +// of the Adobe license agreement accompanying it. +// ================================================================================================= + +#include "XMPCommon/XMPCommonFwdDeclarations_I.h" +#include "XMPCommon/Interfaces/IMemoryAllocator.h" + +namespace XMP_COMPONENT_INT_NAMESPACE { + + //! + //! \brief Internal interface that represents an interface to be implemented by client in case + //! he is interested in controlling the memory allocation and deallocation on the heap. + //! \details In case client is interested in controlling the memory allocation and deallocation on + //! the heap he can implement this interface and register the same with the + //! #AdobeXMPCommon::IConfigurationManager. For every request of memory allocation or deallocation on + //! the heap corresponding function will be called by the library. + //! \attention Support for Multi threading is under clients hand. + //! + class IMemoryAllocator_I + : public virtual IMemoryAllocator + { + public: + + //! + //! Get the current error notifier. + //! + static pIMemoryAllocator GetMemoryAllocator() __NOTHROW__; + + //! + //! Set the current error notifier. + //! + static pIMemoryAllocator SetMemoryAllocator( pIMemoryAllocator_base memoryAllocator ) __NOTHROW__; + + + protected: + ~IMemoryAllocator_I() {} + + #ifdef FRIEND_CLASS_DECLARATION + REQ_FRIEND_CLASS_DECLARATION(); + #endif + REQ_FRIEND_CLASS_DECLARATION(); + }; +} + +#endif // IMemoryAllocator_I_h__ |