ofstd/include/dcmtk/ofstd/offname.h

00001 /*
00002  *
00003  *  Copyright (C) 1997-2010, OFFIS e.V.
00004  *  All rights reserved.  See COPYRIGHT file for details.
00005  *
00006  *  This software and supporting documentation were developed by
00007  *
00008  *    OFFIS e.V.
00009  *    R&D Division Health
00010  *    Escherweg 2
00011  *    D-26121 Oldenburg, Germany
00012  *
00013  *
00014  *  Module: ofstd
00015  *
00016  *  Author: Marco Eichelberg
00017  *
00018  *  Purpose:
00019  *    classes: OFFilenameCreator
00020  *
00021  *  Last Update:      $Author: joergr $
00022  *  Update Date:      $Date: 2010-10-14 13:15:50 $
00023  *  CVS/RCS Revision: $Revision: 1.9 $
00024  *  Status:           $State: Exp $
00025  *
00026  *  CVS/RCS Log at end of file
00027  *
00028  */
00029 
00030 #ifndef OFFNAME_H
00031 #define OFFNAME_H
00032 
00033 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
00034 #include "dcmtk/ofstd/oftypes.h"
00035 #include "dcmtk/ofstd/ofstring.h"
00036 
00039 class OFFilenameCreator
00040 {
00041 public:
00043   OFFilenameCreator();
00044   
00046   OFFilenameCreator(const OFFilenameCreator& copy);
00047 
00049   virtual ~OFFilenameCreator();
00050 
00052   OFFilenameCreator &operator=(const OFFilenameCreator& copy);
00053 
00062   OFBool makeFilename(unsigned int seed, const char *dir, const char *prefix, const char *postfix, OFString &filename);
00063 
00068   static unsigned int hashString(const char *str);
00069 
00077   static int myrand_r(unsigned int *seed);
00078 
00079 private:
00080 
00082   unsigned long creation_time;
00083 
00089   static void addLongToString(unsigned long l, OFString& s);
00090 };
00091 
00092 #endif
00093 
00094 /*
00095  *  $Log: offname.h,v $
00096  *  Revision 1.9  2010-10-14 13:15:50  joergr
00097  *  Updated copyright header. Added reference to COPYRIGHT file.
00098  *
00099  *  Revision 1.8  2005/12/08 16:05:56  meichel
00100  *  Changed include path schema for all DCMTK header files
00101  *
00102  *  Revision 1.7  2003/12/05 10:37:41  joergr
00103  *  Removed leading underscore characters from preprocessor symbols (reserved
00104  *  symbols). Updated copyright date where appropriate.
00105  *
00106  *  Revision 1.6  2003/06/12 13:15:59  joergr
00107  *  Fixed inconsistent API documentation reported by Doxygen.
00108  *
00109  *  Revision 1.5  2001/06/01 15:51:34  meichel
00110  *  Updated copyright header
00111  *
00112  *  Revision 1.4  2000/10/10 12:01:04  meichel
00113  *  Implemented thread safe random number generator, needed on systems
00114  *    where threads but no Posix rand_r function are available.
00115  *
00116  *  Revision 1.3  2000/03/08 16:36:01  meichel
00117  *  Updated copyright header.
00118  *
00119  *  Revision 1.2  1999/03/22 09:00:50  joergr
00120  *  Added/Changed comments.
00121  *
00122  *  Revision 1.1  1999/03/03 13:58:04  meichel
00123  *  Implemented new class for automatically creating filenames.
00124  *
00125  *
00126  */
00127 


Generated on 6 Jan 2011 for OFFIS DCMTK Version 3.6.0 by Doxygen 1.5.1