ADTF
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
object_pool_intf.h
Go to the documentation of this file.
1
7
8#ifndef _ADTF_UCOM_ANT_OBJECT_POOL_INTERFACE_INCLUDES_HEADER_
9#define _ADTF_UCOM_ANT_OBJECT_POOL_INTERFACE_INCLUDES_HEADER_
10
11namespace adtf
12{
13namespace ucom
14{
15namespace ant
16{
17
23class DOEXPORT IObjectPool : public IObject
24{
25public:
30 ADTF_IID(IObjectPool, "object_pool.ant.ucom.adtf.iid");
31
32public:
42 virtual tResult ReleaseObject(const iobject_ptr<IObject>& i_pRelease) = 0;
43
49 virtual size_t GetCacheSize() const = 0;
50
55 virtual size_t GetUseCount() const = 0;
56
69 virtual tResult ResizeCache(size_t i_nSize) = 0;
70
71protected:
73 ~IObjectPool() = default;
74};//class IObjectPool
75
76}//namespace ant
77
80
81}//namespace ucom
82}//namespace adtf
83
84#endif //_ADTF_UCOM_ANT_OBJECT_POOL_INTERFACE_INCLUDES_HEADER_
A_UTILS_NS::cResult tResult
For backwards compatibility and to bring latest version into scope.
Base class for every interface type within the uCOM.
Definition object_intf.h:33
The IObjectPool interface provides methods for managing pools of objects.
virtual tResult ReleaseObject(const iobject_ptr< IObject > &i_pRelease)=0
A pooled Object will manage its Destroy Method with the UnrefObject Method.
virtual size_t GetUseCount() const =0
Get amount of objects currently in use.
virtual tResult ResizeCache(size_t i_nSize)=0
Resize the cache.
virtual size_t GetCacheSize() const =0
Get entire size of the cache which is also the amount of preallocated objects.
~IObjectPool()=default
Protected destructor --> Only the final implementation can be destroyed!
ADTF_IID(IObjectPool, "object_pool.ant.ucom.adtf.iid")
Marks the IObjectPool to be castable with the ucom_cast<>
Base object pointer to realize binary compatible reference counting in interface methods.
Namespace for all functionality provided since v3.0.
Namespace for the ADTF uCOM3 SDK.
ant::IObjectPool IObjectPool
Alias always bringing the latest version of IObjectPool into scope.
Namespace for entire ADTF SDK.