Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

igtlWin32Header.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Open IGT Link Library
00004   Module:    $HeadURL: http://svn.na-mic.org/NAMICSandBox/trunk/OpenIGTLink/Source/igtlWin32Header.h $
00005   Language:  C++
00006   Date:      $Date: 2010-01-17 13:38:05 -0500 (Sun, 17 Jan 2010) $
00007   Version:   $Revision: 5577 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010 
00011   This software is distributed WITHOUT ANY WARRANTY; without even
00012   the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00013   PURPOSE.  See the above copyright notices for more information.
00014 
00015 =========================================================================*/
00016 /*=========================================================================
00017 
00018   Program:   Insight Segmentation & Registration Toolkit
00019   Module:    $RCSfile: itkWin32Header.h,v $
00020   Language:  C++
00021   Date:      $Date: 2010-01-17 13:38:05 -0500 (Sun, 17 Jan 2010) $
00022   Version:   $Revision: 5577 $
00023 
00024   Copyright (c) Insight Software Consortium. All rights reserved.
00025   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00026 
00027   Portions of this code are covered under the VTK copyright.
00028   See VTKCopyright.txt or http://www.kitware.com/VTKCopyright.htm for details.
00029 
00030      This software is distributed WITHOUT ANY WARRANTY; without even 
00031      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00032      PURPOSE.  See the above copyright notices for more information.
00033 
00034 =========================================================================*/
00035 #ifndef __igtlWin32Header_h
00036 #define __igtlWin32Header_h
00037 
00038 #include "igtlConfigure.h"
00039 
00040 // add in the Windows variants
00041 
00042 #if defined(__CYGWIN__)
00043 #ifndef WIN32
00044 #define WIN32 1
00045 #endif
00046 #ifndef _WIN32
00047 #define _WIN32 1
00048 #endif
00049 #endif
00050 
00051 #if defined(_WIN32)
00052   // Include the windows header here only if requested by user code.
00053 # if defined(IGTL_INCLUDE_WINDOWS_H)
00054 #  include <windows.h>
00055    // Define types from the windows header file.
00056    typedef DWORD igtlWindowsDWORD;
00057    typedef PVOID igtlWindowsPVOID;
00058    typedef LPVOID igtlWindowsLPVOID;
00059    typedef HANDLE igtlWindowsHANDLE;
00060    typedef LPTHREAD_START_ROUTINE igtlWindowsLPTHREAD_START_ROUTINE;
00061 # else
00062    // Define types from the windows header file.
00063    typedef unsigned long igtlWindowsDWORD;
00064    typedef void* igtlWindowsPVOID;
00065    typedef igtlWindowsPVOID igtlWindowsLPVOID;
00066    typedef igtlWindowsPVOID igtlWindowsHANDLE;
00067    typedef igtlWindowsDWORD (__stdcall *igtlWindowsLPTHREAD_START_ROUTINE)(igtlWindowsLPVOID);
00068 # endif
00069 
00070 #if ( _MSC_VER >= 1300 ) // Visual studio .NET
00071 #pragma warning ( disable : 4311 )
00072 #pragma warning ( disable : 4312 )
00073 #  define igtlGetWindowLong GetWindowLongPtr
00074 #  define igtlSetWindowLong SetWindowLongPtr
00075 #  define igtlLONG LONG_PTR
00076 #  define igtlGWL_WNDPROC GWLP_WNDPROC
00077 #  define igtlGWL_HINSTANCE GWLP_HINSTANCE
00078 #  define igtlGWL_USERDATA GWLP_USERDATA
00079 #else // older or non-Visual studio
00080 #  define igtlGetWindowLong GetWindowLong
00081 #  define igtlSetWindowLong SetWindowLong
00082 #  define igtlLONG LONG
00083 #  define igtlGWL_WNDPROC GWL_WNDPROC
00084 #  define igtlGWL_HINSTANCE GWL_HINSTANCE
00085 #  define igtlGWL_USERDATA GWL_USERDATA
00086 #endif //
00087 #endif
00088 
00089 
00090 #if defined(_MSC_VER)
00091   // Enable MSVC compiler warning messages that are useful but off by default.
00092 # pragma warning ( default : 4263 ) /* no override, call convention differs */
00093   // Disable MSVC compiler warning messages that often occur in valid code.
00094 # if !defined(IGTL_DISPLAY_WIN32_WARNINGS)
00095 #  pragma warning ( disable : 4003 ) /* not enough actual parameters for macro */
00096 #  pragma warning ( disable : 4097 ) /* typedef is synonym for class */
00097 #  pragma warning ( disable : 4127 ) /* conditional expression is constant */
00098 #  pragma warning ( disable : 4244 ) /* possible loss in conversion */
00099 #  pragma warning ( disable : 4251 ) /* missing DLL-interface */
00100 #  pragma warning ( disable : 4305 ) /* truncation from type1 to type2 */
00101 #  pragma warning ( disable : 4309 ) /* truncation of constant value */
00102 #  pragma warning ( disable : 4514 ) /* unreferenced inline function */
00103 #  pragma warning ( disable : 4706 ) /* assignment in conditional expression */
00104 #  pragma warning ( disable : 4710 ) /* function not inlined */
00105 #  pragma warning ( disable : 4786 ) /* identifier truncated in debug info */
00106 #  pragma warning ( disable : 4996 ) /* 'strncpy': This function or variable may be unsafe. */
00107 # endif
00108 
00109 // typename keyword in default template arguments is not accepted by
00110 // MSVC.  This macro should only be used in such places.
00111 # if !defined(CABLE_CONFIGURATION) && (_MSC_VER < 1310)
00112 #  define IGTL_TYPENAME
00113 # else
00114 #  define IGTL_TYPENAME typename
00115 # endif
00116 #else
00117 # define IGTL_TYPENAME typename
00118 #endif
00119 
00120 // MSVC 6.0 in release mode will warn about code it produces with its
00121 // optimizer.  Disable the warnings specifically for this
00122 // configuration.  Real warnings will be revealed by a debug build or
00123 // by other compilers.
00124 #if defined(_MSC_VER) && (_MSC_VER < 1300) && defined(NDEBUG)
00125 # pragma warning ( disable : 4701 ) /* Variable may be used uninitialized.  */
00126 # pragma warning ( disable : 4702 ) /* Unreachable code.  */
00127 #endif
00128 
00129 #if defined(__BORLANDC__)
00130   // Disable Borland compiler warning messages that often occur in valid code.
00131 # if !defined(IGTL_DISPLAY_WIN32_WARNINGS)
00132 #  pragma warn -8004 /* assigned a value that is never used */
00133 #  pragma warn -8008 /* condition is always false */
00134 #  pragma warn -8026 /* funcs w/class-by-value args not expanded inline */
00135 #  pragma warn -8027 /* functions w/ do/for/while not expanded inline */
00136 #  pragma warn -8060 /* possibly incorrect assignment */
00137 #  pragma warn -8066 /* unreachable code */
00138 #  pragma warn -8072 /* suspicious pointer arithmetic */
00139 # endif
00140 #endif
00141 
00142 // IGTL_EXPORT can not be used
00143 #define IGTL_EXPORT
00144 
00145 #if (defined(_WIN32) || defined(WIN32)) && !defined(IGTLSTATIC) 
00146 # ifdef IGTLCommon_EXPORTS
00147 #  define IGTLCommon_EXPORT __declspec(dllexport)
00148 # else
00149 #  define IGTLCommon_EXPORT __declspec(dllimport)
00150 # endif  /* IGTLCommon_EXPORT */
00151 #else
00152 /* unix needs nothing */
00153 #define IGTLCommon_EXPORT 
00154 #endif
00155 
00156 
00157 
00158 
00159 #endif
00160 

Generated at Mon May 2 2011 03:56:13 for OpenIGTLink by doxygen 1.7.3 written by Dimitri van Heesch, © 1997-2000