dcvrcs.h

00001 /*
00002  *
00003  *  Copyright (C) 1994-2005, OFFIS
00004  *
00005  *  This software and supporting documentation were developed by
00006  *
00007  *    Kuratorium OFFIS e.V.
00008  *    Healthcare Information and Communication Systems
00009  *    Escherweg 2
00010  *    D-26121 Oldenburg, Germany
00011  *
00012  *  THIS SOFTWARE IS MADE AVAILABLE,  AS IS,  AND OFFIS MAKES NO  WARRANTY
00013  *  REGARDING  THE  SOFTWARE,  ITS  PERFORMANCE,  ITS  MERCHANTABILITY  OR
00014  *  FITNESS FOR ANY PARTICULAR USE, FREEDOM FROM ANY COMPUTER DISEASES  OR
00015  *  ITS CONFORMITY TO ANY SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND
00016  *  PERFORMANCE OF THE SOFTWARE IS WITH THE USER.
00017  *
00018  *  Module:  dcmdata
00019  *
00020  *  Author:  Gerd Ehlers, Andreas Barth
00021  *
00022  *  Purpose: Interface of class DcmCodeString
00023  *
00024  *  Last Update:      $Author: meichel $
00025  *  Update Date:      $Date: 2005/12/08 16:28:54 $
00026  *  Source File:      $Source: /share/dicom/cvs-depot/dcmtk/dcmdata/include/dcmtk/dcmdata/dcvrcs.h,v $
00027  *  CVS/RCS Revision: $Revision: 1.16 $
00028  *  Status:           $State: Exp $
00029  *
00030  *  CVS/RCS Log at end of file
00031  *
00032  */
00033 
00034 
00035 #ifndef DCVRCS_H
00036 #define DCVRCS_H
00037 
00038 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
00039 
00040 #include "dcmtk/dcmdata/dcbytstr.h"
00041 
00042 
00045 class DcmCodeString
00046   : public DcmByteString
00047 {
00048 
00049   public:
00050 
00056     DcmCodeString(const DcmTag &tag,
00057                   const Uint32 len = 0);
00058 
00062     DcmCodeString(const DcmCodeString &old);
00063 
00066     virtual ~DcmCodeString();
00067 
00072     DcmCodeString &operator=(const DcmCodeString &obj);
00073 
00077     virtual DcmObject *clone() const
00078     {
00079       return new DcmCodeString(*this);
00080     }
00081 
00085     virtual DcmEVR ident() const;
00086 
00093     virtual OFCondition getOFString(OFString &stringVal,
00094                                     const unsigned long pos,
00095                                     OFBool normalize = OFTrue);
00096 
00097     /* --- static helper functions --- */
00098 
00107     static OFBool checkVR(const OFString &value,
00108                           size_t *pos = NULL,
00109                           const OFBool checkLength = OFTrue);
00110 };
00111 
00112 
00113 #endif // DCVRCS_H
00114 
00115 
00116 /*
00117 ** CVS/RCS Log:
00118 ** $Log: dcvrcs.h,v $
00119 ** Revision 1.16  2005/12/08 16:28:54  meichel
00120 ** Changed include path schema for all DCMTK header files
00121 **
00122 ** Revision 1.15  2004/07/01 12:28:25  meichel
00123 ** Introduced virtual clone method for DcmObject and derived classes.
00124 **
00125 ** Revision 1.14  2003/06/12 13:30:58  joergr
00126 ** Added static function checkVR().
00127 **
00128 ** Revision 1.13  2002/12/06 12:49:14  joergr
00129 ** Enhanced "print()" function by re-working the implementation and replacing
00130 ** the boolean "showFullData" parameter by a more general integer flag.
00131 ** Added doc++ documentation.
00132 ** Made source code formatting more consistent with other modules/files.
00133 **
00134 ** Revision 1.12  2002/04/25 09:48:10  joergr
00135 ** Removed getOFStringArray() implementation.
00136 **
00137 ** Revision 1.11  2001/09/25 17:19:30  meichel
00138 ** Adapted dcmdata to class OFCondition
00139 **
00140 ** Revision 1.10  2001/06/01 15:48:48  meichel
00141 ** Updated copyright header
00142 **
00143 ** Revision 1.9  2000/03/08 16:26:22  meichel
00144 ** Updated copyright header.
00145 **
00146 ** Revision 1.8  1999/03/31 09:24:57  meichel
00147 ** Updated copyright header in module dcmdata
00148 **
00149 ** Revision 1.7  1998/11/12 16:47:46  meichel
00150 ** Implemented operator= for all classes derived from DcmObject.
00151 **
00152 ** Revision 1.6  1997/09/11 15:13:12  hewett
00153 ** Modified getOFString method arguments by removing a default value
00154 ** for the pos argument.  By requiring the pos argument to be provided
00155 ** ensures that callers realise getOFString only gets one component of
00156 ** a multi-valued string.
00157 **
00158 ** Revision 1.5  1997/08/29 08:32:40  andreas
00159 ** - Added methods getOFString and getOFStringArray for all
00160 **   string VRs. These methods are able to normalise the value, i. e.
00161 **   to remove leading and trailing spaces. This will be done only if
00162 **   it is described in the standard that these spaces are not relevant.
00163 **   These methods do not test the strings for conformance, this means
00164 **   especially that they do not delete spaces where they are not allowed!
00165 **   getOFStringArray returns the string with all its parts separated by \
00166 **   and getOFString returns only one value of the string.
00167 **   CAUTION: Currently getString returns a string with trailing
00168 **   spaces removed (if dcmEnableAutomaticInputDataCorrection == OFTrue) and
00169 **   truncates the original string (since it is not copied!). If you rely on this
00170 **   behaviour please change your application now.
00171 **   Future changes will ensure that getString returns the original
00172 **   string from the DICOM object (NULL terminated) inclusive padding.
00173 **   Currently, if you call getOF... before calling getString without
00174 **   normalisation, you can get the original string read from the DICOM object.
00175 **
00176 ** Revision 1.4  1996/01/09 11:06:17  andreas
00177 ** New Support for Visual C++
00178 ** Correct problems with inconsistent const declarations
00179 **
00180 ** Revision 1.3  1996/01/05 13:23:03  andreas
00181 ** - changed to support new streaming facilities
00182 ** - more cleanups
00183 ** - merged read / write methods for block and file transfer
00184 **
00185 */


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