XMP Toolkit SDK  6.0.0
AdobeXMPCore::INode_v1 Class Referenceabstract

Version1 of the interface that serves as a base interface to all types of nodes in the XMP DOM. More...

#include <INode.h>

Inheritance diagram for AdobeXMPCore::INode_v1:
AdobeXMPCommon::ISharedObject AdobeXMPCommon::IVersionable AdobeXMPCommon::IThreadSafe AdobeXMPCore::ICompositeNode_v1 AdobeXMPCore::ISimpleNode_v1 AdobeXMPCore::IArrayNode_v1 AdobeXMPCore::IStructureNode_v1 AdobeXMPCore::IMetadata_v1

Public Types

enum  eNodeType {
  kNTNone = 0, kNTSimple = 1, kNTArray = 1 << 1, kNTStructure = 1 << 2,
  kNTAll = kAllBits
}
 Indicates various types of node available in XMP Data Model like simple, array and structure. More...
 

Public Member Functions

virtual eNodeType APICALL GetNodeType () const =0
 Gets the node type of the node. More...
 
virtual eNodeType APICALL GetParentNodeType () const =0
 Gets the node type of the node's parent. More...
 
virtual void APICALL SetName (const char *name, sizet nameLength)=0
 Changes the local name of the node. More...
 
virtual spcIUTF8String APICALL GetName () const =0
 Gets the local name of the node. More...
 
virtual void APICALL SetNameSpace (const char *nameSpace, sizet nameSpaceLength)=0
 Changes the name space of the node. More...
 
virtual spcIUTF8String APICALL GetNameSpace () const =0
 Gets the name space of the node. More...
 
virtual spIPath APICALL GetPath () const =0
 Gets the path of the node from the root of the metadata. More...
 
virtual sizet APICALL QualifiersCount () const __NOTHROW__=0
 Gets the count of the qualifiers attached with the node. More...
 
virtual eNodeType APICALL GetQualifierNodeType (const char *nameSpace, sizet nameSpaceLength, const char *name, sizet nameLength) const =0
 Gets the type of the node's qualifier having specified namespace and name. More...
 
virtual void APICALL InsertQualifier (const spINode &node)=0
 Inserts a given qualifier node. More...
 
virtual spINode APICALL ReplaceQualifier (const spINode &node)=0
 Replaces a given qualifier node. More...
 
virtual spINode APICALL RemoveQualifier (const char *nameSpace, sizet nameSpaceLength, const char *name, sizet nameLength)=0
 Removes the qualifier node with the specified nameSpace and name. More...
 
virtual bool APICALL IsArrayItem () const =0
 Indicates whether the node is a direct child of an array node. More...
 
virtual bool APICALL IsQualifierNode () const =0
 Indicates whether the node is a qualifier node. More...
 
virtual sizet APICALL GetIndex () const =0
 Returns the index of the node in case it is an array item. More...
 
virtual bool APICALL HasQualifiers () const =0
 Indicates whether the node has any qualifiers associated with it. More...
 
virtual bool APICALL HasContent () const =0
 Returns whether the node has any content or not. return A bool value indicating the presence of contents in the node apart from qualifiers. More...
 
virtual bool APICALL IsEmpty () const =0
 Returns whether the node is empty. return A bool value indicating whether the contents and qualifiers of a node are empty. More...
 
virtual bool APICALL HasChanged () const =0
 Returns the status about any change done to the node or its children or qualifiers. returns a bool value indicating whether some changes have been performed on the node or its children or qualifiers. for a simple node, true will be returned in scenarios like when the node's value or qualifiers are modified. for an array node or a structure node, true will be returned in scenarios like when the node's children or the node's qualifiers are modified. More...
 
virtual void APICALL AcknowledgeChanges () const __NOTHROW__=0
 Acknowledges that changes for the node and its children and qualifiers have been taken care of. for a simple node, changes that will be acknowledged in scenarios like when the node's value or node's qualifiers were modified. for an array node or a structure node, changes will be acknowledged in scenarios like when the node's children were or the node's qualifiers were modified. More...
 
virtual void APICALL Clear (bool contents=true, bool qualifiers=true)=0
 Clear the contents of the node. More...
 
virtual spINode APICALL Clone (bool ignoreEmptyNodes=false, bool ignoreNodesWithOnlyQualifiers=false) const =0
 Virtual copy constructor. More...
 
XMP_PRIVATE spcINode GetParent () const
 Gets the parent node of the node. More...
 
virtual spINode APICALL GetParent ()=0
 
XMP_PRIVATE spcINodeIterator QualifiersIterator () const
 
virtual spINodeIterator APICALL QualifiersIterator ()=0
 
XMP_PRIVATE spcINode GetQualifier (const char *nameSpace, sizet nameSpaceLength, const char *name, sizet nameLength) const
 Gets the qualifier of the node having specified namespace and name. More...
 
virtual spINode APICALL GetQualifier (const char *nameSpace, sizet nameSpaceLength, const char *name, sizet nameLength)=0
 
XMP_PRIVATE spcISimpleNode GetSimpleQualifier (const char *nameSpace, sizet nameSpaceLength, const char *name, sizet nameLength) const
 Get the node's qualifier having specified name space and name as simple node. More...
 
XMP_PRIVATE spISimpleNode GetSimpleQualifier (const char *nameSpace, sizet nameSpaceLength, const char *name, sizet nameLength)
 
XMP_PRIVATE spcIStructureNode GetStructureQualifier (const char *nameSpace, sizet nameSpaceLength, const char *name, sizet nameLength) const
 Get the node's qualifier having specified name space and name as structure node. More...
 
XMP_PRIVATE spIStructureNode GetStructureQualifier (const char *nameSpace, sizet nameSpaceLength, const char *name, sizet nameLength)
 
XMP_PRIVATE spcIArrayNode GetArrayQualifier (const char *nameSpace, sizet nameSpaceLength, const char *name, sizet nameLength) const
 Get the node's qualifier having specified name space and name as an array node. More...
 
XMP_PRIVATE spIArrayNode GetArrayQualifier (const char *nameSpace, sizet nameSpaceLength, const char *name, sizet nameLength)
 
XMP_PRIVATE spcISimpleNode ConvertToSimpleNode () const
 Converts Node to a simple node, if possible. More...
 
virtual spISimpleNode APICALL ConvertToSimpleNode ()=0
 
XMP_PRIVATE spcIStructureNode ConvertToStructureNode () const
 Converts Node to a structure node type, if possible. More...
 
virtual spIStructureNode APICALL ConvertToStructureNode ()=0
 
XMP_PRIVATE spcIArrayNode ConvertToArrayNode () const
 Converts Node to an array node type, if possible. More...
 
virtual spIArrayNode APICALL ConvertToArrayNode ()=0
 
XMP_PRIVATE spcIMetadata ConvertToMetadata () const
 Converts Node to a metadata node type, if possible. More...
 
virtual spIMetadata APICALL ConvertToMetadata ()=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...
 
- Public Member Functions inherited from AdobeXMPCommon::IThreadSafe
virtual void APICALL EnableThreadSafety () const __NOTHROW__=0
 Enables the thread safety on an object. More...
 
virtual void APICALL DisableThreadSafety () const __NOTHROW__=0
 Disables the thread safety on an object. More...
 
virtual bool APICALL IsThreadSafe () const =0
 Informs whether object can be used across multiple threads or not. More...
 

Protected Member Functions

virtual ~INode_v1 () __NOTHROW__
 
- 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 ()
 
- Protected Member Functions inherited from AdobeXMPCommon::IThreadSafe
 REQ_FRIEND_CLASS_DECLARATION ()
 

Detailed Description

Version1 of the interface that serves as a base interface to all types of nodes in the XMP DOM.

Provides all the functions to get various properties of the node.

Attention
Support multi threading through locks but can be enabled/disabled by the client. By default every object created does not support multi-threading.

Definition at line 28 of file INode.h.

Member Enumeration Documentation

◆ eNodeType

Indicates various types of node available in XMP Data Model like simple, array and structure.

Enumerator
kNTNone 

Indicates none, to be used as invalid type.

kNTSimple 

XMP Node is of Simple Node type (key value pair).

kNTArray 

XMP Node is of Array type. Indexing start from 1.

kNTStructure 

XMP Node is of structure type.

kNTAll 

XMP Node of any type.

Definition at line 38 of file INode.h.

38  {
40  kNTNone = 0,
41 
43  kNTSimple = 1,
44 
46  kNTArray = 1 << 1,
47 
49  kNTStructure = 1 << 2,
50 
53  } eNodeType;

Constructor & Destructor Documentation

◆ ~INode_v1()

virtual AdobeXMPCore::INode_v1::~INode_v1 ( )
inlineprotectedvirtual

Destructor

Definition at line 449 of file INode.h.

449 {}

Member Function Documentation

◆ AcknowledgeChanges()

virtual void APICALL AdobeXMPCore::INode_v1::AcknowledgeChanges ( ) const
pure virtual

Acknowledges that changes for the node and its children and qualifiers have been taken care of. for a simple node, changes that will be acknowledged in scenarios like when the node's value or node's qualifiers were modified. for an array node or a structure node, changes will be acknowledged in scenarios like when the node's children were or the node's qualifiers were modified.

◆ Clear()

virtual void APICALL AdobeXMPCore::INode_v1::Clear ( bool  contents = true,
bool  qualifiers = true 
)
pure virtual

Clear the contents of the node.

Parameters
[in]contentsA bool value controlling whether contents of the node should be cleared or not.
[in]qualifiersA bool value controlling whether qualifiers of the node should be cleared or not.

◆ Clone()

virtual spINode APICALL AdobeXMPCore::INode_v1::Clone ( bool  ignoreEmptyNodes = false,
bool  ignoreNodesWithOnlyQualifiers = false 
) const
pure virtual

Virtual copy constructor.

Clones the node creating an exact replica of the node which is not part of any metadata tree.

Parameters
[in]ignoreEmptyNodesA bool value controlling whether to clone empty nodes or not.
[in]ignoreNodesWithOnlyQualifiersA bool value controlling whether presence of only qualifiers should mark node as non empty.
Returns
A shared pointer to newly created replica of the node.

◆ ConvertToArrayNode() [1/2]

XMP_PRIVATE spcIArrayNode AdobeXMPCore::INode_v1::ConvertToArrayNode ( ) const
inline

Converts Node to an array node type, if possible.

Returns
Shared pointer to const or non const IArrayNode object. An empty array node is thrown in case actual node is not an array node.

Definition at line 363 of file INode.h.

363  {
364  return const_cast< INode_v1 * >( this )->ConvertToArrayNode();
365  }

◆ ConvertToArrayNode() [2/2]

virtual spIArrayNode APICALL AdobeXMPCore::INode_v1::ConvertToArrayNode ( )
pure virtual

◆ ConvertToMetadata() [1/2]

XMP_PRIVATE spcIMetadata AdobeXMPCore::INode_v1::ConvertToMetadata ( ) const
inline

Converts Node to a metadata node type, if possible.

Returns
Shared pointer to const or non const IMetadata object. An empty metadata node is thrown in case actual node is not a metadata node.

Definition at line 374 of file INode.h.

374  {
375  return const_cast< INode_v1 * >( this )->ConvertToMetadata();
376  }

◆ ConvertToMetadata() [2/2]

virtual spIMetadata APICALL AdobeXMPCore::INode_v1::ConvertToMetadata ( )
pure virtual

◆ ConvertToSimpleNode() [1/2]

XMP_PRIVATE spcISimpleNode AdobeXMPCore::INode_v1::ConvertToSimpleNode ( ) const
inline

Converts Node to a simple node, if possible.

Returns
Shared pointer to const or non const ISimpleNode object. An empty simple node is thrown in case actual node is not a simple node.

Definition at line 341 of file INode.h.

341  {
342  return const_cast< INode_v1 * >( this )->ConvertToSimpleNode();
343  }

◆ ConvertToSimpleNode() [2/2]

virtual spISimpleNode APICALL AdobeXMPCore::INode_v1::ConvertToSimpleNode ( )
pure virtual

◆ ConvertToStructureNode() [1/2]

XMP_PRIVATE spcIStructureNode AdobeXMPCore::INode_v1::ConvertToStructureNode ( ) const
inline

Converts Node to a structure node type, if possible.

Returns
Shared pointer to const or non const IStructureNode object. An empty structure node is thrown in case actual node is not a structure node.

Definition at line 352 of file INode.h.

352  {
353  return const_cast< INode_v1 * >( this )->ConvertToStructureNode();
354  }

◆ ConvertToStructureNode() [2/2]

virtual spIStructureNode APICALL AdobeXMPCore::INode_v1::ConvertToStructureNode ( )
pure virtual

◆ GetArrayQualifier() [1/2]

XMP_PRIVATE spIArrayNode AdobeXMPCore::INode_v1::GetArrayQualifier ( const char *  nameSpace,
sizet  nameSpaceLength,
const char *  name,
sizet  nameLength 
)
inline

Definition at line 237 of file INode.h.

237  {
238  auto node = GetQualifier( nameSpace, nameSpaceLength, name, nameLength );
239  if ( node ) return node->ConvertToArrayNode();
240  return spIArrayNode();
241  }

◆ GetArrayQualifier() [2/2]

XMP_PRIVATE spcIArrayNode AdobeXMPCore::INode_v1::GetArrayQualifier ( const char *  nameSpace,
sizet  nameSpaceLength,
const char *  name,
sizet  nameLength 
) const
inline

Get the node's qualifier having specified name space and name as an array node.

Parameters
[in]nameSpacePointer to a constant char buffer containing name space URI of the qualifier node.
[in]nameSpaceLengthNumber of characters in nameSpace. In case nameSpace is null terminated set it to #AdobeXMPCommon::npos.
[in]namePointer to a constant char buffer containing local name of the qualifier node.
[in]nameLengthNumber of characters in name. In case name is null terminated set it to #AdobeXMPCommon::npos.
Returns
A shared pointer to const or non const #ISimpleNode object containing qualifier.
Note
In case no qualifier exists with the specified nameSpace and name combination then an invalid shared pointer is returned.
Attention
Error is thrown in case
  • a qualifier exists with the specified nameSpace and name combination but is not an array node.

Definition at line 231 of file INode.h.

231  {
232  auto node = GetQualifier( nameSpace, nameSpaceLength, name, nameLength );
233  if ( node ) return node->ConvertToArrayNode();
234  return spcIArrayNode();
235  }

◆ GetIndex()

virtual sizet APICALL AdobeXMPCore::INode_v1::GetIndex ( ) const
pure virtual

Returns the index of the node in case it is an array item.

Returns
The index of the node, in case it is an array item, otherwise returns 0.

◆ GetName()

virtual spcIUTF8String APICALL AdobeXMPCore::INode_v1::GetName ( ) const
pure virtual

Gets the local name of the node.

Returns
a shared pointer to const #AdobeXMPCommon::IUTF8String representing the name of the node.

◆ GetNameSpace()

virtual spcIUTF8String APICALL AdobeXMPCore::INode_v1::GetNameSpace ( ) const
pure virtual

Gets the name space of the node.

Returns
A shared pointer to const #AdobeXMPCommon::IUTF8String representing the name space of the node.

◆ GetNodeType()

virtual eNodeType APICALL AdobeXMPCore::INode_v1::GetNodeType ( ) const
pure virtual

Gets the node type of the node.

Returns
An object of type #eNodeType indicating the type of the node.

◆ GetParent() [1/2]

XMP_PRIVATE spcINode AdobeXMPCore::INode_v1::GetParent ( ) const
inline

Gets the parent node of the node.

Returns
Either a const or non const pointer to INode interface.
A shared pointer to either a const or non const #AdobeXMPCore::INode representing the parent of the node.
Note
Returns an invalid shared pointer in case the node is a root node or it is not part of tree.

Definition at line 75 of file INode.h.

75  {
76  return const_cast< INode_v1 * >( this )->GetParent();
77  }

◆ GetParent() [2/2]

virtual spINode APICALL AdobeXMPCore::INode_v1::GetParent ( )
pure virtual

◆ GetParentNodeType()

virtual eNodeType APICALL AdobeXMPCore::INode_v1::GetParentNodeType ( ) const
pure virtual

Gets the node type of the node's parent.

Returns
An object of type #eNodeType indicating the type of the node.
Note
#eNodeType::kNTNone is returned in case node has no parent.

◆ GetPath()

virtual spIPath APICALL AdobeXMPCore::INode_v1::GetPath ( ) const
pure virtual

Gets the path of the node from the root of the metadata.

Returns
A shared pointer to #AdobeXMPCore::IPath representing the path of the node.

◆ GetQualifier() [1/2]

XMP_PRIVATE spcINode AdobeXMPCore::INode_v1::GetQualifier ( const char *  nameSpace,
sizet  nameSpaceLength,
const char *  name,
sizet  nameLength 
) const
inline

Gets the qualifier of the node having specified namespace and name.

Parameters
[in]nameSpacePointer to a constant char buffer containing name space URI of the qualifier node.
[in]nameSpaceLengthNumber of characters in nameSpace. In case nameSpace is null terminated set it to #AdobeXMPCommon::npos.
[in]namePointer to a constant char buffer containing local name of the qualifier node.
[in]nameLengthNumber of characters in name. In case name is null terminated set it to #AdobeXMPCommon::npos.
Returns
A shared pointer to either a const or const qualifier node.
Note
In case no qualifier exists with the specified nameSpace and name combination then an invalid shared pointer is returned.

Definition at line 160 of file INode.h.

160  {
161  return const_cast< INode_v1 * >( this )->GetQualifier( nameSpace, nameSpaceLength, name, nameLength );
162  }

◆ GetQualifier() [2/2]

virtual spINode APICALL AdobeXMPCore::INode_v1::GetQualifier ( const char *  nameSpace,
sizet  nameSpaceLength,
const char *  name,
sizet  nameLength 
)
pure virtual

◆ GetQualifierNodeType()

virtual eNodeType APICALL AdobeXMPCore::INode_v1::GetQualifierNodeType ( const char *  nameSpace,
sizet  nameSpaceLength,
const char *  name,
sizet  nameLength 
) const
pure virtual

Gets the type of the node's qualifier having specified namespace and name.

Parameters
[in]nameSpacePointer to a constant char buffer containing name space URI of the qualifier node.
[in]nameSpaceLengthNumber of characters in nameSpace. In case nameSpace is null terminated set it to #AdobeXMPCommon::npos.
[in]namePointer to a constant char buffer containing local name of the qualifier node.
[in]nameLengthNumber of characters in name. In case name is null terminated set it to #AdobeXMPCommon::npos.
Returns
An object of type #eNodeType indicating the type of the node's qualifier.
Note
In case no qualifier exists with the specified nameSpace and name combination then an #eNodeType::kNTNode is returned.

◆ GetSimpleQualifier() [1/2]

XMP_PRIVATE spISimpleNode AdobeXMPCore::INode_v1::GetSimpleQualifier ( const char *  nameSpace,
sizet  nameSpaceLength,
const char *  name,
sizet  nameLength 
)
inline

Definition at line 185 of file INode.h.

185  {
186  auto node = GetQualifier( nameSpace, nameSpaceLength, name, nameLength );
187  if ( node ) return node->ConvertToSimpleNode();
188  return spISimpleNode();
189  }

◆ GetSimpleQualifier() [2/2]

XMP_PRIVATE spcISimpleNode AdobeXMPCore::INode_v1::GetSimpleQualifier ( const char *  nameSpace,
sizet  nameSpaceLength,
const char *  name,
sizet  nameLength 
) const
inline

Get the node's qualifier having specified name space and name as simple node.

Parameters
[in]nameSpacePointer to a constant char buffer containing name space URI of the qualifier node.
[in]nameSpaceLengthNumber of characters in nameSpace. In case nameSpace is null terminated set it to #AdobeXMPCommon::npos.
[in]namePointer to a constant char buffer containing local name of the qualifier node.
[in]nameLengthNumber of characters in name. In case name is null terminated set it to #AdobeXMPCommon::npos.
Returns
A shared pointer to const or non const #ISimpleNode object containing qualifier.
Note
In case no qualifier exists with the specified nameSpace and name combination then an invalid shared pointer is returned.
Attention
Error is thrown in case
  • a qualifier exists with the specified nameSpace and name combination but is not a simple node.

Definition at line 179 of file INode.h.

179  {
180  auto node = GetQualifier( nameSpace, nameSpaceLength, name, nameLength );
181  if ( node ) return node->ConvertToSimpleNode();
182  return spcISimpleNode();
183  }

◆ GetStructureQualifier() [1/2]

XMP_PRIVATE spIStructureNode AdobeXMPCore::INode_v1::GetStructureQualifier ( const char *  nameSpace,
sizet  nameSpaceLength,
const char *  name,
sizet  nameLength 
)
inline

Definition at line 211 of file INode.h.

211  {
212  auto node = GetQualifier( nameSpace, nameSpaceLength, name, nameLength );
213  if ( node ) return node->ConvertToStructureNode();
214  return spIStructureNode();
215  }

◆ GetStructureQualifier() [2/2]

XMP_PRIVATE spcIStructureNode AdobeXMPCore::INode_v1::GetStructureQualifier ( const char *  nameSpace,
sizet  nameSpaceLength,
const char *  name,
sizet  nameLength 
) const
inline

Get the node's qualifier having specified name space and name as structure node.

Parameters
[in]nameSpacePointer to a constant char buffer containing name space URI of the qualifier node.
[in]nameSpaceLengthNumber of characters in nameSpace. In case nameSpace is null terminated set it to #AdobeXMPCommon::npos.
[in]namePointer to a constant char buffer containing local name of the qualifier node.
[in]nameLengthNumber of characters in name. In case name is null terminated set it to #AdobeXMPCommon::npos.
Returns
A shared pointer to const or non const #IStructureNode object containing qualifier.
Note
In case no qualifier exists with the specified nameSpace and name combination then an invalid shared pointer is returned.
Attention
Error is thrown in case
  • a qualifier exists with the specified nameSpace and name combination but is not a structure node.

Definition at line 205 of file INode.h.

205  {
206  auto node = GetQualifier( nameSpace, nameSpaceLength, name, nameLength );
207  if ( node ) return node->ConvertToStructureNode();
208  return spcIStructureNode();
209  }

◆ HasChanged()

virtual bool APICALL AdobeXMPCore::INode_v1::HasChanged ( ) const
pure virtual

Returns the status about any change done to the node or its children or qualifiers. returns a bool value indicating whether some changes have been performed on the node or its children or qualifiers. for a simple node, true will be returned in scenarios like when the node's value or qualifiers are modified. for an array node or a structure node, true will be returned in scenarios like when the node's children or the node's qualifiers are modified.

◆ HasContent()

virtual bool APICALL AdobeXMPCore::INode_v1::HasContent ( ) const
pure virtual

Returns whether the node has any content or not. return A bool value indicating the presence of contents in the node apart from qualifiers.

◆ HasQualifiers()

virtual bool APICALL AdobeXMPCore::INode_v1::HasQualifiers ( ) const
pure virtual

Indicates whether the node has any qualifiers associated with it.

Returns
A bool value; true in case the node has any qualifier associated with it, false otherwise.

◆ InsertQualifier()

virtual void APICALL AdobeXMPCore::INode_v1::InsertQualifier ( const spINode node)
pure virtual

Inserts a given qualifier node.

Parameters
[in]nodeShared pointer to an object of #AdobeXMPCore::INode representing the qualifier node to be inserted.
Attention
Error is thrown in following cases:
  • given qualifier node is invalid.
  • given qualifier node is already a child of some other node.
  • there exists a qualifier node with the same nameSpace and name combination.
  • parent or any ancestor node is a qualifier node.

◆ IsArrayItem()

virtual bool APICALL AdobeXMPCore::INode_v1::IsArrayItem ( ) const
pure virtual

Indicates whether the node is a direct child of an array node.

Returns
A bool value; true in case the node is a direct child of an array node, false otherwise.

◆ IsEmpty()

virtual bool APICALL AdobeXMPCore::INode_v1::IsEmpty ( ) const
pure virtual

Returns whether the node is empty. return A bool value indicating whether the contents and qualifiers of a node are empty.

◆ IsQualifierNode()

virtual bool APICALL AdobeXMPCore::INode_v1::IsQualifierNode ( ) const
pure virtual

Indicates whether the node is a qualifier node.

Returns
A bool value; true in case the node is a qualifier node, false otherwise.

◆ QualifiersCount()

virtual sizet APICALL AdobeXMPCore::INode_v1::QualifiersCount ( ) const
pure virtual

Gets the count of the qualifiers attached with the node.

Returns
An object of type #AdobeXMPCommon::sizet containing the count of qualifiers attached with the node.

◆ QualifiersIterator() [1/2]

XMP_PRIVATE spcINodeIterator AdobeXMPCore::INode_v1::QualifiersIterator ( ) const
inline

Get an iterator object to iterate over all the qualifier nodes attached to the composite node.

Returns
A shared pointer to a const or non const #INodeIterator object.

Definition at line 132 of file INode.h.

132  {
133  return const_cast< INode_v1 * >( this )->QualifiersIterator();
134  }

◆ QualifiersIterator() [2/2]

virtual spINodeIterator APICALL AdobeXMPCore::INode_v1::QualifiersIterator ( )
pure virtual

◆ RemoveQualifier()

virtual spINode APICALL AdobeXMPCore::INode_v1::RemoveQualifier ( const char *  nameSpace,
sizet  nameSpaceLength,
const char *  name,
sizet  nameLength 
)
pure virtual

Removes the qualifier node with the specified nameSpace and name.

Parameters
[in]nameSpacePointer to a constant char buffer containing name space URI of the qualifier node.
[in]nameSpaceLengthNumber of characters in nameSpace. In case nameSpace is null terminated set it to #AdobeXMPCommon::npos.
[in]namePointer to a constant char buffer containing local name of the qualifier node.
[in]nameLengthNumber of characters in name. In case name is null terminated set it to #AdobeXMPCommon::npos.
Returns
A shared pointer to #AdobeXMPCore::INode object representing qualifier node which is removed from the node.
Note
In case no qualifier node exists at the given index an invalid shared pointer is returned.

◆ ReplaceQualifier()

virtual spINode APICALL AdobeXMPCore::INode_v1::ReplaceQualifier ( const spINode node)
pure virtual

Replaces a given qualifier node.

Parameters
[in]nodeShared pointer to an object of #AdobeXMPCore::INode representing the qualifier node to be inserted.
Returns
A shared pointer to a qualifier node which is being replaced.
Attention
Error is thrown in following cases:
  1. given qualifier node is invalid.
  2. given qualifier node is already a child of some other node.
  3. there exists no qualifier node with the same nameSpace and name combination.
Note
Warning is raised in case the type of the old existing node is not same as that of new node.

◆ SetName()

virtual void APICALL AdobeXMPCore::INode_v1::SetName ( const char *  name,
sizet  nameLength 
)
pure virtual

Changes the local name of the node.

Parameters
[in]namePointer to a constant char buffer containing local name of the node.
[in]nameLengthNumber of characters in name. In case name is null terminated set it to #AdobeXMPCommon::npos.
Attention
Error can be thrown in case
  • name is NULL pointer or its contents are empty
  • name is not valid XML property name.
  • Sibling with the same combination of name and nameSpace is present.

◆ SetNameSpace()

virtual void APICALL AdobeXMPCore::INode_v1::SetNameSpace ( const char *  nameSpace,
sizet  nameSpaceLength 
)
pure virtual

Changes the name space of the node.

Parameters
[in]nameSpacePointer to a constant char buffer containing name space URI of the node.
[in]nameSpaceLengthNumber of characters in nameSpace. In case nameSpace is null terminated set it to #AdobeXMPCommon::npos.
Attention
Error can be thrown in case
  • nameSpace is NULL pointer or its contents are empty
  • Sibling with the same combination of name and nameSpace is present.

The documentation for this class was generated from the following file:
AdobeXMPCore::INode_v1::eNodeType
eNodeType
Indicates various types of node available in XMP Data Model like simple, array and structure.
Definition: INode.h:38
AdobeXMPCore::INode_v1::GetQualifier
XMP_PRIVATE spcINode GetQualifier(const char *nameSpace, sizet nameSpaceLength, const char *name, sizet nameLength) const
Gets the qualifier of the node having specified namespace and name.
Definition: INode.h:160
AdobeXMPCore::spIStructureNode
shared_ptr< IStructureNode > spIStructureNode
Definition: XMPCoreFwdDeclarations.h:103
AdobeXMPCore::INode_v1::kNTStructure
@ kNTStructure
XMP Node is of structure type.
Definition: INode.h:49
AdobeXMPCore::spISimpleNode
shared_ptr< ISimpleNode > spISimpleNode
Definition: XMPCoreFwdDeclarations.h:79
AdobeXMPCore::INode_v1::kNTNone
@ kNTNone
Indicates none, to be used as invalid type.
Definition: INode.h:40
AdobeXMPCore::INode_v1::ConvertToMetadata
XMP_PRIVATE spcIMetadata ConvertToMetadata() const
Converts Node to a metadata node type, if possible.
Definition: INode.h:374
AdobeXMPCore::INode_v1::QualifiersIterator
XMP_PRIVATE spcINodeIterator QualifiersIterator() const
Definition: INode.h:132
AdobeXMPCore::INode_v1::GetParent
XMP_PRIVATE spcINode GetParent() const
Gets the parent node of the node.
Definition: INode.h:75
AdobeXMPCore::INode_v1::kNTSimple
@ kNTSimple
XMP Node is of Simple Node type (key value pair).
Definition: INode.h:43
AdobeXMPCore::INode_v1::ConvertToSimpleNode
XMP_PRIVATE spcISimpleNode ConvertToSimpleNode() const
Converts Node to a simple node, if possible.
Definition: INode.h:341
AdobeXMPCore::spIArrayNode
shared_ptr< IArrayNode > spIArrayNode
Definition: XMPCoreFwdDeclarations.h:115
AdobeXMPCore::spcISimpleNode
shared_ptr< const ISimpleNode > spcISimpleNode
Definition: XMPCoreFwdDeclarations.h:80
AdobeXMPCore::spcIArrayNode
shared_ptr< const IArrayNode > spcIArrayNode
Definition: XMPCoreFwdDeclarations.h:116
AdobeXMPCore::INode_v1::ConvertToArrayNode
XMP_PRIVATE spcIArrayNode ConvertToArrayNode() const
Converts Node to an array node type, if possible.
Definition: INode.h:363
AdobeXMPCore::spcIStructureNode
shared_ptr< const IStructureNode > spcIStructureNode
Definition: XMPCoreFwdDeclarations.h:104
AdobeXMPCore::INode_v1::kNTAll
@ kNTAll
XMP Node of any type.
Definition: INode.h:52
AdobeXMPCore::INode_v1::ConvertToStructureNode
XMP_PRIVATE spcIStructureNode ConvertToStructureNode() const
Converts Node to a structure node type, if possible.
Definition: INode.h:352
AdobeXMPCommon::kAllBits
static const uint32 kAllBits(0xFFFFFFFF)
AdobeXMPCore::INode_v1::kNTArray
@ kNTArray
XMP Node is of Array type. Indexing start from 1.
Definition: INode.h:46