ADTF
Loading...
Searching...
No Matches
class_factory_pooled.h
Go to the documentation of this file.
1
7#ifndef _ADTF_UCOM_ANT_POOLED_CLASS_FACTORY_TEMPLATE_HEADER_
8#define _ADTF_UCOM_ANT_POOLED_CLASS_FACTORY_TEMPLATE_HEADER_
9
10namespace adtf
11{
12namespace ucom
13{
14namespace ant
15{
16
17template<typename T>
18class cPooledClassFactory : public catwo::object<IObjectPool, IClassFactory>
19{
20public:
22
23public: //constructor/destruction
24 cPooledClassFactory();
25 virtual ~cPooledClassFactory();
26
27public: //implementing IClassFactory
28 virtual tResult CreateInstance(const char* strCID,
29 iobject_ptr<IObject>& oObject,
30 const tChar* strNameOfObject = "") const;
31
32 virtual tResult GetClasses(iobject_enum<const IClassInfo>& lstOfClasses) const;
33
34 //implementing IObjectPool
35 virtual tResult ReleaseObject(const iobject_ptr<IObject>& i_pRelease);
36
42 virtual size_t GetCacheSize() const;
43
48 virtual size_t GetUseCount() const;
49
62 virtual tResult ResizeCache(size_t i_nSize);
63
64private:
65
66};//class cPooledClassFactory
67
68template<typename T>
69cPooledClassFactory<T>::cPooledClassFactory()
70{
71}
72
73template<typename T>
74cPooledClassFactory<T>::~cPooledClassFactory()
75{
76}
77
78template<typename T>
81 const char* strNameOfObject) const
82{
83 return ERR_NOT_IMPL;
84}
85
86template<typename T>
87tResult cPooledClassFactory<T>::GetClasses(iobject_enum<const IClassInfo>& lstOfClasses) const
88{
89 return ERR_NOT_IMPL;
90}
91
92template<typename T>
93tResult cPooledClassFactory<T>::ReleaseObject(const iobject_ptr<ucom::ant::IObject>& i_pRelease)
94{
95 return ERR_NOT_IMPL;
96}
97
98template<typename T>
100{
101 return 0;
102}
103
104template<typename T>
106{
107 return 0;
108}
109
110template<typename T>
112{
113
114 return ERR_NOT_IMPL;
115}
116
117}//ns ant
118
121
122}//ns ucom
123}//ns adtf
124
125
126#endif //_ADTF_UCOM_ANT_POOLED_CLASS_FACTORY_TEMPLATE_HEADER_
#define UCOM_RESOLVE(...)
Resolve a path to a base class which is inherited multiple times.
Definition adtf_iid.h:46
A_UTILS_NS::cResult tResult
For backwards compatibility and to bring latest version into scope.
Definition result.h:736
Definition object_pool_intf.h:24
Definition object_intf.h:33
Definition class_factory_pooled.h:19
virtual tResult ResizeCache(size_t i_nSize)
Resize the cache.
Definition class_factory_pooled.h:111
virtual size_t GetUseCount() const
Get amount of objects currently in use.
Definition class_factory_pooled.h:105
virtual size_t GetCacheSize() const
Get entire size of the cache which is also the amount of preallocated objects.
Definition class_factory_pooled.h:99
Definition object_list.h:22
Base object pointer to realize binary compatible reference counting in interface methods.
Definition object_ptr_intf.h:112
Always bringing the latest version of ant::cPooledClassFactory into scope.
Definition class_factory_pooled.h:19
Definition object.h:397
Namespace for all functionality of the ADTF UCOM SDK provided since v3.0.
Definition test_runtime.h:14
Namespace for the ADTF uCOM SDK.
Definition adtf_system.h:324
ant::iobject_ptr< T > iobject_ptr
Alias always bringing the latest version of ant::iobject_ptr into scope.
Definition object_ptr_intf.h:437
Namespace for all functionality provided by ADTF and its SDKs.
Definition adtf_client_connector.h:14