DSRDateTreeNode Class Reference

Class for content item DATE. More...

Inheritance diagram for DSRDateTreeNode:

DSRDocumentTreeNode DSRStringValue DSRTreeNode DSRTypes List of all members.

Public Member Functions

 DSRDateTreeNode (const E_RelationshipType relationshipType)
 constructor
 DSRDateTreeNode (const E_RelationshipType relationshipType, const OFString &stringValue)
 constructor
virtual ~DSRDateTreeNode ()
 destructor
virtual void clear ()
 clear all member variables.
virtual OFBool isValid () const
 check whether the content item is valid.
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.

Static Public Member Functions

static OFStringgetValueFromXMLNodeContent (const DSRXMLDocument &doc, DSRXMLCursor cursor, OFString &dateValue, const OFBool clearString=OFTrue)
 get DICOM date value from given XML element.

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

 DSRDateTreeNode (const DSRDateTreeNode &)
DSRDateTreeNodeoperator= (const DSRDateTreeNode &)

Detailed Description

Class for content item DATE.

Definition at line 50 of file dsrdattn.h.


Constructor & Destructor Documentation

DSRDateTreeNode::DSRDateTreeNode const E_RelationshipType  relationshipType  ) 
 

constructor

Parameters:
relationshipType type of relationship to the parent tree node. Should not be RT_invalid or RT_isRoot.

DSRDateTreeNode::DSRDateTreeNode const E_RelationshipType  relationshipType,
const OFString stringValue
 

constructor

Parameters:
relationshipType type of relationship to the parent tree node. Should not be RT_invalid or RT_isRoot.
stringValue initial string value to be set


Member Function Documentation

virtual void DSRDateTreeNode::clear  )  [virtual]
 

clear all member variables.

Please note that the content item might become invalid afterwards.

Reimplemented from DSRDocumentTreeNode.

static OFString& DSRDateTreeNode::getValueFromXMLNodeContent const DSRXMLDocument doc,
DSRXMLCursor  cursor,
OFString dateValue,
const OFBool  clearString = OFTrue
[static]
 

get DICOM date value from given XML element.

The DICOM Date (DA) value is expected to be stored in ISO format as created by writeXML().

Parameters:
doc document containing the XML file content
cursor cursor pointing to the corresponding node
dateValue reference to string object in which the value should be stored
clearString flag specifying whether to clear the 'dateTimeValue' or not
Returns:
reference to string object (might be empty)

virtual OFBool DSRDateTreeNode::isValid  )  const [virtual]
 

check whether the content item is valid.

The content item is valid if the two base classes and the concept name are valid.

Returns:
OFTrue if tree node is valid, OFFalse otherwise

Reimplemented from DSRDocumentTreeNode.

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

print content item.

A typical output looks like this: contains DATE:(,,"Code")="20001010"

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 DSRDateTreeNode::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 DSRDateTreeNode::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 DSRDateTreeNode::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.

virtual OFCondition DSRDateTreeNode::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 DSRDateTreeNode::writeXML ostream &  stream,
const size_t  flags,
OFConsole logStream
const [virtual]
 

write content item in XML format.

Uses ISO formatted date value.

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