ADTF  3.18.4
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 
10 namespace adtf
11 {
12 namespace ucom
13 {
14 namespace ant
15 {
16 
17 template<typename T>
18 class cPooledClassFactory : public catwo::object<IObjectPool, IClassFactory>
19 {
20 public:
21  UCOM_RESOLVE(IObject, IObjectPool);
22 
23 public: //constructor/destruction
25  virtual ~cPooledClassFactory();
26 
27 public: //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 
64 private:
65 
66 };//class cPooledClassFactory
67 
68 template<typename T>
70 {
71 }
72 
73 template<typename T>
75 {
76 }
77 
78 template<typename T>
79 tResult cPooledClassFactory<T>::CreateInstance(const char* strCID,
80  iobject_ptr<ucom::ant::IObject>& oObject,
81  const char* strNameOfObject) const
82 {
83  return ERR_NOT_IMPL;
84 }
85 
86 template<typename T>
87 tResult cPooledClassFactory<T>::GetClasses(iobject_enum<const IClassInfo>& lstOfClasses) const
88 {
89  return ERR_NOT_IMPL;
90 }
91 
92 template<typename T>
93 tResult cPooledClassFactory<T>::ReleaseObject(const iobject_ptr<ucom::ant::IObject>& i_pRelease)
94 {
95  return ERR_NOT_IMPL;
96 }
97 
98 template<typename T>
100 {
101  return 0;
102 }
103 
104 template<typename T>
106 {
107  return 0;
108 }
109 
110 template<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_
char tChar
The tChar defines the type for platform character set (platform and compiler dependent type).
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 size_t GetUseCount() const
Get amount of objects currently in use.
virtual size_t GetCacheSize() const
Get entire size of the cache which is also the amount of preallocated objects.
virtual tResult ResizeCache(size_t i_nSize)
Resize the cache.
Interface definition for a container of objects.
Definition: object_list.h:22
Base object pointer to realize binary compatible reference counting in interface methods.
Use this template if you want to implement an ucom::ant::IObject based Interface and/or subclass an e...
Definition: object.h:379
Namespace for entire ADTF SDK.