ADTF
IClassFactoryabstract

The IClassFactory interface provides methods for creating new class instances. More...

Inheritance diagram for IClassFactory:
[legend]

Public Member Functions

 ADTF_IID (IClassFactory, "class_factory.ant.ucom.adtf.iid")
 Marks the IClassFactory to be castable with the ucom_cast<> More...
 
virtual tResult CreateInstance (const char *strCID, iobject_ptr< IObject > &oObject, const tChar *strNameOfObject="") const =0
 Creates a new instance. More...
 
virtual tResult GetClasses (iobject_enum< const IClassInfo > &lstOfClasses) const =0
 Enumerates all classes supported by the class factory and pushes it to lstOfClasses This method should be used for debugging or testing purposes only. More...
 
- Public Member Functions inherited from IObject
 ADTF_IID (IObject, "object.ant.ucom.adtf.iid")
 Marks the IObject to be castable with the ucom_cast() More...
 

Protected Member Functions

 ~IClassFactory ()=default
 Protected destructor --> Use implemented Destroy() instead of delete!
 
- Protected Member Functions inherited from IObject
 ~IObject ()=default
 Protected destructor --> Use implemented Destroy() instead of delete!
 

Detailed Description

The IClassFactory interface provides methods for creating new class instances.

Definition at line 23 of file class_factory_intf.h.

Member Function Documentation

◆ ADTF_IID()

ADTF_IID ( IClassFactory  ,
"class_factory.ant.ucom.adtf.iid"   
)

Marks the IClassFactory to be castable with the ucom_cast<>

See also
ADTF_IID(_interface, _striid)

◆ CreateInstance()

virtual tResult CreateInstance ( const char *  strCID,
iobject_ptr< IObject > &  oObject,
const tChar strNameOfObject = "" 
) const
pure virtual

Creates a new instance.

The CreateInstance method creates a single uninitialized object of the class associated with a specified class identifier.

Parameters
[in]strCIDClass identifier of the object to create!
[in]strNameOfObjectObjectName identifier (will be relevant only if the ClassFactory can handle this).
[in,out]oObjectObject to create to be used to communicate with the object.
Returns
Returns a standard result code.
Return values
ERR_ERR_INVALID_LICENSEno valid license found
ReturnValue of iobject_ptr<IObject>::Reset()

◆ GetClasses()

virtual tResult GetClasses ( iobject_enum< const IClassInfo > &  lstOfClasses) const
pure virtual

Enumerates all classes supported by the class factory and pushes it to lstOfClasses This method should be used for debugging or testing purposes only.

Parameters
[in,out]lstOfClassesList to return the class information to. Use object_list or object_vector.
Returns
Returns a standard result code.
See also
object_list, object_vector.