dcvrda.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, Joerg Riesmeier
00021  *
00022  *  Purpose: Interface of class DcmDate
00023  *
00024  *  Last Update:      $Author: meichel $
00025  *  Update Date:      $Date: 2005/12/08 16:28:55 $
00026  *  Source File:      $Source: /share/dicom/cvs-depot/dcmtk/dcmdata/include/dcmtk/dcmdata/dcvrda.h,v $
00027  *  CVS/RCS Revision: $Revision: 1.13 $
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 "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
00038 
00039 #include "dcmtk/dcmdata/dctypes.h"
00040 #include "dcmtk/dcmdata/dcbytstr.h"
00041 #include "dcmtk/ofstd/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 DcmObject *clone() const
00079     {
00080       return new DcmDate(*this);
00081     }
00082 
00086     virtual DcmEVR ident() const;
00087 
00094     virtual OFCondition getOFString(OFString &stringVal,
00095                                     const unsigned long pos,
00096                                     OFBool normalize = OFTrue);
00097 
00104     OFCondition setCurrentDate();
00105 
00110     OFCondition setOFDate(const OFDate &dateValue);
00111 
00121     OFCondition getOFDate(OFDate &dateValue,
00122                           const unsigned long pos = 0,
00123                           const OFBool supportOldFormat = OFTrue);
00124 
00135     OFCondition getISOFormattedDate(OFString &formattedDate,
00136                                     const unsigned long pos = 0,
00137                                     const OFBool supportOldFormat = OFTrue);
00138 
00139     /* --- static helper functions --- */
00140 
00148     static OFCondition getCurrentDate(OFString &dicomDate);
00149 
00157     static OFCondition getDicomDateFromOFDate(const OFDate &dateValue,
00158                                               OFString &dicomDate);
00159 
00169     static OFCondition getOFDateFromString(const OFString &dicomDate,
00170                                            OFDate &dateValue,
00171                                            const OFBool supportOldFormat = OFTrue);
00172 
00183     static OFCondition getISOFormattedDateFromString(const OFString &dicomDate,
00184                                                      OFString &formattedDate,
00185                                                      const OFBool supportOldFormat = OFTrue);
00186 };
00187 
00188 
00189 #endif // DCVRDA_H
00190 
00191 
00192 /*
00193 ** CVS/RCS Log:
00194 ** $Log: dcvrda.h,v $
00195 ** Revision 1.13  2005/12/08 16:28:55  meichel
00196 ** Changed include path schema for all DCMTK header files
00197 **
00198 ** Revision 1.12  2004/07/01 12:28:25  meichel
00199 ** Introduced virtual clone method for DcmObject and derived classes.
00200 **
00201 ** Revision 1.11  2002/12/06 12:49:14  joergr
00202 ** Enhanced "print()" function by re-working the implementation and replacing
00203 ** the boolean "showFullData" parameter by a more general integer flag.
00204 ** Added doc++ documentation.
00205 ** Made source code formatting more consistent with other modules/files.
00206 **
00207 ** Revision 1.10  2002/04/11 12:25:09  joergr
00208 ** Enhanced DICOM date, time and date/time classes. Added support for new
00209 ** standard date and time functions.
00210 **
00211 ** Revision 1.9  2001/10/10 15:16:40  joergr
00212 ** Added new flag to date/time routines allowing to choose whether the old
00213 ** prior V3.0 format for the corresponding DICOM VRs is supported or not.
00214 **
00215 ** Revision 1.8  2001/10/01 15:01:38  joergr
00216 ** Introduced new general purpose functions to get/set person names, date, time
00217 ** and date/time.
00218 **
00219 ** Revision 1.7  2001/06/01 15:48:49  meichel
00220 ** Updated copyright header
00221 **
00222 ** Revision 1.6  2000/03/08 16:26:22  meichel
00223 ** Updated copyright header.
00224 **
00225 ** Revision 1.5  1999/03/31 09:24:58  meichel
00226 ** Updated copyright header in module dcmdata
00227 **
00228 ** Revision 1.4  1998/11/12 16:47:47  meichel
00229 ** Implemented operator= for all classes derived from DcmObject.
00230 **
00231 ** Revision 1.3  1996/01/05 13:23:04  andreas
00232 ** - changed to support new streaming facilities
00233 ** - more cleanups
00234 ** - merged read / write methods for block and file transfer
00235 **
00236 */


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