XMP Toolkit SDK  6.0.0
IObjectFactory.h
Go to the documentation of this file.
1 #ifndef IObjectFactory_h__
2 #define IObjectFactory_h__ 1
3 
4 // =================================================================================================
5 // Copyright Adobe
6 // Copyright 2015 Adobe
7 // All Rights Reserved
8 //
9 // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
10 // of the Adobe license agreement accompanying it. If you have received this file from a source other
11 // than Adobe, then your use, modification, or distribution of it requires the prior written permission
12 // of Adobe.
13 // =================================================================================================
14 
17 
18 namespace AdobeXMPCommon {
19 
26 
28  : public IVersionable
29  {
30  public:
31 
42  virtual pIUTF8String_base APICALL CreateUTF8String( const char * buf, sizet count, pcIError_base & error ) __NOTHROW__ = 0;
43 
53  virtual pIError_base APICALL CreateError( uint32 domain, uint32 code, uint32 severity, pcIError_base & error ) __NOTHROW__ = 0;
54 
62  return IObjectFactory::GetInterfaceVersion() > 1 ? ptr->GetInterfacePointer< IObjectFactory >() : ptr;
63  }
65  return MakeObjectFactory( const_cast< pIObjectFactory_base >( ptr ) );
66  }
69 
75 
80  XMP_PRIVATE static uint32 GetInterfaceVersion() { return 1; }
81 
83 
84  #ifdef FRIEND_CLASS_DECLARATION
85  FRIEND_CLASS_DECLARATION();
86  #endif
88  };
89 
90 }
91 
92 #endif // IObjectFactory_h__
AdobeXMPCommon::IObjectFactory_v1::~IObjectFactory_v1
virtual ~IObjectFactory_v1() __NOTHROW__
Definition: IObjectFactory.h:82
XMP_PRIVATE
#define XMP_PRIVATE
Definition: XMP_Environment.h:222
__NOTHROW__
#define __NOTHROW__
Definition: XMPCommonDefines.h:147
AdobeXMPCommon::IError_v1
Version1 of the interface that represents an error/warning encountered during processing.
Definition: IError.h:28
XMP_PUBLIC
#define XMP_PUBLIC
Definition: XMP_Environment.h:221
AdobeXMPCommon::pIObjectFactory
IObjectFactory * pIObjectFactory
Definition: XMPCommonFwdDeclarations.h:57
AdobeXMPCommon::IObjectFactory_v1
Version1 of a interface that represents a factory to create various artifacts defined within AdobeXMP...
Definition: IObjectFactory.h:27
AdobeXMPCommon
Definition: IConfigurable.h:21
XMPCommonFwdDeclarations.h
AdobeXMPCommon::pcIObjectFactory
const typedef IObjectFactory * pcIObjectFactory
Definition: XMPCommonFwdDeclarations.h:58
AdobeXMPCommon::uint32
XMP_Uns32 uint32
Definition: XMPCommonDefines.h:174
AdobeXMPCommon::IObjectFactory_v1::MakeObjectFactory
static XMP_PRIVATE pIObjectFactory MakeObjectFactory(pIObjectFactory_base ptr)
Definition: IObjectFactory.h:61
AdobeXMPCommon::kIObjectFactoryID
static const uint64 kIObjectFactoryID(0x6e4f626a46616374)
AdobeXMPCommon::IVersionable::GetInterfacePointer
XMP_PRIVATE requestedInterface * GetInterfacePointer()
Get the raw pointer to an interface object implementing the requested version.
Definition: IVersionable.h:40
AdobeXMPCommon::sizet
uint32 sizet
Definition: XMPCommonDefines.h:176
AdobeXMPCommon::IObjectFactory_v1::GetInterfaceVersion
static XMP_PRIVATE uint32 GetInterfaceVersion()
Returns the version of the interface.
Definition: IObjectFactory.h:80
AdobeXMPCommon::IVersionable
Interface that serves as the base interface for all the externally exposed interfaces which needs to ...
Definition: IVersionable.h:30
AdobeXMPCommon::IObjectFactory_v1::GetInterfaceID
static XMP_PRIVATE uint64 GetInterfaceID()
Returns the unique ID assigned to the interface.
Definition: IObjectFactory.h:74
REQ_FRIEND_CLASS_DECLARATION
#define REQ_FRIEND_CLASS_DECLARATION()
Definition: XMPCommonDefines.h:137
AdobeXMPCommon::pcIObjectFactory_base
const typedef IObjectFactory_v1 * pcIObjectFactory_base
Definition: XMPCommonFwdDeclarations.h:55
IVersionable.h
AdobeXMPCommon::IObjectFactory_v1::MakeObjectFactory
static XMP_PRIVATE pcIObjectFactory MakeObjectFactory(pcIObjectFactory_base ptr)
Definition: IObjectFactory.h:64
AdobeXMPCommon::IUTF8String_v1
Version1 of the interface that represents an UTF8String.
Definition: IUTF8String.h:25
AdobeXMPCommon::pcIError_base
const typedef IError_v1 * pcIError_base
Definition: XMPCommonFwdDeclarations.h:64
AdobeXMPCommon::uint64
XMP_Uns64 uint64
Definition: XMPCommonDefines.h:172