DCMTK Version 3.6.9 OFFIS DICOM Toolkit

Loading...
Searching...
No Matches
Public Member Functions | List of all members
DSRIncludedTemplateNodeCursor Class Reference

Class implementing a document tree node cursor. More...

Inheritance diagram for DSRIncludedTemplateNodeCursor:

## Public Member Functions
| DSRIncludedTemplateNodeCursor ()
| default constructor
| DSRIncludedTemplateNodeCursor (const DSRIncludedTemplateNodeCursor &cursor)
| copy constructor
| DSRIncludedTemplateNodeCursor (DSRDocumentTreeNode *node, const DSRPositionCounter *position=NULL)
| constructor.
virtual | ~DSRIncludedTemplateNodeCursor ()
| destructor
DSRIncludedTemplateNodeCursor & | operator= (const DSRIncludedTemplateNodeCursor &cursor)
| assignment operator
DSRIncludedTemplateNodeCursor & | operator= (DSRDocumentTreeNode *node)
| assignment operator.
virtual const DSRDocumentTreeNode * | getChildNode () const
| get pointer to first child node.
virtual size_t | countChildNodes (const OFBool searchIntoSub=OFTrue) const
| count number of children of the current node.
virtual size_t | goDown ()
| goto first child node (one level down)
virtual size_t | iterate (const OFBool searchIntoSub=OFTrue)
| iterate over all nodes (starting from current position)
Public Member Functions inherited from DSRTreeNodeCursor< DSRDocumentTreeNode >
| DSRTreeNodeCursor ()
| default constructor
| DSRTreeNodeCursor (const DSRTreeNodeCursor< DSRDocumentTreeNode > &cursor)
| copy constructor
| DSRTreeNodeCursor (DSRDocumentTreeNode *node, const DSRPositionCounter *position=NULL)
| constructor.
virtual | ~DSRTreeNodeCursor ()
| destructor
DSRTreeNodeCursor< DSRDocumentTreeNode > & | operator= (const DSRTreeNodeCursor< DSRDocumentTreeNode > &cursor)
| assignment operator
DSRTreeNodeCursor< DSRDocumentTreeNode > & | operator= (DSRDocumentTreeNode *node)
| assignment operator.
virtual void | clear ()
| clear all member variables.
virtual OFBool | isValid () const
| check whether cursor currently points to a valid node
OFBool | hasParentNode () const
| check whether the current node has a parent
OFBool | hasChildNodes () const
| check whether the current node has any children
OFBool | hasPreviousNode () const
| check whether the current node has a preceding sibling
OFBool | hasNextNode () const
| check whether the current node has a following sibling
OFBool | hasSiblingNodes () const
| check whether the current node has any siblings
virtual DSRDocumentTreeNode * | getNode () const
| get pointer to current node
virtual const DSRDocumentTreeNode * | getParentNode () const
| get pointer to parent node.
virtual const DSRDocumentTreeNode * | getPreviousNode () const
| get pointer to previous node.
virtual const DSRDocumentTreeNode * | getNextNode () const
| get pointer to next node.
virtual size_t | gotoFirst ()
| goto first node on the same level (first sibling).
virtual size_t | gotoLast ()
| goto last node on the same level (last sibling).
virtual size_t | gotoPrevious ()
| goto previous node on the same level (preceding sibling)
virtual size_t | gotoNext ()
| goto next node on the same level (following sibling)
virtual size_t | goUp ()
| goto parent node (one level up)
virtual size_t | gotoParent ()
| goto parent node (one level up)
virtual size_t | gotoChild ()
| goto first child node (one level down)
size_t | gotoNode (const size_t searchID)
| set cursor to specified node.
size_t | gotoNode (const OFString &position, const char separator='.')
| set cursor to specified node.
size_t | gotoNode (const DSRTreeNodeAnnotation &annotation)
| set cursor to specified node.
size_t | gotoNode (const DSRDocumentTreeNode &nodeValue)
| set cursor to specified node.
size_t | getNodeID () const
| get current node ID.
size_t | getLevel () const
| get current level.
DSRPositionCounter & | getPositionCounter ()
| get reference to internal position counter.
const OFString & | getPosition (OFString &position, const char separator='.') const
| get position string of the current node.

## Additional Inherited Members
Protected Member Functions inherited from DSRTreeNodeCursor< DSRDocumentTreeNode >
void | swap (DSRTreeNodeCursor< DSRDocumentTreeNode > &cursor)
| fast, non-throwing swap function.
void | clearNodeCursorStack ()
| clear the internal node cursor stack
const DSRTreeNodeCursor< DSRDocumentTreeNode > & | getCursor () const
| get cursor
void | setCursor (const DSRTreeNodeCursor< DSRDocumentTreeNode > &cursor)
| set cursor to specified object
size_t | setCursor (DSRDocumentTreeNode *node)
| set cursor to specified node.
DSRDocumentTreeNode * | getChild () const
| get pointer to first child node
Protected Attributes inherited from DSRTreeNodeCursor< DSRDocumentTreeNode >
DSRDocumentTreeNode * | NodeCursor
| pointer to current node
OFStack< DSRDocumentTreeNode * > | NodeCursorStack
| stack of node pointers. Used to store the cursor position of upper levels.
DSRPositionCounter | Position
| counter for the current position within the current level and on upper levels

## Detailed Description

Class implementing a document tree node cursor.

This type of cursor also supports included sub-templates, i.e. the subtree that is managed by an instance of DSRIncludedTemplateTreeNode is also iterated.

## Constructor & Destructor Documentation

## ◆ DSRIncludedTemplateNodeCursor() [1/2]

DSRIncludedTemplateNodeCursor::DSRIncludedTemplateNodeCursor | ( | const DSRIncludedTemplateNodeCursor & | cursor | ) |

copy constructor

Parameters

  cursor | object to be copied

References DSRIncludedTemplateNodeCursor().

## ◆ DSRIncludedTemplateNodeCursor() [2/2]

DSRIncludedTemplateNodeCursor::DSRIncludedTemplateNodeCursor | ( | DSRDocumentTreeNode * | node,
|  | const DSRPositionCounter * | position = NULL )

constructor.

See comments on DSRTreeNodeCursor<>::setCursor() method.

Parameters

  node | pointer to tree node used to initialize the cursor
  position | optional pointer to position counter that should be used to initialize the internal counter

## Member Function Documentation

## ◆ countChildNodes()

virtual size_t DSRIncludedTemplateNodeCursor::countChildNodes | ( | const OFBool | searchIntoSub = OFTrue | ) | const
| virtual

count number of children of the current node.

This method iterates over all children of the current node, either on all sub-levels or on the first child level only.

Parameters

  searchIntoSub | flag indicating whether to search into sub-trees ("deep search") or on the first child level only

Returns
  number of children of the current node, 0 if none

Reimplemented from DSRTreeNodeCursor< DSRDocumentTreeNode >.

## ◆ getChildNode()

virtual const DSRDocumentTreeNode * DSRIncludedTemplateNodeCursor::getChildNode | ( |  | ) | const
| virtual

get pointer to first child node.

Can be used to have a lookup to the first child node without changing the cursor.

Returns
  pointer to first child node (if any), NULL otherwise

Reimplemented from DSRTreeNodeCursor< DSRDocumentTreeNode >.

## ◆ goDown()

virtual size_t DSRIncludedTemplateNodeCursor::goDown | ( |  | ) |
| virtual

goto first child node (one level down)

Returns
  ID of the first child node if successful, 0 otherwise

Reimplemented from DSRTreeNodeCursor< DSRDocumentTreeNode >.

## ◆ iterate()

virtual size_t DSRIncludedTemplateNodeCursor::iterate | ( | const OFBool | searchIntoSub = OFTrue | ) |
| virtual

iterate over all nodes (starting from current position)

Parameters

  searchIntoSub | flag indicating whether to search into sub-trees ("deep search") or on the current level only

Returns
  ID of the next node if successful, 0 otherwise

Reimplemented from DSRTreeNodeCursor< DSRDocumentTreeNode >.

## ◆ operator=() [1/2]

DSRIncludedTemplateNodeCursor & DSRIncludedTemplateNodeCursor::operator= | ( | const DSRIncludedTemplateNodeCursor & | cursor | ) |

assignment operator

Parameters

  cursor | object to be copied

Returns
  reference to modified cursor (this object)

References DSRIncludedTemplateNodeCursor().

## ◆ operator=() [2/2]

DSRIncludedTemplateNodeCursor & DSRIncludedTemplateNodeCursor::operator= | ( | DSRDocumentTreeNode * | node | ) |

assignment operator.

See comments on DSRTreeNodeCursor<>::setCursor() method.

Parameters

  node | node to which the cursor should be set

Returns
  reference to modified cursor (this object)

References DSRIncludedTemplateNodeCursor().

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

- dcmsr/include/dcmtk/dcmsr/dsritcsr.h

Generated on Sat Mar 1 2025 for DCMTK Version 3.6.9 by Doxygen 1.13.2