soui 5.0.0.1
Soui5 Doc
 
Loading...
Searching...
No Matches
TplSObjectFactory< T > Class Template Reference

Template-based object factory. More...

#include <SObjectFactory.h>

Inheritance diagram for TplSObjectFactory< T >:
TObjRefImpl< IObjectFactory >

Public Member Functions

 TplSObjectFactory ()
 Default constructor.
 
void OnFinalRelease ()
 Called when the final reference is released.
 
LPCWSTR BaseClassName () SCONST OVERRIDE
 Gets the base class name of the object.
 
IObject * NewObject () SCONST OVERRIDE
 Creates a new object of type T.
 
IObjectFactory * Clone () SCONST OVERRIDE
 Clones the object factory.
 
SObjectInfo GetObjectInfo () SCONST OVERRIDE
 Gets the object information for the factory.
 
- Public Member Functions inherited from TObjRefImpl< IObjectFactory >
 TObjRefImpl ()
 Constructor that initializes the reference count to 1.
 
virtual ~TObjRefImpl ()
 Virtual destructor.
 
long AddRef () override
 Increments the reference count.
 
long Release () override
 Decrements the reference count and deletes the object if the count reaches zero.
 
void OnFinalRelease () override
 Deletes the object.
 

Additional Inherited Members

- Protected Attributes inherited from TObjRefImpl< IObjectFactory >
LONG m_cRef
 Reference count.
 

Detailed Description

template<typename T>
class TplSObjectFactory< T >

Template-based object factory.

Template Parameters
TType of the object to be created.

Description: Implements the IObjectFactory interface for creating objects of type T.

Definition at line 80 of file SObjectFactory.h.

Constructor & Destructor Documentation

◆ TplSObjectFactory()

template<typename T>
TplSObjectFactory< T >::TplSObjectFactory ( )
inline

Default constructor.

Definition at line 85 of file SObjectFactory.h.

Member Function Documentation

◆ BaseClassName()

template<typename T>
LPCWSTR TplSObjectFactory< T >::BaseClassName ( )
inline

Gets the base class name of the object.

Returns
Base class name.

Definition at line 101 of file SObjectFactory.h.

◆ Clone()

template<typename T>
IObjectFactory * TplSObjectFactory< T >::Clone ( )
inline

Clones the object factory.

Returns
Pointer to the cloned factory.

Definition at line 119 of file SObjectFactory.h.

◆ GetObjectInfo()

template<typename T>
SObjectInfo TplSObjectFactory< T >::GetObjectInfo ( )
inline

Gets the object information for the factory.

Returns
Object information structure.

Definition at line 128 of file SObjectFactory.h.

◆ NewObject()

template<typename T>
IObject * TplSObjectFactory< T >::NewObject ( )
inline

Creates a new object of type T.

Returns
Pointer to the new object.

Definition at line 110 of file SObjectFactory.h.

◆ OnFinalRelease()

template<typename T>
void TplSObjectFactory< T >::OnFinalRelease ( )
inline

Called when the final reference is released.

Definition at line 92 of file SObjectFactory.h.


The documentation for this class was generated from the following file: