OFFIS DCMTK  Version 3.6.0
dsrstrvl.h
1 /*
2  *
3  * Copyright (C) 2000-2010, OFFIS e.V.
4  * All rights reserved. See COPYRIGHT file for details.
5  *
6  * This software and supporting documentation were developed by
7  *
8  * OFFIS e.V.
9  * R&D Division Health
10  * Escherweg 2
11  * D-26121 Oldenburg, Germany
12  *
13  *
14  * Module: dcmsr
15  *
16  * Author: Joerg Riesmeier
17  *
18  * Purpose:
19  * classes: DSRStringValue
20  *
21  * Last Update: $Author: joergr $
22  * Update Date: $Date: 2010-10-14 13:16:33 $
23  * CVS/RCS Revision: $Revision: 1.16 $
24  * Status: $State: Exp $
25  *
26  * CVS/RCS Log at end of file
27  *
28  */
29 
30 
31 #ifndef DSRSTRVL_H
32 #define DSRSTRVL_H
33 
34 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */
35 
36 #include "dcmtk/dcmsr/dsrtypes.h"
37 
38 #include "dcmtk/ofstd/ofstring.h"
39 
40 
41 /*---------------------*
42  * class declaration *
43  *---------------------*/
44 
48 {
49 
50  public:
51 
55 
60  DSRStringValue(const OFString &stringValue);
61 
65  DSRStringValue(const DSRStringValue &stringValue);
66 
69  virtual ~DSRStringValue();
70 
75  DSRStringValue &operator=(const DSRStringValue &stringValue);
76 
80  virtual void clear();
81 
86  virtual OFBool isValid() const;
87 
98  void print(STD_NAMESPACE ostream &stream,
99  const size_t maxLength = 0) const;
100 
108  OFCondition read(DcmItem &dataset,
109  const DcmTagKey &tagKey);
110 
116  OFCondition write(DcmItem &dataset,
117  const DcmTagKey &tagKey) const;
118 
126  DSRXMLCursor cursor,
127  const OFBool encoding = OFFalse);
128 
134  OFCondition renderHTML(STD_NAMESPACE ostream &docStream,
135  const size_t flags) const;
136 
140  inline const OFString &getValue() const
141  {
142  return Value;
143  }
144 
152  OFCondition setValue(const OFString &stringValue);
153 
154 
155  protected:
156 
164  virtual OFBool checkValue(const OFString &stringValue) const;
165 
166 
167  private:
168 
171 };
172 
173 
174 #endif
175 
176 
177 /*
178  * CVS/RCS Log:
179  * $Log: dsrstrvl.h,v $
180  * Revision 1.16 2010-10-14 13:16:33 joergr
181  * Updated copyright header. Added reference to COPYRIGHT file.
182  *
183  * Revision 1.15 2009-10-13 14:57:50 uli
184  * Switched to logging mechanism provided by the "new" oflog module.
185  *
186  * Revision 1.14 2007-11-15 16:33:30 joergr
187  * Added support for output in XHTML 1.1 format.
188  *
189  * Revision 1.13 2006/08/15 16:40:03 meichel
190  * Updated the code in module dcmsr to correctly compile when
191  * all standard C++ classes remain in namespace std.
192  *
193  * Revision 1.12 2006/05/11 09:18:21 joergr
194  * Moved containsExtendedCharacters() from dcmsr to dcmdata module.
195  *
196  * Revision 1.11 2005/12/08 16:05:19 meichel
197  * Changed include path schema for all DCMTK header files
198  *
199  * Revision 1.10 2004/11/22 16:39:09 meichel
200  * Added method that checks if the SR document contains non-ASCII characters
201  * in any of the strings affected by SpecificCharacterSet.
202  *
203  * Revision 1.9 2003/08/07 18:01:42 joergr
204  * Removed libxml dependency from header files.
205  *
206  * Revision 1.8 2003/08/07 12:50:44 joergr
207  * Added readXML functionality.
208  *
209  * Revision 1.7 2001/09/26 13:04:11 meichel
210  * Adapted dcmsr to class OFCondition
211  *
212  * Revision 1.6 2001/06/01 15:51:03 meichel
213  * Updated copyright header
214  *
215  * Revision 1.5 2000/11/06 11:18:48 joergr
216  * Moved some protected methods to public part.
217  *
218  * Revision 1.4 2000/11/01 16:23:25 joergr
219  * Added support for conversion to XML.
220  *
221  * Revision 1.3 2000/10/23 15:12:55 joergr
222  * Added/updated doc++ comments.
223  *
224  * Revision 1.2 2000/10/18 17:08:11 joergr
225  * Added read and write methods.
226  *
227  * Revision 1.1 2000/10/13 07:49:32 joergr
228  * Added new module 'dcmsr' providing access to DICOM structured reporting
229  * documents (supplement 23). Doc++ documentation not yet completed.
230  *
231  *
232  */
a class representing a list of DICOM elements in which each element has a different tag and elements ...
Definition: dcitem.h:51
class maintaining a attribute tag (group and element number)
Definition: dctagkey.h:46
Class for string values.
Definition: dsrstrvl.h:47
OFCondition write(DcmItem &dataset, const DcmTagKey &tagKey) const
write string value to dataset
Class for XML documents.
Definition: dsrxmld.h:63
virtual OFBool isValid() const
check whether the current code is valid.
DSRStringValue()
default contructor
virtual void clear()
clear all internal variables.
const OFString & getValue() const
get string value
Definition: dsrstrvl.h:140
void print(STD_NAMESPACE ostream &stream, const size_t maxLength=0) const
print string value.
OFString Value
string value (various VRs, mandatory)
Definition: dsrstrvl.h:170
OFCondition renderHTML(STD_NAMESPACE ostream &docStream, const size_t flags) const
render string value in HTML/XHTML format
OFCondition readXML(const DSRXMLDocument &doc, DSRXMLCursor cursor, const OFBool encoding=OFFalse)
read string value from XML document
OFCondition read(DcmItem &dataset, const DcmTagKey &tagKey)
read string value from dataset.
OFCondition setValue(const OFString &stringValue)
set string value.
virtual ~DSRStringValue()
destructor
virtual OFBool checkValue(const OFString &stringValue) const
check the specified string value for validity.
a simple string class that implements a subset of std::string.
Definition: ofstring.h:86
Class for XML document cursors.
Definition: dsrxmlc.h:73
DSRStringValue & operator=(const DSRStringValue &stringValue)
assignment operator
General purpose class for condition codes.
Definition: ofcond.h:305


Generated on Thu Aug 27 2015 for OFFIS DCMTK Version 3.6.0 by Doxygen 1.8.9.1