Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

dcvrda.h

00001 /*
00002  *
00003  *  Copyright (C) 1994-2001, 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, Joerg Riesmeier
00021  *
00022  *  Purpose: Interface of class DcmDate
00023  *
00024  *  Last Update:      $Author: joergr $
00025  *  Update Date:      $Date: 2002/12/06 12:49:14 $
00026  *  Source File:      $Source: /share/dicom/cvs-depot/dcmtk/dcmdata/include/dcvrda.h,v $
00027  *  CVS/RCS Revision: $Revision: 1.11 $
00028  *  Status:           $State: Exp $
00029  *
00030  *  CVS/RCS Log at end of file
00031  *
00032  */
00033 
00034 #ifndef DCVRDA_H
00035 #define DCVRDA_H
00036 
00037 #include "osconfig.h"    /* make sure OS specific configuration is included first */
00038 
00039 #include "dctypes.h"
00040 #include "dcbytstr.h"
00041 #include "ofdate.h"
00042 
00043 
00046 class DcmDate
00047   : public DcmByteString
00048 {
00049 
00050   public:
00051 
00057     DcmDate(const DcmTag &tag,
00058             const Uint32 len = 0);
00059 
00063     DcmDate(const DcmDate &old);
00064 
00067     virtual ~DcmDate();
00068 
00073     DcmDate &operator=(const DcmDate &obj);
00074 
00078     virtual DcmEVR ident() const;
00079 
00086     virtual OFCondition getOFString(OFString &stringVal,
00087                                     const unsigned long pos,
00088                                     OFBool normalize = OFTrue);
00089 
00096     OFCondition setCurrentDate();
00097 
00102     OFCondition setOFDate(const OFDate &dateValue);
00103 
00113     OFCondition getOFDate(OFDate &dateValue,
00114                           const unsigned long pos = 0,
00115                           const OFBool supportOldFormat = OFTrue);
00116 
00127     OFCondition getISOFormattedDate(OFString &formattedDate,
00128                                     const unsigned long pos = 0,
00129                                     const OFBool supportOldFormat = OFTrue);
00130 
00131     /* --- static helper functions --- */
00132 
00140     static OFCondition getCurrentDate(OFString &dicomDate);
00141 
00149     static OFCondition getDicomDateFromOFDate(const OFDate &dateValue,
00150                                               OFString &dicomDate);
00151 
00161     static OFCondition getOFDateFromString(const OFString &dicomDate,
00162                                            OFDate &dateValue,
00163                                            const OFBool supportOldFormat = OFTrue);
00164 
00175     static OFCondition getISOFormattedDateFromString(const OFString &dicomDate,
00176                                                      OFString &formattedDate,
00177                                                      const OFBool supportOldFormat = OFTrue);
00178 };
00179 
00180 
00181 #endif // DCVRDA_H
00182 
00183 
00184 /*
00185 ** CVS/RCS Log:
00186 ** $Log: dcvrda.h,v $
00187 ** Revision 1.11  2002/12/06 12:49:14  joergr
00188 ** Enhanced "print()" function by re-working the implementation and replacing
00189 ** the boolean "showFullData" parameter by a more general integer flag.
00190 ** Added doc++ documentation.
00191 ** Made source code formatting more consistent with other modules/files.
00192 **
00193 ** Revision 1.10  2002/04/11 12:25:09  joergr
00194 ** Enhanced DICOM date, time and date/time classes. Added support for new
00195 ** standard date and time functions.
00196 **
00197 ** Revision 1.9  2001/10/10 15:16:40  joergr
00198 ** Added new flag to date/time routines allowing to choose whether the old
00199 ** prior V3.0 format for the corresponding DICOM VRs is supported or not.
00200 **
00201 ** Revision 1.8  2001/10/01 15:01:38  joergr
00202 ** Introduced new general purpose functions to get/set person names, date, time
00203 ** and date/time.
00204 **
00205 ** Revision 1.7  2001/06/01 15:48:49  meichel
00206 ** Updated copyright header
00207 **
00208 ** Revision 1.6  2000/03/08 16:26:22  meichel
00209 ** Updated copyright header.
00210 **
00211 ** Revision 1.5  1999/03/31 09:24:58  meichel
00212 ** Updated copyright header in module dcmdata
00213 **
00214 ** Revision 1.4  1998/11/12 16:47:47  meichel
00215 ** Implemented operator= for all classes derived from DcmObject.
00216 **
00217 ** Revision 1.3  1996/01/05 13:23:04  andreas
00218 ** - changed to support new streaming facilities
00219 ** - more cleanups
00220 ** - merged read / write methods for block and file transfer
00221 **
00222 */


Generated on 8 Dec 2004 for OFFIS DCMTK Version 3.5.3 by Doxygen 1.3.9.1