IObjectFactory.h
Go to the documentation of this file.
1 #ifndef IObjectFactory_h__
2 #define IObjectFactory_h__ 1
3 
4 // =================================================================================================
5 // ADOBE SYSTEMS INCORPORATED
6 // Copyright 2015 Adobe Systems Incorporated
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.
11 // =================================================================================================
12 
15 
16 namespace AdobeXMPCommon {
17 
24 
26  : public IVersionable
27  {
28  public:
29 
40  virtual pIUTF8String_base APICALL CreateUTF8String( const char * buf, sizet count, pcIError_base & error ) __NOTHROW__ = 0;
41 
51  virtual pIError_base APICALL CreateError( uint32 domain, uint32 code, uint32 severity, pcIError_base & error ) __NOTHROW__ = 0;
52 
60  return IObjectFactory::GetInterfaceVersion() > 1 ? ptr->GetInterfacePointer< IObjectFactory >() : ptr;
61  }
63  return MakeObjectFactory( const_cast< pIObjectFactory_base >( ptr ) );
64  }
67 
73 
78  XMP_PRIVATE static uint32 GetInterfaceVersion() { return 1; }
79 
80  virtual ~IObjectFactory_v1() __NOTHROW__ {};
81 
82  #ifdef FRIEND_CLASS_DECLARATION
83  FRIEND_CLASS_DECLARATION();
84  #endif
86  };
87 
88 }
89 
90 #endif // IObjectFactory_h__
static XMP_PRIVATE uint64 GetInterfaceID()
Returns the unique ID assigned to the interface.
static XMP_PRIVATE pcIObjectFactory MakeObjectFactory(pcIObjectFactory_base ptr)
#define XMP_PUBLIC
#define __NOTHROW__
virtual ~IObjectFactory_v1() __NOTHROW__
static XMP_PRIVATE pIObjectFactory MakeObjectFactory(pIObjectFactory_base ptr)
XMP_PRIVATE requestedInterface * GetInterfacePointer()
Get the raw pointer to an interface object implementing the requested version.
Definition: IVersionable.h:38
const IObjectFactory * pcIObjectFactory
Version1 of a interface that represents a factory to create various artifacts defined within AdobeXMP...
static const uint64 kIObjectFactoryID(0x6e4f626a46616374)
Version1 of the interface that represents an error/warning encountered during processing.
Definition: IError.h:26
IObjectFactory * pIObjectFactory
static XMP_PRIVATE uint32 GetInterfaceVersion()
Returns the version of the interface.
#define REQ_FRIEND_CLASS_DECLARATION()
Interface that serves as the base interface for all the externally exposed interfaces which needs to ...
Definition: IVersionable.h:28
#define XMP_PRIVATE
Version1 of the interface that represents an UTF8String.
Definition: IUTF8String.h:23

XMPToolkit documentation generated by doxygen 1.8.11