| XMP Toolkit SDK 6.0.0

ICoreObjectFactory.h
Go to the documentation of this file.
1 #ifndef ICoreObjectFactory_h__
2 #define ICoreObjectFactory_h__ 1
3
4 // =================================================================================================
5 // Copyright 2014 Adobe
6 // All Rights Reserved.
7 //
8 // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
9 // of the Adobe license agreement accompanying it. If you have received this file from a source other
10 // than Adobe, then your use, modification, or distribution of it requires the prior written permission
11 // of Adobe.
12 // =================================================================================================
13
14 #include "XMPCore/XMPCoreFwdDeclarations.h"
15 #include "XMPCommon/Interfaces/IObjectFactory.h"
16
17 namespace AdobeXMPCore {
18
26
27 class XMP_PUBLIC ICoreObjectFactory_v1
28 : public virtual IObjectFactory_v1
29 {
30 public:
31
37 virtual pINameSpacePrefixMap_base APICALL CreateNameSpacePrefixMap( pcIError_base & error ) __NOTHROW__ = 0;
38
44 virtual pcINameSpacePrefixMap_base APICALL GetDefaultNameSpacePrefixMap( pcIError_base & error ) __NOTHROW__ = 0;
45
55 virtual pcIPathSegment_base APICALL CreatePropertyPathSegment( const char * nameSpace, sizet nameSpaceLength, const char * name, sizet nameLength, pcIError_base & error ) __NOTHROW__ = 0;
56
69 virtual pcIPathSegment_base APICALL CreateArrayIndexPathSegment( const char * nameSpace, sizet nameSpaceLength, sizet index, pcIError_base & error ) __NOTHROW__ = 0;
70
80 virtual pcIPathSegment_base APICALL CreateQualifierPathSegment( const char * nameSpace, sizet nameSpaceLength, const char * name, sizet nameLength, pcIError_base & error ) __NOTHROW__ = 0;
81
94 virtual pcIPathSegment_base APICALL CreateQualifierSelectorPathSegment( const char * nameSpace, sizet nameSpaceLength, const char * name,
95 sizet nameLength, const char * value, sizet valueLength, pcIError_base & error ) __NOTHROW__ = 0;
96
102 virtual pIPath_base APICALL CreatePath( pcIError_base & error ) __NOTHROW__ = 0;
103
112 virtual pIPath_base APICALL ParsePath( const char * path, sizet pathLength, pcINameSpacePrefixMap_base map, pcIError_base & error ) __NOTHROW__ = 0;
113
125 virtual pISimpleNode_base APICALL CreateSimpleNode( const char * nameSpace, sizet nameSpaceLength, const char * name, sizet nameLength,
126 const char * value, sizet valueLength, pcIError_base & error ) __NOTHROW__ = 0;
127
138 virtual pIArrayNode_base APICALL CreateArrayNode( uint32 arrayForm, const char * nameSpace, sizet nameSpaceLength, const char * name, sizet nameLength, pcIError_base & error ) __NOTHROW__ = 0;
139
148 virtual pIStructureNode_base APICALL CreateStructureNode( const char * nameSpace, sizet nameSpaceLength, const char * name, sizet nameLength, pcIError_base & error ) __NOTHROW__ = 0;
149
155 virtual pIMetadata_base APICALL CreateMetadata( pcIError_base & error ) __NOTHROW__ = 0;
156
162 virtual pIDOMImplementationRegistry_base APICALL GetDOMImplementationRegistry( pcIError_base & error ) __NOTHROW__ = 0;
163
169 virtual pICoreConfigurationManager_base APICALL GetCoreConfigurationManager( pcIError_base & error ) __NOTHROW__ = 0;
170
176 virtual pIMetadata_base APICALL ConvertXMPMetatoIMetadata( XMPMetaRef xmpref, pcIError_base & error ) __NOTHROW__ = 0;
177
183 virtual XMPMetaRef APICALL ConvertIMetadatatoXMPMeta( pIMetadata iMeta, pcIError_base & error ) __NOTHROW__ = 0;
184
185
188
194 virtual pICoreObjectFactory APICALL GetActualICoreObjectFactory() __NOTHROW__ = 0;
195 XMP_PRIVATE pcICoreObjectFactory GetActualICoreObjectFactory() const __NOTHROW__ {
196 return const_cast< ICoreObjectFactory_v1 * >( this )->GetActualICoreObjectFactory();
197 }
200
206 virtual AdobeXMPCore_Int::pICoreObjectFactory_I APICALL GetICoreObjectFactory_I() __NOTHROW__ = 0;
207
208 XMP_PRIVATE AdobeXMPCore_Int::pcICoreObjectFactory_I GetICoreObjectFactory_I() const __NOTHROW__ {
209 return const_cast< ICoreObjectFactory_v1 * >( this )->GetICoreObjectFactory_I();
210 }
213
220 XMP_PRIVATE static pICoreObjectFactory MakeCoreObjectFactory( pICoreObjectFactory_base ptr );
221 XMP_PRIVATE static pcICoreObjectFactory MakeCoreObjectFactory( pcICoreObjectFactory_base ptr ) {
222 return MakeCoreObjectFactory( const_cast< pICoreObjectFactory_base >( ptr ) );
223 }
226
231 XMP_PRIVATE static uint64 GetInterfaceID() { return kICoreObjectFactoryID; }
232
237 XMP_PRIVATE static uint32 GetInterfaceVersion() { return 1; }
239
244 XMP_PRIVATE static pICoreObjectFactory GetCoreObjectFactory();
245
253 #if LINKING_XMPCORE_LIB
254 XMP_PRIVATE static void SetupCoreObjectFactory();
255 #else
256 XMP_PRIVATE static void SetupCoreObjectFactory( pICoreObjectFactory_base coreObjectFactory );
257 #endif
258
263 XMP_PRIVATE static void DestroyCoreObjectFactory();
264
265 protected:
269 virtual ~ICoreObjectFactory_v1() __NOTHROW__ {}
270
272
273 #ifdef FRIEND_CLASS_DECLARATION
274 FRIEND_CLASS_DECLARATION();
275 #endif
276 REQ_FRIEND_CLASS_DECLARATION();
278
279 };
280 }
281 #endif // ICoreObjectFactory_h__
AdobeXMPCore::IPath_v1
Version1 of the interface that provides an easy iterative description of a specific path into the XMP...
Definition: IPath.h:28
XMP_PRIVATE
#define XMP_PRIVATE
Definition: XMP_Environment.h:222
__NOTHROW__
#define __NOTHROW__
Definition: XMPCommonDefines.h:147
AdobeXMPCore::pcIPathSegment_base
const typedef IPathSegment_v1 * pcIPathSegment_base
Definition: XMPCoreFwdDeclarations.h:39
XMP_PUBLIC
#define XMP_PUBLIC
Definition: XMP_Environment.h:221
AdobeXMPCore::kICoreObjectFactoryID
static const uint64 kICoreObjectFactoryID(0x634f626a46616374)
AdobeXMPCore::pcINameSpacePrefixMap_base
const typedef INameSpacePrefixMap_v1 * pcINameSpacePrefixMap_base
Definition: XMPCoreFwdDeclarations.h:27
AdobeXMPCommon::IObjectFactory_v1
Version1 of a interface that represents a factory to create various artifacts defined within AdobeXMP...
Definition: IObjectFactory.h:27
AdobeXMPCore::IDOMImplementationRegistry_v1
Version1 of the interface that serves as a database/registry of all the parsers and serializers avail...
Definition: IDOMImplementationRegistry.h:31
AdobeXMPCore::IStructureNode_v1
Version1 of the interface that represents a structure Node of XMP DOM.
Definition: IStructureNode.h:25
AdobeXMPCore::INameSpacePrefixMap_v1
Version1 of the interface that represents map where each entry consists of prefix string as the key a...
Definition: INameSpacePrefixMap.h:28
AdobeXMPCore
Definition: IArrayNode.h:18
AdobeXMPCore::ICoreConfigurationManager_v1
Version1 of the interface that represents configuration settings controllable by the client.
Definition: ICoreConfigurationManager.h:24
AdobeXMPCommon::uint32
XMP_Uns32 uint32
Definition: XMPCommonDefines.h:174
XMPCoreFwdDeclarations.h
AdobeXMPCore_Int::pcICoreObjectFactory_I
const typedef ICoreObjectFactory_I * pcICoreObjectFactory_I
Definition: XMPCoreFwdDeclarations.h:313
AdobeXMPCommon::sizet
uint32 sizet
Definition: XMPCommonDefines.h:176
XMPMetaRef
struct __XMPMeta__ * XMPMetaRef
An "ABI safe" pointer to the internal part of an XMP object. Use to pass an XMP object across client ...
Definition: XMP_Const.h:139
AdobeXMPCore_Int::pICoreObjectFactory_I
ICoreObjectFactory_I * pICoreObjectFactory_I
Definition: XMPCoreFwdDeclarations.h:311
IObjectFactory.h
AdobeXMPCore::IArrayNode_v1
Version1 of the interface that represents an Array Node of XMP DOM.
Definition: IArrayNode.h:27
REQ_FRIEND_CLASS_DECLARATION
#define REQ_FRIEND_CLASS_DECLARATION()
Definition: XMPCommonDefines.h:137
AdobeXMPCore::ISimpleNode_v1
Version1 of the interface that represents a Simple Property Node of XMP DOM.
Definition: ISimpleNode.h:25
AdobeXMPCore::pIMetadata
IMetadata * pIMetadata
Definition: XMPCoreFwdDeclarations.h:137
AdobeXMPCore::ICoreObjectFactory_v1::~ICoreObjectFactory_v1
virtual ~ICoreObjectFactory_v1() __NOTHROW__
Definition: ICoreObjectFactory.h:269
AdobeXMPCore::IMetadata_v1
Version1 of the interface that represents the whole xmp metadata for an asset.
Definition: IMetadata.h:26
AdobeXMPCore::pICoreObjectFactory
ICoreObjectFactory * pICoreObjectFactory
Definition: XMPCoreFwdDeclarations.h:203
AdobeXMPCore::pcICoreObjectFactory_base
const typedef ICoreObjectFactory_v1 * pcICoreObjectFactory_base
Definition: XMPCoreFwdDeclarations.h:201
AdobeXMPCore::ICoreObjectFactory_v1
Version1 of a interface that represents a factory to create various artifacts of XMP DOM like array,...
Definition: ICoreObjectFactory.h:27
AdobeXMPCommon::pcIError_base
const typedef IError_v1 * pcIError_base
Definition: XMPCommonFwdDeclarations.h:64
AdobeXMPCommon::uint64
XMP_Uns64 uint64
Definition: XMPCommonDefines.h:172
AdobeXMPCore::pcICoreObjectFactory
const typedef ICoreObjectFactory * pcICoreObjectFactory
Definition: XMPCoreFwdDeclarations.h:204