| XMP Toolkit SDK 6.0.0

IDOMSerializer.h
Go to the documentation of this file.
1 #ifndef IDOMSerializer_h__
2 #define IDOMSerializer_h__ 1
3
4 // =================================================================================================
5 // Copyright Adobe
6 // Copyright 2014 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
15 #include "XMPCore/XMPCoreFwdDeclarations.h"
16 #include "XMPCommon/Interfaces/BaseInterfaces/ISharedObject.h"
17 #include "XMPCommon/Interfaces/BaseInterfaces/IVersionable.h"
18 #include "XMPCommon/Interfaces/BaseInterfaces/IConfigurable.h"
19
20 namespace AdobeXMPCore {
25 class XMP_PUBLIC IDOMSerializer_v1
26 : public virtual IConfigurable
27 , public virtual ISharedObject
28 , public virtual IVersionable
29 {
30 public:
31
38 virtual spIUTF8String APICALL Serialize( const spINode & node, const spcINameSpacePrefixMap & nameSpacePrefixMap = spcINameSpacePrefixMap() ) = 0;
39
45 virtual spIDOMSerializer APICALL Clone() const = 0;
46
49
55 virtual pIDOMSerializer APICALL GetActualIDOMSerializer() __NOTHROW__ = 0;
56 XMP_PRIVATE pcIDOMSerializer GetActualIDOMSerializer() const __NOTHROW__ {
57 return const_cast< IDOMSerializer_v1 * >( this )->GetActualIDOMSerializer();
58 }
61
67 virtual AdobeXMPCore_Int::pIDOMSerializer_I APICALL GetIDOMSerializer_I() __NOTHROW__ = 0;
68
69 XMP_PRIVATE AdobeXMPCore_Int::pcIDOMSerializer_I GetIDOMSerializer_I() const __NOTHROW__ {
70 return const_cast< IDOMSerializer_v1 * >( this )->GetIDOMSerializer_I();
71 }
74
81 XMP_PRIVATE static spIDOMSerializer MakeShared( pIDOMSerializer_base ptr );
82 XMP_PRIVATE static spcIDOMSerializer MakeShared( pcIDOMSerializer_base ptr ) {
83 return MakeShared( const_cast< pIDOMSerializer_base >( ptr ) );
84 }
85
88
93 XMP_PRIVATE static uint64 GetInterfaceID() { return kIDOMSerializerID; }
94
99 XMP_PRIVATE static uint32 GetInterfaceVersion() { return 1; }
101
102 protected:
106 virtual ~IDOMSerializer_v1() __NOTHROW__ {}
107
109 virtual pIUTF8String_base APICALL serialize( pINode_base node, pcINameSpacePrefixMap_base map, pcIError_base & error ) __NOTHROW__ = 0;
110 virtual pIDOMSerializer_base APICALL clone( pcIError_base & error ) const __NOTHROW__ = 0;
111
112 #ifdef FRIEND_CLASS_DECLARATION
113 FRIEND_CLASS_DECLARATION();
114 #endif
115 REQ_FRIEND_CLASS_DECLARATION();
117
118 };
119 }
120
121 #endif // IDOMSerializer_h__
122
AdobeXMPCore::pIDOMSerializer
IDOMSerializer * pIDOMSerializer
Definition: XMPCoreFwdDeclarations.h:179
XMP_PRIVATE
#define XMP_PRIVATE
Definition: XMP_Environment.h:222
AdobeXMPCommon::IConfigurable
Interface that allows to attach various key-value parameters to the underlying object.
Definition: IConfigurable.h:32
__NOTHROW__
#define __NOTHROW__
Definition: XMPCommonDefines.h:147
AdobeXMPCore::spcINameSpacePrefixMap
shared_ptr< const INameSpacePrefixMap > spcINameSpacePrefixMap
Definition: XMPCoreFwdDeclarations.h:32
AdobeXMPCore::INode_v1
Version1 of the interface that serves as a base interface to all types of nodes in the XMP DOM.
Definition: INode.h:28
XMP_PUBLIC
#define XMP_PUBLIC
Definition: XMP_Environment.h:221
AdobeXMPCore::IDOMSerializer_v1
Version1 of the interface that represents an object that can serialize an XMP Data Model to a buffer....
Definition: IDOMSerializer.h:25
AdobeXMPCore::pcINameSpacePrefixMap_base
const typedef INameSpacePrefixMap_v1 * pcINameSpacePrefixMap_base
Definition: XMPCoreFwdDeclarations.h:27
ISharedObject.h
AdobeXMPCore::pcIDOMSerializer_base
const typedef IDOMSerializer_v1 * pcIDOMSerializer_base
Definition: XMPCoreFwdDeclarations.h:177
AdobeXMPCore_Int::pcIDOMSerializer_I
const typedef IDOMSerializer_I * pcIDOMSerializer_I
Definition: XMPCoreFwdDeclarations.h:303
AdobeXMPCore::pcIDOMSerializer
const typedef IDOMSerializer * pcIDOMSerializer
Definition: XMPCoreFwdDeclarations.h:180
AdobeXMPCore_Int::pIDOMSerializer_I
IDOMSerializer_I * pIDOMSerializer_I
Definition: XMPCoreFwdDeclarations.h:301
AdobeXMPCore
Definition: IArrayNode.h:18
AdobeXMPCommon::spIUTF8String
shared_ptr< IUTF8String > spIUTF8String
Definition: XMPCommonFwdDeclarations.h:79
AdobeXMPCommon::uint32
XMP_Uns32 uint32
Definition: XMPCommonDefines.h:174
XMPCoreFwdDeclarations.h
AdobeXMPCommon::IVersionable
Interface that serves as the base interface for all the externally exposed interfaces which needs to ...
Definition: IVersionable.h:30
REQ_FRIEND_CLASS_DECLARATION
#define REQ_FRIEND_CLASS_DECLARATION()
Definition: XMPCommonDefines.h:137
AdobeXMPCore::spINode
shared_ptr< INode > spINode
Definition: XMPCoreFwdDeclarations.h:67
AdobeXMPCore::IDOMSerializer_v1::~IDOMSerializer_v1
virtual ~IDOMSerializer_v1() __NOTHROW__
Definition: IDOMSerializer.h:106
IVersionable.h
AdobeXMPCommon::IUTF8String_v1
Version1 of the interface that represents an UTF8String.
Definition: IUTF8String.h:25
AdobeXMPCore::spcIDOMSerializer
shared_ptr< const IDOMSerializer > spcIDOMSerializer
Definition: XMPCoreFwdDeclarations.h:182
AdobeXMPCore::kIDOMSerializerID
static const uint64 kIDOMSerializerID(0x63444f4d53726c7a)
AdobeXMPCommon::pcIError_base
const typedef IError_v1 * pcIError_base
Definition: XMPCommonFwdDeclarations.h:64
AdobeXMPCore::spIDOMSerializer
shared_ptr< IDOMSerializer > spIDOMSerializer
Definition: XMPCoreFwdDeclarations.h:181
AdobeXMPCommon::uint64
XMP_Uns64 uint64
Definition: XMPCommonDefines.h:172
IConfigurable.h
AdobeXMPCommon::ISharedObject
Interface that serves as the base interface of all the externally exposed interfaces.
Definition: ISharedObject.h:29