XMP Toolkit SDK  6.0.0
IDOMParser.h
Go to the documentation of this file.
1 #ifndef IDOMParser_h__
2 #define IDOMParser_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 
19 
20 namespace AdobeXMPCore {
21 
27  : public virtual IConfigurable
28  , public virtual ISharedObject
29  , public virtual IVersionable
30  {
31  public:
32 
36  typedef enum {
44  kATAppendAsChildren = 0,
45 
53  kATReplaceChildren = 1,
54 
62  kATAppendOrReplaceChildren = 2,
63 
69  kATInsertBefore = 3,
70 
76  kATInsertAfter = 4,
77 
81  kATReplace = 5,
82  } eActionType;
83 
90  virtual spIMetadata APICALL Parse( const char * buffer, sizet bufferLength ) = 0;
91 
99  virtual void APICALL ParseWithSpecificAction( const char * buffer, sizet bufferLength, eActionType actionType, spINode & node ) = 0;
100 
106  virtual spIDOMParser APICALL Clone() const = 0;
107 
110 
116  virtual pIDOMParser APICALL GetActualIDOMParser() __NOTHROW__ = 0;
117  XMP_PRIVATE pcIDOMParser GetActualIDOMParser() const __NOTHROW__ {
118  return const_cast< IDOMParser_v1 * >( this )->GetActualIDOMParser();
119  }
122 
128  virtual AdobeXMPCore_Int::pIDOMParser_I APICALL GetIDOMParser_I() __NOTHROW__ = 0;
129 
130  XMP_PRIVATE AdobeXMPCore_Int::pcIDOMParser_I GetIDOMParser_I() const __NOTHROW__ {
131  return const_cast< IDOMParser_v1 * >( this )->GetIDOMParser_I();
132  }
135 
143  XMP_PRIVATE static spIDOMParser MakeShared( pIDOMParser_base ptr );
144  XMP_PRIVATE static spcIDOMParser MakeShared( pcIDOMParser_base ptr ) {
145  return MakeShared( const_cast< pIDOMParser_base >( ptr ) );
146  }
149 
154  XMP_PRIVATE static uint64 GetInterfaceID() { return kIDOMParserID; }
155 
160  XMP_PRIVATE static uint32 GetInterfaceVersion() { return 1; }
162 
163  protected:
168 
170  virtual pIMetadata_base APICALL parse( const char * buffer, sizet bufferLength, pcIError_base & error ) __NOTHROW__ = 0;
171  virtual void APICALL parseWithSpecificAction( const char * buffer, sizet bufferLength, uint32 actionType, pINode_base node, pcIError_base & error ) __NOTHROW__ = 0;
172  virtual pIDOMParser_base APICALL clone( pcIError_base & error ) const __NOTHROW__ = 0;
173 
174  #ifdef FRIEND_CLASS_DECLARATION
175  FRIEND_CLASS_DECLARATION();
176  #endif
179 
180  };
181 }
182 
183 #endif // IDOMParser_h__
AdobeXMPCore::pcIDOMParser
const typedef IDOMParser * pcIDOMParser
Definition: XMPCoreFwdDeclarations.h:168
AdobeXMPCore::pcIDOMParser_base
const typedef IDOMParser_v1 * pcIDOMParser_base
Definition: XMPCoreFwdDeclarations.h:165
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::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::spIMetadata
shared_ptr< IMetadata > spIMetadata
Definition: XMPCoreFwdDeclarations.h:139
AdobeXMPCore::spIDOMParser
shared_ptr< IDOMParser > spIDOMParser
Definition: XMPCoreFwdDeclarations.h:169
ISharedObject.h
AdobeXMPCore
Definition: IArrayNode.h:18
AdobeXMPCore::spcIDOMParser
shared_ptr< const IDOMParser > spcIDOMParser
Definition: XMPCoreFwdDeclarations.h:170
AdobeXMPCore::pIDOMParser
IDOMParser * pIDOMParser
Definition: XMPCoreFwdDeclarations.h:167
AdobeXMPCommon::uint32
XMP_Uns32 uint32
Definition: XMPCommonDefines.h:174
XMPCoreFwdDeclarations.h
AdobeXMPCore::kIDOMParserID
static const uint64 kIDOMParserID(0x63444f4d50727372)
AdobeXMPCommon::sizet
uint32 sizet
Definition: XMPCommonDefines.h:176
AdobeXMPCommon::IVersionable
Interface that serves as the base interface for all the externally exposed interfaces which needs to ...
Definition: IVersionable.h:30
AdobeXMPCore_Int::pIDOMParser_I
IDOMParser_I * pIDOMParser_I
Definition: XMPCoreFwdDeclarations.h:296
REQ_FRIEND_CLASS_DECLARATION
#define REQ_FRIEND_CLASS_DECLARATION()
Definition: XMPCommonDefines.h:137
AdobeXMPCore::pIDOMParser_base
IDOMParser_v1 * pIDOMParser_base
Definition: XMPCoreFwdDeclarations.h:164
AdobeXMPCore::spINode
shared_ptr< INode > spINode
Definition: XMPCoreFwdDeclarations.h:67
AdobeXMPCore::IDOMParser_v1
Version 1 of the interface that supports parsing of the XMP Data Model.
Definition: IDOMParser.h:26
AdobeXMPCore::IDOMParser_v1::~IDOMParser_v1
virtual ~IDOMParser_v1() __NOTHROW__
Definition: IDOMParser.h:167
IVersionable.h
AdobeXMPCore::IMetadata_v1
Version1 of the interface that represents the whole xmp metadata for an asset.
Definition: IMetadata.h:26
AdobeXMPCore_Int::pcIDOMParser_I
const typedef IDOMParser_I * pcIDOMParser_I
Definition: XMPCoreFwdDeclarations.h:298
AdobeXMPCore_Int
Definition: XMPCoreFwdDeclarations.h:233
AdobeXMPCommon::pcIError_base
const typedef IError_v1 * pcIError_base
Definition: XMPCommonFwdDeclarations.h:64
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