Always bringing the latest version of ant::cPooledClassFactory into scope.
More...
Inherits adtf::ucom::catwo::object< IObjectPool, IClassFactory >.
|
|
virtual tResult | CreateInstance (const char *strCID, iobject_ptr< IObject > &oObject, const tChar *strNameOfObject="") const |
| |
|
virtual tResult | GetClasses (iobject_enum< const IClassInfo > &lstOfClasses) const |
| |
|
virtual tResult | ReleaseObject (const iobject_ptr< IObject > &i_pRelease) |
| |
| virtual size_t | GetCacheSize () const |
| | Get entire size of the cache which is also the amount of preallocated objects.
|
| |
| virtual size_t | GetUseCount () const |
| | Get amount of objects currently in use.
|
| |
| virtual tResult | ResizeCache (size_t i_nSize) |
| | Resize the cache.
|
| |
| tResult | GetInterface (const char *i_strIID, void *&o_pInterface) override |
| | Query interfaces on an object.
|
| |
| tResult | GetInterface (const char *i_strIID, const void *&o_pInterface) const override |
| | Provides const correct interface querying.
|
| |
| void | Destroy () const override |
| | Switch from non-virtual destructor to virtual destructor.
|
| |
| tResult | GetInterface (const char *i_strIID, void *&o_pInterface) override |
| | Query interfaces on an object.
|
| |
| tResult | GetInterface (const char *i_strIID, const void *&o_pInterface) const override |
| | Provides const correct interface querying.
|
| |
| void | Destroy () const override |
| | Switch from non-virtual destructor to virtual destructor.
|
| |
| tResult | GetInterface (const char *i_strIID, void *&o_pInterface) override |
| | Query interfaces on an object.
|
| |
| tResult | GetInterface (const char *i_strIID, const void *&o_pInterface) const override |
| | Provides const correct interface querying.
|
| |
| void | Destroy () const override |
| | Switch from non-virtual destructor to virtual destructor.
|
| |
| | ADTF_IID (IObject, "object.ant.ucom.adtf.iid") |
| |
|
|
| ~IObject ()=default |
| | Protected destructor --> Only the final implementation can be destroyed!
|
| |
template<typename T>
class adtf::ucom::cPooledClassFactory< T >
Always bringing the latest version of ant::cPooledClassFactory into scope.
◆ GetCacheSize()
Get entire size of the cache which is also the amount of preallocated objects.
- Note
- To retrieve the current cache size , use
GetCacheSize() - GetUseCount()
- Returns
- Entire size of the cache.
◆ GetUseCount()
Get amount of objects currently in use.
- Returns
- Amount of objects currently in use.
◆ ResizeCache()
Resize the cache.
- Parameters
-
| [in] | i_nSize | New size of the cache |
- Postcondition
- If i_nSize > GetCacheSize() --> Memory for the cache is (re-)allocated.
-
If i_nSize < GetCacheSize() --> Memory from the cache is released. If the resulting cache size would be smaller zero, nothing is released and ERR_RESOURCE_IN_USE is returned.
-
If i_nSize == GetCacheSize() --> Nothing is done.
- Returns
- Standard error code
- Return values
-
| ERR_NOERROR | Everything went fine. |
| ERR_MEMORY | Memory could not be allocated. |
| ERR_RESOURCE_IN_USE | Wanted cache size is too small for all currently held objects |
The documentation for this class was generated from the following file: