OR-Tools  9.1
sat_python_wrap.h
Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (http://www.swig.org).
3 * Version 4.0.2
4 *
5 * This file is not intended to be easily readable and contains a number of
6 * coding conventions designed to improve portability and efficiency. Do not make
7 * changes to this file unless you know what you are doing--modify the SWIG
8 * interface file instead.
9 * ----------------------------------------------------------------------------- */
10
11#ifndef SWIG_pywrapsat_WRAP_H_
12#define SWIG_pywrapsat_WRAP_H_
13
14#include <map>
15#include <string>
16
17
18class SwigDirector_SolutionCallback : public operations_research::sat::SolutionCallback, public Swig::Director {
19
20public:
21 SwigDirector_SolutionCallback(PyObject *self);
23 virtual void OnSolutionCallback() const;
24
25/* Internal director utilities */
26public:
27 bool swig_get_inner(const char *swig_protected_method_name) const {
28 std::map<std::string, bool>::const_iterator iv = swig_inner.find(swig_protected_method_name);
29 return (iv != swig_inner.end() ? iv->second : false);
30 }
31 void swig_set_inner(const char *swig_protected_method_name, bool swig_val) const {
32 swig_inner[swig_protected_method_name] = swig_val;
33 }
34private:
35 mutable std::map<std::string, bool> swig_inner;
36
37#if defined(SWIG_PYTHON_DIRECTOR_VTABLE)
38/* VTable implementation */
39 PyObject *swig_get_method(size_t method_index, const char *method_name) const {
40 PyObject *method = vtable[method_index];
41 if (!method) {
43 method = PyObject_GetAttr(swig_get_self(), name);
44 if (!method) {
45 std::string msg = "Method in class SolutionCallback doesn't exist, undefined ";
46 msg += method_name;
48 }
49 vtable[method_index] = method;
50 }
51 return method;
52 }
53private:
54 mutable swig::SwigVar_PyObject vtable[1];
55#endif
56
57};
58
59
60#endif
PyObject * swig_get_self() const
virtual void OnSolutionCallback() const
void swig_set_inner(const char *swig_protected_method_name, bool swig_val) const
bool swig_get_inner(const char *swig_protected_method_name) const
const std::string name
SWIGINTERN PyObject * SWIG_Python_str_FromChar(const char *c)