XMP Toolkit SDK  6.0.0
AdobeXMPCommon::IObjectFactory_v1 Class Referenceabstract

Version1 of a interface that represents a factory to create various artifacts defined within AdobeXMPCommon namespace. More...

#include <IObjectFactory.h>

Inheritance diagram for AdobeXMPCommon::IObjectFactory_v1:
AdobeXMPCommon::IVersionable AdobeXMPCore::ICoreObjectFactory_v1

Public Member Functions

virtual pIUTF8String_base APICALL CreateUTF8String (const char *buf, sizet count, pcIError_base &error) __NOTHROW__=0
 Creates an IUTF8String object. More...
 
virtual pIError_base APICALL CreateError (uint32 domain, uint32 code, uint32 severity, pcIError_base &error) __NOTHROW__=0
 Creates an IError object. More...
 
virtual ~IObjectFactory_v1 () __NOTHROW__
 
 REQ_FRIEND_CLASS_DECLARATION ()
 
- Public Member Functions inherited from AdobeXMPCommon::IVersionable
template<typename requestedInterface >
XMP_PRIVATE requestedInterface * GetInterfacePointer ()
 Get the raw pointer to an interface object implementing the requested version. More...
 
template<typename requestedInterface >
const XMP_PRIVATE requestedInterface * GetInterfacePointer () const
 Get the raw pointer to a const interface object implementing the requested version. More...
 

Static Public Member Functions

static XMP_PRIVATE uint64 GetInterfaceID ()
 Returns the unique ID assigned to the interface. More...
 
static XMP_PRIVATE uint32 GetInterfaceVersion ()
 Returns the version of the interface. More...
 
static XMP_PRIVATE pIObjectFactory MakeObjectFactory (pIObjectFactory_base ptr)
 
static XMP_PRIVATE pcIObjectFactory MakeObjectFactory (pcIObjectFactory_base ptr)
 

Additional Inherited Members

- Protected Member Functions inherited from AdobeXMPCommon::IVersionable
virtual ~IVersionable ()
 
 REQ_FRIEND_CLASS_DECLARATION ()
 

Detailed Description

Version1 of a interface that represents a factory to create various artifacts defined within AdobeXMPCommon namespace.

Provides all the functions to create instances of various artifacts defined with AdobeXMPCommon namespace. This is the interface through which clients of the library actually get access to all other interfaces.

Definition at line 27 of file IObjectFactory.h.

Constructor & Destructor Documentation

◆ ~IObjectFactory_v1()

virtual AdobeXMPCommon::IObjectFactory_v1::~IObjectFactory_v1 ( )
inlinevirtual

Definition at line 82 of file IObjectFactory.h.

82 {};

Member Function Documentation

◆ CreateError()

virtual pIError_base APICALL AdobeXMPCommon::IObjectFactory_v1::CreateError ( uint32  domain,
uint32  code,
uint32  severity,
pcIError_base error 
)
pure virtual

Creates an IError object.

Parameters
[in]domainAn unsigned 32 bit integer value representing the error domain.
[in]codeAn unsigned 32 bit integer value representing the error code.
[in]severityAn unsigned 32 bit integer value representing the severity of the error.
[out]errorA reference to a pointer to const IError object which will be filled with the error object in case of any error.
Attention
The returned pointer is allocated on heap by the module so client is responsible for its release. They should call Release once they no longer need this object.

◆ CreateUTF8String()

virtual pIUTF8String_base APICALL AdobeXMPCommon::IObjectFactory_v1::CreateUTF8String ( const char *  buf,
sizet  count,
pcIError_base error 
)
pure virtual

Creates an IUTF8String object.

Parameters
[in]bufpointer to a constant char buffer containing content. It can be null terminated or not. NULL pointer will be treated as empty string.
[in]countA value of #AdobeXMPCommon::sizet indicating the length in case buf is not null terminated. In case buf is null terminated it can be set to npos.
[out]errorA reference to a pointer to const IError object which will be filled with the error object in case of any error.
Attention
The returned pointer is allocated on heap by the module so client is responsible for its release. They should call Release once they no longer need this object.

◆ GetInterfaceID()

static XMP_PRIVATE uint64 AdobeXMPCommon::IObjectFactory_v1::GetInterfaceID ( )
inlinestatic

Returns the unique ID assigned to the interface.

Returns
64 bit unsigned integer representing the unique ID assigned to the interface.

Definition at line 74 of file IObjectFactory.h.

74 { return kIObjectFactoryID; }

References AdobeXMPCommon::kIObjectFactoryID().

◆ GetInterfaceVersion()

static XMP_PRIVATE uint32 AdobeXMPCommon::IObjectFactory_v1::GetInterfaceVersion ( )
inlinestatic

Returns the version of the interface.

Returns
32 bit unsigned integer representing the version of the interface.

Definition at line 80 of file IObjectFactory.h.

80 { return 1; }

◆ MakeObjectFactory() [1/2]

static XMP_PRIVATE pcIObjectFactory AdobeXMPCommon::IObjectFactory_v1::MakeObjectFactory ( pcIObjectFactory_base  ptr)
inlinestatic

Definition at line 64 of file IObjectFactory.h.

64  {
65  return MakeObjectFactory( const_cast< pIObjectFactory_base >( ptr ) );
66  }

◆ MakeObjectFactory() [2/2]

static XMP_PRIVATE pIObjectFactory AdobeXMPCommon::IObjectFactory_v1::MakeObjectFactory ( pIObjectFactory_base  ptr)
inlinestatic

Convert raw pointer to shared pointer. The raw pointer is of version 1 interface where as the returned returned pointer depends on the version client is interested in.

Returns
Raw pointer to const or non constant IObjectFactory interface.

Definition at line 61 of file IObjectFactory.h.

61  {
62  return IObjectFactory::GetInterfaceVersion() > 1 ? ptr->GetInterfacePointer< IObjectFactory >() : ptr;
63  }

References AdobeXMPCommon::IVersionable::GetInterfacePointer().

◆ REQ_FRIEND_CLASS_DECLARATION()

AdobeXMPCommon::IObjectFactory_v1::REQ_FRIEND_CLASS_DECLARATION ( )

The documentation for this class was generated from the following file:
AdobeXMPCommon::IObjectFactory_v1::MakeObjectFactory
static XMP_PRIVATE pIObjectFactory MakeObjectFactory(pIObjectFactory_base ptr)
Definition: IObjectFactory.h:61
AdobeXMPCommon::kIObjectFactoryID
static const uint64 kIObjectFactoryID(0x6e4f626a46616374)
AdobeXMPCommon::pIObjectFactory_base
IObjectFactory_v1 * pIObjectFactory_base
Definition: XMPCommonFwdDeclarations.h:54