Skip to content

Commit

Permalink
add function to C interface to access ClpSimplex* member of Clp_Simplex*
Browse files Browse the repository at this point in the history
- closes #283
  • Loading branch information
svigerske committed Jan 3, 2024
1 parent c9062fc commit 83ce17e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Clp_C_Interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1385,6 +1385,12 @@ ClpSolveSetIntProperty(setInfeasibleReturn)
ClpSolveGetIntProperty(substitution)
ClpSolveSetIntProperty(setSubstitution)

/** give pointer to ClpSimplex object (C++ class) */
void* CLP_LINKAGE Clp_getClpSimplex(Clp_Simplex *model)
{
return static_cast<void*>(model->model_);
}

#if defined(__MWERKS__)
#pragma export off
#endif
Expand Down
6 changes: 6 additions & 0 deletions src/Clp_C_Interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -546,8 +546,14 @@ CLPLIB_EXPORT void CLP_LINKAGE ClpSolve_setPresolveActions(Clp_Solve *, int acti

CLPLIB_EXPORT int CLP_LINKAGE ClpSolve_substitution(Clp_Solve *);
CLPLIB_EXPORT void CLP_LINKAGE ClpSolve_setSubstitution(Clp_Solve *, int value);
/*@}*/

/**@name Functions for expert users */
/*@{*/
/** gives pointer to ClpSimplex object (C++ class), return should be cast to ClpSimplex* */
CLPLIB_EXPORT void* CLP_LINKAGE Clp_getClpSimplex(Clp_Simplex *model);
/*@}*/

#ifdef __cplusplus
}
#endif
Expand Down

0 comments on commit 83ce17e

Please sign in to comment.