CoinUtils trunk
Coin_C_defines.h
Go to the documentation of this file.
00001 /* $Id$ */
00002 /*
00003   Copyright (C) 2002, 2003 International Business Machines Corporation
00004   and others.  All Rights Reserved.
00005 
00006   This code is licensed under the terms of the Eclipse Public License (EPL).
00007 */
00008 #ifndef CoinCDefine_H
00009 #define CoinCDefine_H
00010 
00015 /* Plus infinity */
00016 #ifndef COIN_DBL_MAX
00017 #define COIN_DBL_MAX DBL_MAX
00018 #endif
00019 #if defined (CLP_EXTERN_C)
00020 #define COIN_EXTERN_C
00021 #define COIN_NO_SBB
00022 #define COIN_NO_CBC
00023 #endif
00024 #if defined (SBB_EXTERN_C)
00025 #define COIN_EXTERN_C
00026 #define COIN_NO_CLP
00027 #endif
00028 #if defined (CBC_EXTERN_C)
00029 #define COIN_EXTERN_C
00030 #define COIN_NO_CLP
00031 #endif
00032 /* We need to allow for Microsoft */
00033 #ifndef COINLIBAPI
00034 
00035 #if defined(CBCCINTERFACEDLL_EXPORTS) || defined(CLPMSDLL)
00036 #if defined (COIN_EXTERN_C)
00037 #   define COINLIBAPI __declspec(dllexport)
00038 #else
00039 #   define COINLIBAPI __declspec(dllexport)
00040 #endif
00041 #   define COINLINKAGE  __stdcall
00042 #   define COINLINKAGE_CB  __cdecl
00043 #else
00044 #if defined (COIN_EXTERN_C)
00045 #   define COINLIBAPI extern "C"
00046 #else
00047 #   define COINLIBAPI 
00048 #endif
00049 #   define COINLINKAGE
00050 #   define COINLINKAGE_CB 
00051 #endif
00052 
00053 #endif
00054 
00055 #if defined (CLP_EXTERN_C)
00056 /* Real typedef for structure */
00057 class CMessageHandler;
00058 typedef struct {
00059   ClpSimplex * model_;
00060   CMessageHandler * handler_;
00061 } Clp_Simplex;
00062 #else
00063 typedef void Clp_Simplex;
00064 #endif
00065 
00066 #ifndef COIN_NO_CLP
00067 
00069 typedef  void (COINLINKAGE_CB *clp_callback) (Clp_Simplex * model,int  msgno, int ndouble,
00070                             const double * dvec, int nint, const int * ivec,
00071                             int nchar, char ** cvec);
00072 #endif
00073 
00074 #if defined (SBB_EXTERN_C)
00075 /* Real typedef for structure */
00076 class Sbb_MessageHandler;
00077 typedef struct {
00078   OsiClpSolverInterface * solver_;
00079   SbbModel              * model_;
00080   Sbb_MessageHandler    * handler_;
00081   char                  * information_;
00082 } Sbb_Model;
00083 #else
00084 typedef void Sbb_Model;
00085 #endif
00086 #if defined (CBC_EXTERN_C)
00087 /* Real typedef for structure */
00088 class Cbc_MessageHandler;
00089 typedef struct {
00090   OsiClpSolverInterface * solver_;
00091   CbcModel              * model_;
00092   Cbc_MessageHandler    * handler_;
00093   char                  * information_;
00094 } Cbc_Model;
00095 #else
00096 typedef void Cbc_Model;
00097 #endif
00098 #ifndef COIN_NO_SBB
00099 
00101 typedef  void (COINLINKAGE_CB *sbb_callback) (Sbb_Model * model,int  msgno, int ndouble,
00102                             const double * dvec, int nint, const int * ivec,
00103                             int nchar, char ** cvec);
00104 typedef  void (COINLINKAGE_CB *cbc_callback) (Cbc_Model * model,int  msgno, int ndouble,
00105                             const double * dvec, int nint, const int * ivec,
00106                             int nchar, char ** cvec);
00107 #endif
00108 #if COIN_BIG_INDEX==0
00109 typedef int CoinBigIndex;
00110 #elif COIN_BIG_INDEX==1
00111 typedef long CoinBigIndex;
00112 #else
00113 typedef long long CoinBigIndex;
00114 #endif
00115 /* just in case used somewhere */
00116 #undef COIN_NO_CLP
00117 #undef COIN_NO_SBB
00118 #undef COIN_NO_CBC
00119 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines