XMP Toolkit SDK  6.0.0
AdobeXMPCore::INodeIterator_v1 Class Referenceabstract

Interface that represents an iterator over the mutable children of a XMP DOM Node. More...

#include <INodeIterator.h>

Inheritance diagram for AdobeXMPCore::INodeIterator_v1:
AdobeXMPCommon::ISharedObject AdobeXMPCommon::IVersionable

Public Member Functions

virtual INode_v1::eNodeType APICALL GetNodeType () const =0
 Gets the type of the node currently pointed by the iterator. More...
 
XMP_PRIVATE spIStructureNode GetStructureNode ()
 Gets the iterator's currently pointed node as structure node, if possible. More...
 
XMP_PRIVATE spcIStructureNode GetStructureNode () const
 
XMP_PRIVATE spIArrayNode GetArrayNode ()
 Gets the iterator's currently pointed node as an array node, if possible. More...
 
XMP_PRIVATE spcIArrayNode GetArrayNode () const
 
virtual spINode APICALL GetNode ()=0
 Gets the node currently pointed by the iterator. More...
 
XMP_PRIVATE spcINode APICALL GetNode () const
 
XMP_PRIVATE spISimpleNode GetSimpleNode ()
 Gets the iterator's currently pointed node as simple node, if possible. More...
 
XMP_PRIVATE spcISimpleNode GetSimpleNode () const
 
virtual spINodeIterator APICALL Next ()=0
 Advances iterator by one position. More...
 
XMP_PRIVATE spcINodeIterator APICALL Next () const
 
- 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 ~INodeIterator_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 ()
 

Detailed Description

Interface that represents an iterator over the mutable children of a XMP DOM Node.

Note
Iterators are valid as long as their are no changes performed on the node. In case there are some changes performed on the node then the behavior is undefined.

Definition at line 28 of file INodeIterator.h.

Constructor & Destructor Documentation

◆ ~INodeIterator_v1()

virtual AdobeXMPCore::INodeIterator_v1::~INodeIterator_v1 ( )
inlineprotectedvirtual

Destructor

Definition at line 179 of file INodeIterator.h.

179 {}

Member Function Documentation

◆ GetArrayNode() [1/2]

XMP_PRIVATE spIArrayNode AdobeXMPCore::INodeIterator_v1::GetArrayNode ( )
inline

Gets the iterator's currently pointed node as an array node, if possible.

Returns
A shared pointer to a const or non const object of type #IArrayNode.
Attention
Error is thrown in case
  • iterator's currently pointed node is valid but is not an array node.
Note
In case iterator has gone beyond its limit, an invalid shared pointer is returned.

Definition at line 96 of file INodeIterator.h.

96  {
97  auto node = GetNode();
98  if ( node ) return node->ConvertToArrayNode();
99  return spIArrayNode();
100  }

◆ GetArrayNode() [2/2]

XMP_PRIVATE spcIArrayNode AdobeXMPCore::INodeIterator_v1::GetArrayNode ( ) const
inline

Definition at line 102 of file INodeIterator.h.

102  {
103  return const_cast< INodeIterator * >( this )->GetArrayNode();
104  }

◆ GetNode() [1/2]

XMP_PRIVATE spcINode APICALL AdobeXMPCore::INodeIterator_v1::GetNode ( ) const
inline

Definition at line 47 of file INodeIterator.h.

47  {
48  return const_cast< INodeIterator * >( this )->GetNode();
49  };

◆ GetNode() [2/2]

virtual spINode APICALL AdobeXMPCore::INodeIterator_v1::GetNode ( )
pure virtual

Gets the node currently pointed by the iterator.

Returns
A shared pointer to a const or non const object of type #INode.
Note
In case iterator has gone beyond its limit, an invalid shared pointer is returned

◆ GetNodeType()

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

Gets the type of the node currently pointed by the iterator.

Returns
A value of type #INode_v1::eNodeType indicating the type of the node currently pointed by the iterator.

◆ GetSimpleNode() [1/2]

XMP_PRIVATE spISimpleNode AdobeXMPCore::INodeIterator_v1::GetSimpleNode ( )
inline

Gets the iterator's currently pointed node as simple node, if possible.

Returns
A shared pointer to a const or non const object of type #ISimpleNode.
Attention
Error is thrown in case
  • iterator's currently pointed node is valid but is not a simple node.
Note
In case iterator has gone beyond its limit, an invalid shared pointer is returned.

Definition at line 60 of file INodeIterator.h.

60  {
61  auto node = GetNode();
62  if ( node ) return node->ConvertToSimpleNode();
63  return spISimpleNode();
64  }

◆ GetSimpleNode() [2/2]

XMP_PRIVATE spcISimpleNode AdobeXMPCore::INodeIterator_v1::GetSimpleNode ( ) const
inline

Definition at line 66 of file INodeIterator.h.

66  {
67  return const_cast< INodeIterator * >( this )->GetSimpleNode();
68  }

◆ GetStructureNode() [1/2]

XMP_PRIVATE spIStructureNode AdobeXMPCore::INodeIterator_v1::GetStructureNode ( )
inline

Gets the iterator's currently pointed node as structure node, if possible.

Returns
A shared pointer to a const or non const object of type #IStructureNode.
Attention
Error is thrown in case
  • iterator's currently pointed node is valid but is not a structure node.
Note
In case iterator has gone beyond its limit, an invalid shared pointer is returned.

Definition at line 78 of file INodeIterator.h.

78  {
79  auto node = GetNode();
80  if ( node ) return node->ConvertToStructureNode();
81  return spIStructureNode();
82  }

◆ GetStructureNode() [2/2]

XMP_PRIVATE spcIStructureNode AdobeXMPCore::INodeIterator_v1::GetStructureNode ( ) const
inline

Definition at line 84 of file INodeIterator.h.

84  {
85  return const_cast< INodeIterator * >( this )->GetStructureNode();
86  }

◆ Next() [1/2]

XMP_PRIVATE spcINodeIterator APICALL AdobeXMPCore::INodeIterator_v1::Next ( ) const
inline

Definition at line 114 of file INodeIterator.h.

114  {
115  return const_cast< INodeIterator * >( this )->Next();
116  }

◆ Next() [2/2]

virtual spINodeIterator APICALL AdobeXMPCore::INodeIterator_v1::Next ( )
pure virtual

Advances iterator by one position.

Returns
A shared pointer to a const or non object of type #INodeIterator.
Note
Returned shared pointer is invalid in case the current node is the last one.

The documentation for this class was generated from the following file:
AdobeXMPCore::INodeIterator_v1::GetArrayNode
XMP_PRIVATE spIArrayNode GetArrayNode()
Gets the iterator's currently pointed node as an array node, if possible.
Definition: INodeIterator.h:96
AdobeXMPCore::spIStructureNode
shared_ptr< IStructureNode > spIStructureNode
Definition: XMPCoreFwdDeclarations.h:103
AdobeXMPCore::spISimpleNode
shared_ptr< ISimpleNode > spISimpleNode
Definition: XMPCoreFwdDeclarations.h:79
AdobeXMPCore::INodeIterator_v1::Next
virtual spINodeIterator APICALL Next()=0
Advances iterator by one position.
AdobeXMPCore::spIArrayNode
shared_ptr< IArrayNode > spIArrayNode
Definition: XMPCoreFwdDeclarations.h:115
AdobeXMPCore::INodeIterator_v1::GetNode
virtual spINode APICALL GetNode()=0
Gets the node currently pointed by the iterator.
AdobeXMPCore::INodeIterator_v1::GetStructureNode
XMP_PRIVATE spIStructureNode GetStructureNode()
Gets the iterator's currently pointed node as structure node, if possible.
Definition: INodeIterator.h:78
AdobeXMPCore::INodeIterator_v1::GetSimpleNode
XMP_PRIVATE spISimpleNode GetSimpleNode()
Gets the iterator's currently pointed node as simple node, if possible.
Definition: INodeIterator.h:60