00001 /* 00002 * 00003 * Copyright (C) 2003-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: ofstd 00019 * 00020 * Author: Marco Eichelberg 00021 * 00022 * Purpose: Portable macros for new-style typecasts 00023 * 00024 * Last Update: $Author: meichel $ 00025 * Update Date: $Date: 2005/12/08 16:05:47 $ 00026 * Source File: $Source: /share/dicom/cvs-depot/dcmtk/ofstd/include/dcmtk/ofstd/ofcast.h,v $ 00027 * CVS/RCS Revision: $Revision: 1.2 $ 00028 * Status: $State: Exp $ 00029 * 00030 * CVS/RCS Log at end of file 00031 * 00032 */ 00033 00034 #ifndef OFCAST_H 00035 #define OFCAST_H 00036 00037 #include "dcmtk/config/osconfig.h" 00038 00039 #ifdef HAVE_CONST_CAST 00040 #define OFconst_cast(x,y) (const_cast< x >(y)) 00041 #else 00042 #define OFconst_cast(x,y) ((x)(y)) 00043 #endif 00044 00045 #ifdef HAVE_DYNAMIC_CAST 00046 #define OFdynamic_cast(x,y) (dynamic_cast< x >(y)) 00047 #else 00048 #define OFdynamic_cast(x,y) ((x)(y)) 00049 #endif 00050 00051 #ifdef HAVE_REINTERPRET_CAST 00052 #define OFreinterpret_cast(x,y) (reinterpret_cast< x >(y)) 00053 #else 00054 #define OFreinterpret_cast(x,y) ((x)(y)) 00055 #endif 00056 00057 #ifdef HAVE_STATIC_CAST 00058 #define OFstatic_cast(x,y) (static_cast< x >(y)) 00059 #else 00060 #define OFstatic_cast(x,y) ((x)(y)) 00061 #endif 00062 00063 #endif 00064 00065 /* 00066 * CVS/RCS Log: 00067 * $Log: ofcast.h,v $ 00068 * Revision 1.2 2005/12/08 16:05:47 meichel 00069 * Changed include path schema for all DCMTK header files 00070 * 00071 * Revision 1.1 2003/07/09 12:26:02 meichel 00072 * Added new header file ofcast.h which defines portable macros 00073 * for new-style typecast operators 00074 * 00075 * 00076 */