DSRContainerTreeNode Class Reference

Class for content item CONTAINER. More...

Inheritance diagram for DSRContainerTreeNode:

DSRDocumentTreeNode DSRTreeNode DSRTypes List of all members.

Public Member Functions

 DSRContainerTreeNode (const E_RelationshipType relationshipType, const E_ContinuityOfContent continuityOfContent=COC_Separate)
 constructor
virtual ~DSRContainerTreeNode ()
 destructor
virtual void clear ()
 clear all member variables.
virtual OFBool isValid () const
 check whether the content item is valid.
virtual OFBool isShort (const size_t flags) const
 check whether the content is short.
virtual OFCondition print (ostream &stream, const size_t flags) const
 print content item.
virtual OFCondition writeXML (ostream &stream, const size_t flags, OFConsole *logStream) const
 write content item in XML format
virtual OFCondition renderHTML (ostream &docStream, ostream &annexStream, const size_t nestingLevel, size_t &annexNumber, const size_t flags, OFConsole *logStream) const
 render content item in HTML format.
E_ContinuityOfContent getContinuityOfContent () const
 get continuity of content flag.
OFCondition setContinuityOfContent (const E_ContinuityOfContent continuityOfContent)
 set continuity of content flag.

Protected Member Functions

virtual OFCondition readContentItem (DcmItem &dataset, OFConsole *logStream)
 read content item (value) from dataset
virtual OFCondition writeContentItem (DcmItem &dataset, OFConsole *logStream) const
 write content item (value) to dataset
virtual OFCondition readXMLContentItem (const DSRXMLDocument &doc, DSRXMLCursor cursor)
 read content item specific XML data
virtual OFCondition renderHTMLContentItem (ostream &docStream, ostream &annexStream, const size_t nestingLevel, size_t &annexNumber, const size_t flags, OFConsole *logStream) const
 render content item (value) in HTML format

Private Member Functions

 DSRContainerTreeNode (const DSRContainerTreeNode &)
DSRContainerTreeNodeoperator= (const DSRContainerTreeNode &)

Private Attributes

E_ContinuityOfContent ContinuityOfContent
 continuity of content flag (associated DICOM VR=CS, mandatory)

Detailed Description

Class for content item CONTAINER.

Definition at line 49 of file dsrcontn.h.


Constructor & Destructor Documentation

DSRContainerTreeNode::DSRContainerTreeNode const E_RelationshipType  relationshipType,
const E_ContinuityOfContent  continuityOfContent = COC_Separate
 

constructor

Parameters:
relationshipType type of relationship to the parent tree node. Should not be RT_invalid or RT_isRoot.
continuityOfContent Continuity of content flag (default: separate). Should be different from COC_invalid.


Member Function Documentation

virtual void DSRContainerTreeNode::clear  )  [virtual]
 

clear all member variables.

Please note that the content item might become invalid afterwards.

Reimplemented from DSRDocumentTreeNode.

E_ContinuityOfContent DSRContainerTreeNode::getContinuityOfContent  )  const [inline]
 

get continuity of content flag.

This flag specifies whether or not its contained content items (child nodes) are logically linked in a continuous textual flow, or are sparate items.

Returns:
continuity of content flag if successful, COC_invalid otherwise

Definition at line 133 of file dsrcontn.h.

References ContinuityOfContent.

virtual OFBool DSRContainerTreeNode::isShort const size_t  flags  )  const [virtual]
 

check whether the content is short.

A container content item is defined to be never short (return always OFFalse).

Parameters:
flags flag used to customize the output (see DSRTypes::HF_xxx)
Returns:
OFTrue if the content is short, OFFalse otherwise

Reimplemented from DSRDocumentTreeNode.

virtual OFBool DSRContainerTreeNode::isValid  )  const [virtual]
 

check whether the content item is valid.

The content item is valid if the base class is valid, the continuity of content flag is valid, and the concept name is valid or the content item is not the root item.

Returns:
OFTrue if tree node is valid, OFFalse otherwise

Reimplemented from DSRDocumentTreeNode.

virtual OFCondition DSRContainerTreeNode::print ostream &  stream,
const size_t  flags
const [virtual]
 

print content item.

A typical output looks like this: CONTAINER:(,,"Diagnosis")=SEPARATE for the root node and contains CONTAINER:=CONTINUOUS for a "normal" content item.

Parameters:
stream output stream to which the content item should be printed
flags flag used to customize the output (see DSRTypes::PF_xxx)
Returns:
status, EC_Normal if successful, an error code otherwise

Reimplemented from DSRDocumentTreeNode.

virtual OFCondition DSRContainerTreeNode::readContentItem DcmItem dataset,
OFConsole logStream
[protected, virtual]
 

read content item (value) from dataset

Parameters:
dataset DICOM dataset from which the content item should be read
logStream pointer to error/warning output stream (output disabled if NULL)
Returns:
status, EC_Normal if successful, an error code otherwise

Reimplemented from DSRDocumentTreeNode.

virtual OFCondition DSRContainerTreeNode::readXMLContentItem const DSRXMLDocument doc,
DSRXMLCursor  cursor
[protected, virtual]
 

read content item specific XML data

Parameters:
doc document containing the XML file content
cursor cursor pointing to the starting node
Returns:
status, EC_Normal if successful, an error code otherwise

Reimplemented from DSRDocumentTreeNode.

virtual OFCondition DSRContainerTreeNode::renderHTML ostream &  docStream,
ostream &  annexStream,
const size_t  nestingLevel,
size_t &  annexNumber,
const size_t  flags,
OFConsole logStream
const [virtual]
 

render content item in HTML format.

After rendering the current content item all child nodes (if any) are also rendered (see renderHTMLChildNodes() for details). This method overwrites the one specified in base class DSRDocumentTree since the rendering of the child nodes depends on the value of the flag 'ContinuityOfContent'.

Parameters:
docStream output stream to which the main HTML document is written
annexStream output stream to which the HTML document annex is written
nestingLevel current nesting level. Used to render section headings.
annexNumber reference to the variable where the current annex number is stored. Value is increased automatically by 1 after a new entry has been added.
flags flag used to customize the output (see DSRTypes::HF_xxx)
logStream pointer to error/warning output stream (output disabled if NULL)
Returns:
status, EC_Normal if successful, an error code otherwise

Reimplemented from DSRDocumentTreeNode.

virtual OFCondition DSRContainerTreeNode::renderHTMLContentItem ostream &  docStream,
ostream &  annexStream,
const size_t  nestingLevel,
size_t &  annexNumber,
const size_t  flags,
OFConsole logStream
const [protected, virtual]
 

render content item (value) in HTML format

Parameters:
docStream output stream to which the main HTML document is written
annexStream output stream to which the HTML document annex is written
nestingLevel current nesting level. Used to render section headings.
annexNumber reference to the variable where the current annex number is stored. Value is increased automatically by 1 after a new entry has been added.
flags flag used to customize the output (see DSRTypes::HF_xxx)
logStream pointer to error/warning output stream (output disabled if NULL)
Returns:
status, EC_Normal if successful, an error code otherwise

Reimplemented from DSRDocumentTreeNode.

OFCondition DSRContainerTreeNode::setContinuityOfContent const E_ContinuityOfContent  continuityOfContent  ) 
 

set continuity of content flag.

This flag specifies whether or not its contained content items (child nodes) are logically linked in a continuous textual flow, or are sparate items.

Parameters:
continuityOfContent value to be set (should be different from COC_onvalid)
Returns:
status, EC_Normal if successful, an error code otherwise

virtual OFCondition DSRContainerTreeNode::writeContentItem DcmItem dataset,
OFConsole logStream
const [protected, virtual]
 

write content item (value) to dataset

Parameters:
dataset DICOM dataset to which the content item should be written
logStream pointer to error/warning output stream (output disabled if NULL)
Returns:
status, EC_Normal if successful, an error code otherwise

Reimplemented from DSRDocumentTreeNode.

virtual OFCondition DSRContainerTreeNode::writeXML ostream &  stream,
const size_t  flags,
OFConsole logStream
const [virtual]
 

write content item in XML format

Parameters:
stream output stream to which the XML document is written
flags flag used to customize the output (see DSRTypes::XF_xxx)
logStream pointer to error/warning output stream (output disabled if NULL)
Returns:
status, EC_Normal if successful, an error code otherwise

Reimplemented from DSRDocumentTreeNode.


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


Generated on 20 Dec 2005 for OFFIS DCMTK Version 3.5.4 by Doxygen 1.4.5