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