summaryrefslogtreecommitdiff
path: root/XMPCommon/Interfaces/IMemoryAllocator_I.h
blob: 5b881c7b675305af21282dd121fa1d11d5e85bda (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#ifndef IMemoryAllocator_I_h__
#define IMemoryAllocator_I_h__ 1

// =================================================================================================
// Copyright Adobe
// Copyright 2014 Adobe
// 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__