ofstd/include/dcmtk/ofstd/oftypes.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:  Andreas Barth
00017  *
00018  *  Purpose:
00019  *      Defines some C++ standard types that are not consistently 
00020  *      supported by all C++ Compilers
00021  *
00022  *  Last Update:      $Author: joergr $
00023  *  Update Date:      $Date: 2010-10-14 13:15:51 $
00024  *  CVS/RCS Revision: $Revision: 1.12 $
00025  *  Status:           $State: Exp $
00026  *
00027  *  CVS/RCS Log at end of file
00028  *
00029  */
00030 
00031 #ifndef OFTYPES_H
00032 #define OFTYPES_H
00033 
00034 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
00035 
00036 #ifdef HAVE_SYS_TYPES_H
00037 #include <sys/types.h>                /* Needed for int64_t */
00038 #endif
00039 
00040 #ifdef __CHAR_UNSIGNED__
00041 typedef signed char     Sint8;
00042 #else 
00043 typedef char            Sint8;
00044 #endif
00045 
00046 typedef unsigned char   Uint8;
00047 
00048 #if SIZEOF_LONG == 8
00049 typedef signed int      Sint32;
00050 typedef unsigned int    Uint32;
00051 #else
00052 typedef signed long     Sint32;
00053 typedef unsigned long   Uint32;
00054 #endif
00055 
00056 typedef signed short    Sint16;
00057 typedef unsigned short  Uint16;
00058 
00059 typedef float           Float32;    /* 32 Bit Floating Point Single */
00060 typedef double          Float64;    /* 64 Bit Floating Point Double */
00061 
00062 // Definition of type OFBool
00063 
00064 #ifdef HAVE_CXX_BOOL
00065 
00066 #define OFBool bool
00067 #define OFTrue true
00068 #define OFFalse false
00069 
00070 #else
00071 
00076 typedef int OFBool;
00077 
00078 #ifndef OFTrue 
00079 #define OFTrue (1)
00080 #endif
00081 
00082 #ifndef OFFalse 
00083 #define OFFalse (0)
00084 #endif
00085 
00086 #endif
00087 
00088 #if defined(HAVE_TYPENAME)
00089 #define OFTypename typename
00090 #else
00091 #define OFTypename
00092 #endif
00093 
00094 #endif
00095 
00096 /*
00097  * CVS/RCS Log:
00098  * $Log: oftypes.h,v $
00099  * Revision 1.12  2010-10-14 13:15:51  joergr
00100  * Updated copyright header. Added reference to COPYRIGHT file.
00101  *
00102  * Revision 1.11  2010-10-05 08:49:45  uli
00103  * Removed Sint64 and Uint64 since there is no 64bit int available everywhere.
00104  *
00105  * Revision 1.10  2010-05-25 10:02:36  uli
00106  * Added a missing include before the use of int64_t.
00107  *
00108  * Revision 1.9  2010-05-07 11:12:29  uli
00109  * Add new define OFTypename which only expands to "typename"
00110  * if "HAVE_TYPENAME" is defined.
00111  *
00112  * Revision 1.8  2010-03-09 12:14:20  uli
00113  * Added Sint64 and Uint64 typedefs.
00114  *
00115  * Revision 1.7  2005-12-08 16:06:11  meichel
00116  * Changed include path schema for all DCMTK header files
00117  *
00118  * Revision 1.6  2002/07/10 11:45:26  meichel
00119  * Moved definitions for Uint8, Sint8 ... Float64 from dcmdata to ofstd
00120  *   since these types are not DICOM specific
00121  *
00122  * Revision 1.5  2001/06/01 15:51:36  meichel
00123  * Updated copyright header
00124  *
00125  * Revision 1.4  2000/10/10 12:01:22  meichel
00126  * Created/updated doc++ comments
00127  *
00128  * Revision 1.3  2000/03/08 16:36:03  meichel
00129  * Updated copyright header.
00130  *
00131  * Revision 1.2  1998/11/27 12:42:53  joergr
00132  * Added copyright message to source files and changed CVS header.
00133  *
00134  * Revision 1.1  1997/07/02 11:51:16  andreas
00135  * - Preliminary release of the OFFIS Standard Library.
00136  *   In the future this library shall contain a subset of the
00137  *   ANSI C++ Library (Version 3) that works on a lot of different
00138  *   compilers. Additionally this library shall include classes and
00139  *   functions that are often used. All classes and functions begin
00140  *   with OF... This library is independent of the DICOM development and
00141  *   shall contain no DICOM specific stuff.
00142  *
00143  */
00144 


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