00001
00002
00003 #ifndef CoinCDefine_H
00004 #define CoinCDefine_H
00005
00010
00011 #ifndef COIN_DBL_MAX
00012 #define COIN_DBL_MAX DBL_MAX
00013 #endif
00014 #if defined (CLP_EXTERN_C)
00015 #define COIN_EXTERN_C
00016 #define COIN_NO_SBB
00017 #define COIN_NO_CBC
00018 #endif
00019 #if defined (SBB_EXTERN_C)
00020 #define COIN_EXTERN_C
00021 #define COIN_NO_CLP
00022 #endif
00023 #if defined (CBC_EXTERN_C)
00024 #define COIN_EXTERN_C
00025 #define COIN_NO_CLP
00026 #endif
00027
00028 #ifndef COINLIBAPI
00029 #if defined (CLPMSDLL)
00030
00031 #define COINMSDLL
00032 #endif
00033 #if defined (COINMSDLL)
00034 #if defined (COIN_EXTERN_C)
00035 # define COINLIBAPI __declspec(dllexport) extern "C"
00036 #else
00037 # define COINLIBAPI __declspec(dllexport)
00038 #endif
00039 # define COINLINKAGE __stdcall
00040 # define COINLINKAGE_CB __cdecl
00041 #else
00042 #if defined (COIN_EXTERN_C)
00043 # define COINLIBAPI extern "C"
00044 #else
00045 # define COINLIBAPI
00046 #endif
00047 # define COINLINKAGE
00048 # define COINLINKAGE_CB
00049 #endif
00050
00051 #endif
00052
00053 #if defined (CLP_EXTERN_C)
00054
00055 class CMessageHandler;
00056 typedef struct {
00057 ClpSimplex * model_;
00058 CMessageHandler * handler_;
00059 } Clp_Simplex;
00060 #else
00061 typedef void Clp_Simplex;
00062 #endif
00063
00064 #ifndef COIN_NO_CLP
00065
00067 typedef void (COINLINKAGE_CB *clp_callback) (Clp_Simplex * model,int msgno, int ndouble,
00068 const double * dvec, int nint, const int * ivec,
00069 int nchar, char ** cvec);
00070 #endif
00071
00072 #if defined (SBB_EXTERN_C)
00073
00074 class Sbb_MessageHandler;
00075 typedef struct {
00076 OsiClpSolverInterface * solver_;
00077 SbbModel * model_;
00078 Sbb_MessageHandler * handler_;
00079 char * information_;
00080 } Sbb_Model;
00081 #else
00082 typedef void Sbb_Model;
00083 #endif
00084 #if defined (CBC_EXTERN_C)
00085
00086 class Cbc_MessageHandler;
00087 typedef struct {
00088 OsiClpSolverInterface * solver_;
00089 CbcModel * model_;
00090 Cbc_MessageHandler * handler_;
00091 char * information_;
00092 } Cbc_Model;
00093 #else
00094 typedef void Cbc_Model;
00095 #endif
00096 #ifndef COIN_NO_SBB
00097
00099 typedef void (COINLINKAGE_CB *sbb_callback) (Sbb_Model * model,int msgno, int ndouble,
00100 const double * dvec, int nint, const int * ivec,
00101 int nchar, char ** cvec);
00102 typedef void (COINLINKAGE_CB *cbc_callback) (Cbc_Model * model,int msgno, int ndouble,
00103 const double * dvec, int nint, const int * ivec,
00104 int nchar, char ** cvec);
00105 #endif
00106 #if COIN_BIG_INDEX==0
00107 typedef int CoinBigIndex;
00108 #elif COIN_BIG_INDEX==1
00109 typedef long CoinBigIndex;
00110 #else
00111 typedef long long CoinBigIndex;
00112 #endif
00113
00114 #undef COIN_NO_CLP
00115 #undef COIN_NO_SBB
00116 #undef COIN_NO_CBC
00117 #endif