1 2cimport CyOsiSolverInterface 3 4 5cdef extern from *: 6 CppOsiClpSolverInterface* dynamic_cast_osi_2_clp "dynamic_cast<OsiClpSolverInterface*>" (CppOsiSolverInterface*) 7 CppIClpSimplex* static_cast_clp_2_iclp "static_cast<IClpSimplex*>" (CppClpSimplex*) 8 9cdef class CyOsiSolverInterface: 10 'CyOsiSolverInterface documentation' 11 def __cinit__(self): 12 pass 13 14 cdef setCppSelf(self, CppOsiSolverInterface* s): 15 del self.CppSelf 16 self.CppSelf = s 17 18 property clpModel: 19 def __get__(self): 20 cdef CyClpSimplex s = CyClpSimplex() 21 cdef CppOsiClpSolverInterface* si = dynamic_cast_osi_2_clp(self.CppSelf) 22 cdef CppIClpSimplex* sp = static_cast_clp_2_iclp(si.getModelPtr()) 23 s.setCppSelf(sp) 24 return s 25