24 template <
typename ...Classes>
28 template<
typename ...InnerClasses>
31 static tResult CreateInstance(
const char* ,
43 template<
typename Class,
typename ...InnerClasses>
46 static tResult CreateInstance(
const char* strCID,
48 const tChar* strNameOfObject =
"")
59 oObject.
Reset(pCreatedObject);
60 if (oObject.
Get() ==
nullptr)
71 catch (
const std::exception& oError)
127 const tChar* strNameOfObject =
"")
const
135 if (strClassToCreate.IsEmpty())
159 using ant::class_factory;
char tChar
The tChar defines the type for platform character set (platform and compiler dependent type).
#define RETURN_ERROR_DESC(_code,...)
Same as RETURN_ERROR(_error) using a printf like parameter list for detailed error description.
#define RETURN_NOERROR
Return status ERR_NOERROR, which requires the calling function's return type to be tResult.
#define RETURN_ERROR(code)
Return specific error code, which requires the calling function's return type to be tResult.
#define RETURN_IF_POINTER_NULL(_ptr)
Return ERR_POINTER if _ptr is nullptr, which requires the calling function's return type to be tResul...
A common result class usable as return value throughout.
The class class_factory provides a template based implementation of the IClassFactory interface,...
virtual tResult CreateInstance(const char *strCID, iobject_ptr< IObject > &oObject, const tChar *strNameOfObject="") const
Creates a new instance.
class_factory()
The Constructor create the class factory for exactly one object.
tResult GetClasses(iobject_enum< const IClassInfo > &lstOfClasses) const
Enumerates all classes supported by the class factory and pushes it to lstOfClasses This method shoul...
virtual ~class_factory()
standard DTOR for the class factory.
Interface definition for a container of objects.
virtual tResult PushObject(const value_type &oObject)=0
Pushes a object of value_type to the container.
virtual tResult Reset(const iobject_ptr< T > &i_oOther)=0
Reset this object_ptr<> with the content of another iobject_ptr<>
virtual T * Get() const =0
Get raw pointer to shared object.
Base object pointer to realize binary compatible reference counting in interface methods.
Object pointer implementation used for reference counting on objects of type IObject.
Use this template if you want to implement an ucom::ant::IObject based Interface and/or subclass an e...
string_base< cStackString > cString
cString implementation for a stack string which works on stack if string is lower than A_UTILS_DEFAUL...
Namespace for entire ADTF SDK.