| XMP Toolkit SDK 6.0.0

Public Types | Public Member Functions | Protected Member Functions | List of all members
AdobeXMPCore::IDOMParser_v1 Class Referenceabstract

Version 1 of the interface that supports parsing of the XMP Data Model. More...

`#include <IDOMParser.h>`

Inheritance diagram for AdobeXMPCore::IDOMParser_v1:

## Public Types
enum | eActionType { kATAppendAsChildren = 0, kATReplaceChildren = 1, kATAppendOrReplaceChildren = 2, kATInsertBefore = 3, kATInsertAfter = 4, kATReplace = 5 }
| Indicates various types of operations possible while parsing with some node as the context. More...
Public Types inherited from AdobeXMPCommon::IConfigurable
enum | eDataType { kDTNone = 0, kDTBool = 1 << 0, kDTUint64 = 1 << 1, kDTInt64 = 1 << 2, kDTChar = 1 << 3, kDTDouble = 1 << 4, kDTConstCharBuffer = 1 << 5, kDTConstVoidPtr = 1 << 6, kDTAll = 0xFFFFFFFF }
| Indicates various types of parameter values. More...

## Public Member Functions
virtual spIMetadata APICALL | Parse (const char *buffer, sizet bufferLength)=0
| Parses the buffer contents and creates an XMP DOM node. More...
virtual void APICALL | ParseWithSpecificAction (const char *buffer, sizet bufferLength, eActionType actionType, spINode &node)=0
| Parse the buffer contents and populate the provided node . More...
virtual spIDOMParser APICALL | Clone () const =0
| Virtual copy constructor. More...
Public Member Functions inherited from AdobeXMPCommon::IConfigurable
virtual bool APICALL | RemoveParameter (const uint64 &key)=0
| Removes a particular parameter if present. More...
virtual std::vector< uint64 > APICALL | GetAllParameters () const =0
| Get all the keys of the parameters associated with the object. More...
virtual sizet APICALL | Size () const __NOTHROW__=0
| Get the number of parameters associated with the object. More...
virtual eDataType APICALL | GetDataType (const uint64 &key) const =0
| Get the value type of a particular parameter. More...
virtual void APICALL | SetParameter (const uint64 &key, bool value)=0
| Add/Change a value of a parameter. More...
virtual void APICALL | SetParameter (const uint64 &key, uint64 value)=0
virtual void APICALL | SetParameter (const uint64 &key, int64 value)=0
virtual void APICALL | SetParameter (const uint64 &key, double value)=0
virtual void APICALL | SetParameter (const uint64 &key, char value)=0
virtual void APICALL | SetParameter (const uint64 &key, const char *value)=0
virtual void APICALL | SetParameter (const uint64 &key, const void *value)=0
virtual bool APICALL | GetParameter (const uint64 &key, bool &value) const =0
| Get the value of a parameter if present. More...
virtual bool APICALL | GetParameter (const uint64 &key, uint64 &value) const =0
virtual bool APICALL | GetParameter (const uint64 &key, int64 &value) const =0
virtual bool APICALL | GetParameter (const uint64 &key, double &value) const =0
virtual bool APICALL | GetParameter (const uint64 &key, char &value) const =0
virtual bool APICALL | GetParameter (const uint64 &key, const char *&value) const =0
virtual bool APICALL | GetParameter (const uint64 &key, const void *&value) const =0
Public Member Functions inherited from AdobeXMPCommon::ISharedObject
virtual void APICALL | Acquire () const __NOTHROW__=0
| Called by the clients of the object to indicate that he has acquired the shared ownership of the object. More...
virtual void APICALL | Release () const __NOTHROW__=0
| Called by the clients of the object to indicate he has released his shared ownership of the object. If this being the last client than this function should call Destroy to delete and release the memory. More...
Public Member Functions inherited from AdobeXMPCommon::IVersionable
template<typename requestedInterface >
XMP_PRIVATE requestedInterface * | GetInterfacePointer ()
| Get the raw pointer to an interface object implementing the requested version. More...
template<typename requestedInterface >
const XMP_PRIVATE requestedInterface * | GetInterfacePointer () const
| Get the raw pointer to a const interface object implementing the requested version. More...

## Protected Member Functions
virtual | ~IDOMParser_v1 () __NOTHROW__
Protected Member Functions inherited from AdobeXMPCommon::IConfigurable
virtual | ~IConfigurable () __NOTHROW__
| REQ_FRIEND_CLASS_DECLARATION ()
Protected Member Functions inherited from AdobeXMPCommon::ISharedObject
virtual | ~ISharedObject () __NOTHROW__=0
| REQ_FRIEND_CLASS_DECLARATION ()
Protected Member Functions inherited from AdobeXMPCommon::IVersionable
virtual | ~IVersionable ()
| REQ_FRIEND_CLASS_DECLARATION ()

## Additional Inherited Members
Static Public Member Functions inherited from AdobeXMPCommon::IConfigurable
static uint64 | ConvertCharBufferToUint64 (const char *key)
| Utility function to convert character buffer ( maximum of 8 characters ) to uint64 representation. More...

## Detailed Description

Version 1 of the interface that supports parsing of the XMP Data Model.

Provides all functions to parse the buffer as well as to configure the parser.

Definition at line 26 of file IDOMParser.h.

## Member Enumeration Documentation

## ◆ eActionType

enum AdobeXMPCore::IDOMParser_v1::eActionType

Indicates various types of operations possible while parsing with some node as the context.

Enumerator
kATAppendAsChildren | Append all the nodes parsed from the buffer as the child of the context node. Attention Error is thrown in case Context Node is invalid. Context Node is not array or structure node. Context Node is a structure node but a child node with the same qualified name is already present. Context Node is an array node but the type of any parsed node is not same as that of other existing nodes in the array.
kATReplaceChildren | Replaces the children of the context node with nodes parsed from the buffer. Attention Error is thrown in case Context Node is invalid. Context Node is not array or structure node. Context Node is a structure node but a child node with the same qualified name is not already present. Context Node is an array node but the type of all parsed nodes are not same.
kATAppendOrReplaceChildren | Either append all the nodes parsed from the buffer as the child/children of the context node. Attention Error is thrown in case Context Node is invalid. Context Node is not array or structure node. Context Node is an array node but the type of all parsed nodes are not same. If a structure node is the parsed node, it is appended if it already not present, otherwise it is replaced. If an array node is the parsed node, it is appended if it already not present, otherwise it is removed.
kATInsertBefore | Treats all the parsed nodes as the siblings of the context node and place them before the context node, if possible. Attention Error is thrown in case Context Node is invalid. parent of the Context Node is not an array node. The type of any parsed nodes is not same as that of other existing nodes in the array.
kATInsertAfter | Treats all the parsed nodes as the siblings of the context node and place them after the context node, if possible. Attention Error is thrown in case Context Node is invalid. parent of the Context Node is not an array node. The type of any parsed nodes is not same as that of other existing nodes in the array.
kATReplace | Replaces the context node and insert the node parsed from the buffer in its place. Attention Error is thrown in case type of node returned after parsing in not of type which is compatible with the Context Node.

Definition at line 36 of file IDOMParser.h.

36 {
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;

## Constructor & Destructor Documentation

## ◆ ~IDOMParser_v1()

virtual AdobeXMPCore::IDOMParser_v1::~IDOMParser_v1 | ( |  | ) |
| inline protected virtual

Destructor

Definition at line 167 of file IDOMParser.h.

167 {}

## Member Function Documentation

## ◆ Clone()

virtual spIDOMParser APICALL AdobeXMPCore::IDOMParser_v1::Clone | ( |  | ) | const
| pure virtual

Virtual copy constructor.

Creates an exact replica of the object.

Returns
  A shared pointer to an object of #IDOMParser which is the exact replica of the current serializer.

## ◆ Parse()

virtual spIMetadata APICALL AdobeXMPCore::IDOMParser_v1::Parse | ( | const char * | buffer,
|  | sizet | bufferLength
| ) |  |
| pure virtual

Parses the buffer contents and creates an XMP DOM node.

Parameters

  [in] | buffer | Pointer to a constant char buffer containing serialized XMP Data Model.
  [in] | bufferLength | Number of characters in buffer. In case name is null terminated set it to #AdobeXMPCommon::npos.

Returns
  A shared pointer to an object of #IMetadata containing all the information parsed from the buffer.

## ◆ ParseWithSpecificAction()

virtual void APICALL AdobeXMPCore::IDOMParser_v1::ParseWithSpecificAction | ( | const char * | buffer,
|  | sizet | bufferLength,
|  | eActionType | actionType,
|  | spINode & | node
| ) |  |
| pure virtual

Parse the buffer contents and populate the provided node .

Parameters

  [in] | buffer | Pointer to a constant char buffer containing serialized XMP Data Model.
  [in] | bufferLength | Number of characters in buffer. In case name is null terminated set it to #AdobeXMPCommon::npos.
  [in] | actionType | Value indicating how the parsed content and context node should be used.
  [in,out] | node | The context node to be used base on the actionType.

The documentation for this class was generated from the following file:

- public/include/XMPCore/Interfaces/IDOMParser.h

AdobeXMPCore::IDOMParser_v1::kATAppendAsChildren
@ kATAppendAsChildren
Append all the nodes parsed from the buffer as the child of the context node.
Definition: IDOMParser.h:44
AdobeXMPCore::IDOMParser_v1::kATInsertAfter
@ kATInsertAfter
Treats all the parsed nodes as the siblings of the context node and place them after the context node...
Definition: IDOMParser.h:76
AdobeXMPCore::IDOMParser_v1::kATReplace
@ kATReplace
Replaces the context node and insert the node parsed from the buffer in its place.
Definition: IDOMParser.h:81
AdobeXMPCore::IDOMParser_v1::kATReplaceChildren
@ kATReplaceChildren
Replaces the children of the context node with nodes parsed from the buffer.
Definition: IDOMParser.h:53
AdobeXMPCore::IDOMParser_v1::kATInsertBefore
@ kATInsertBefore
Treats all the parsed nodes as the siblings of the context node and place them before the context nod...
Definition: IDOMParser.h:69
AdobeXMPCore::IDOMParser_v1::eActionType
eActionType
Indicates various types of operations possible while parsing with some node as the context.
Definition: IDOMParser.h:36
AdobeXMPCore::IDOMParser_v1::kATAppendOrReplaceChildren
@ kATAppendOrReplaceChildren
Either append all the nodes parsed from the buffer as the child/children of the context node.
Definition: IDOMParser.h:62