00001 /* 00002 * Copyright (c) 2007 SCHUNK GmbH & Co. KG 00003 * Copyright (c) 2017 Fraunhofer Institute for Manufacturing Engineering and Automation (IPA) 00004 * 00005 * Licensed under the Apache License, Version 2.0 (the "License"); 00006 * you may not use this file except in compliance with the License. 00007 * You may obtain a copy of the License at 00008 * 00009 * http://www.apache.org/licenses/LICENSE-2.0 00010 00011 * Unless required by applicable law or agreed to in writing, software 00012 * distributed under the License is distributed on an "AS IS" BASIS, 00013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00014 * See the License for the specific language governing permissions and 00015 * limitations under the License. 00016 */ 00017 00018 //====================================================================== 00048 //====================================================================== 00049 00050 #ifndef SDHLIBRARY_SETTINGS_h_ 00051 #define SDHLIBRARY_SETTINGS_h_ 00052 00053 //---------------------------------------------------------------------- 00054 // System Includes - include with <> 00055 //---------------------------------------------------------------------- 00056 00057 00058 //---------------------------------------------------------------------- 00059 // Project Includes - include with "" 00060 //---------------------------------------------------------------------- 00061 00062 00063 //---------------------------------------------------------------------- 00064 // Defines, enums, unions, structs 00065 //---------------------------------------------------------------------- 00066 00075 00076 #define SDH_USE_NAMESPACE 1 00077 00079 #define SDH_USE_BINARY_COMMUNICATION 1 00080 00082 //----------------------------------------------------------------- 00083 00084 00095 #if SDH_USE_NAMESPACE 00096 # define NAMESPACE_SDH_START namespace SDH { 00097 # define NAMESPACE_SDH_END } 00098 # define USING_NAMESPACE_SDH using namespace SDH; 00099 # define NS_SDH SDH:: 00100 #else 00101 # define NAMESPACE_SDH_START 00102 # define NAMESPACE_SDH_END 00103 # define USING_NAMESPACE_SDH 00104 # define NS_SDH 00105 #endif 00106 00107 00108 //--------------------- 00109 #if defined( OSNAME_CYGWIN ) || defined( OSNAME_LINUX ) 00110 //#warning "using settings for Cygwin and Linux" 00111 00112 // settings when run on Windows/cygwin or Linux: 00113 00115 # define SDH_USE_VCC 0 00116 00118 # define SDH__attribute__( ... ) __attribute__(__VA_ARGS__) 00119 00121 # define SDH_ISNAN( V ) isnan( (V) ) 00122 00123 # define VCC_EXPORT 00124 # define VCC_EXPORT_TEMPLATE 00125 00126 //--------------------- 00127 // WIN32 might be defined by ntcan.h 00128 #elif defined( WIN32 ) && ( ! defined( OSNAME_CYGWIN ) ) && ( ! defined( OSNAME_LINUX ) ) 00129 //#warning "using settings for VCC" 00130 00132 # define SDH_USE_VCC 1 00133 00135 # define SDH__attribute__( ... ) 00136 00138 # define SDH_ISNAN( V ) _isnan( (V) ) 00139 00140 typedef long ssize_t; 00141 00153 //disable warnings on extern before template instantiation 00154 # pragma warning (disable : 4231) 00155 # ifdef SDH_IN_SDHLIBRARY_DLL 00156 # define VCC_EXPORT __declspec( dllexport ) 00157 # define VCC_EXPORT_TEMPLATE 00158 # else 00159 # define VCC_EXPORT __declspec( dllimport ) 00160 # define VCC_EXPORT_TEMPLATE extern 00161 # endif 00162 00163 00164 //--------------------- 00165 #else 00166 # error "Unknown compiler, please adjust settings!" 00167 #endif 00168 00169 00171 00172 //---------------------------------------------------------------------- 00173 // Global variables (declarations) 00174 //---------------------------------------------------------------------- 00175 00176 00177 //---------------------------------------------------------------------- 00178 // External functions and classes (declarations) 00179 //---------------------------------------------------------------------- 00180 00181 00182 //---------------------------------------------------------------------- 00183 // Function prototypes (function declarations) 00184 //---------------------------------------------------------------------- 00185 00186 00187 //---------------------------------------------------------------------- 00188 // Class declarations 00189 //---------------------------------------------------------------------- 00190 00191 00192 #endif 00193 00194 00195 //====================================================================== 00196 /* 00197 Here are some settings for the emacs/xemacs editor (and can be safely ignored): 00198 (e.g. to explicitely set C++ mode for *.h header files) 00199 00200 Local Variables: 00201 mode:C++ 00202 mode:ELSE 00203 End: 00204 */ 00205 //======================================================================