ADTF  3.18.2
object_pool_intf.h
Go to the documentation of this file.
1 
8 #ifndef _ADTF_UCOM_ANT_OBJECT_POOL_INTERFACE_INCLUDES_HEADER_
9 #define _ADTF_UCOM_ANT_OBJECT_POOL_INTERFACE_INCLUDES_HEADER_
10 
11 namespace adtf
12 {
13 namespace ucom
14 {
15 namespace ant
16 {
17 
23 class DOEXPORT IObjectPool : public IObject
24 {
25 public:
30  ADTF_IID(IObjectPool, "object_pool.ant.ucom.adtf.iid");
31 
32 public:
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 
71 protected:
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_
Base class for every interface type within the uCOM.
Definition: object_intf.h:31
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 --> Use implemented Destroy() instead of delete!
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.
ant::IObjectPool IObjectPool
Alias always bringing the latest version of ant::IObjectPool into scope.
Namespace for entire ADTF SDK.