16 #define SWIG_DIRECTORS
21 template<
typename T>
class SwigValueWrapper {
22 struct SwigMovePointer {
24 SwigMovePointer(T *p) : ptr(p) { }
25 ~SwigMovePointer() {
delete ptr; }
26 SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0;
delete oldptr; ptr = rhs.ptr; rhs.ptr = 0;
return *
this; }
28 SwigValueWrapper& operator=(
const SwigValueWrapper<T>& rhs);
29 SwigValueWrapper(
const SwigValueWrapper<T>& rhs);
31 SwigValueWrapper() : pointer(0) { }
32 SwigValueWrapper& operator=(
const T& t) { SwigMovePointer tmp(
new T(t)); pointer = tmp;
return *
this; }
33 operator T&()
const {
return *pointer.ptr; }
34 T *operator&() {
return pointer.ptr; }
37 template <
typename T> T SwigValueInit() {
48 #ifndef SWIGTEMPLATEDISAMBIGUATOR
49 # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
50 # define SWIGTEMPLATEDISAMBIGUATOR template
51 # elif defined(__HP_aCC)
54 # define SWIGTEMPLATEDISAMBIGUATOR template
56 # define SWIGTEMPLATEDISAMBIGUATOR
62 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
63 # define SWIGINLINE inline
71 # if defined(__GNUC__)
72 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
73 # define SWIGUNUSED __attribute__ ((__unused__))
78 # define SWIGUNUSED __attribute__ ((__unused__))
84 #ifndef SWIG_MSC_UNSUPPRESS_4505
85 # if defined(_MSC_VER)
86 # pragma warning(disable : 4505)
90 #ifndef SWIGUNUSEDPARM
92 # define SWIGUNUSEDPARM(p)
94 # define SWIGUNUSEDPARM(p) p SWIGUNUSED
100 # define SWIGINTERN static SWIGUNUSED
104 #ifndef SWIGINTERNINLINE
105 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
109 #if defined(__GNUC__)
110 # if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
111 # ifndef GCC_HASCLASSVISIBILITY
112 # define GCC_HASCLASSVISIBILITY
118 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
119 # if defined(STATIC_LINKED)
122 # define SWIGEXPORT __declspec(dllexport)
125 # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
126 # define SWIGEXPORT __attribute__ ((visibility("default")))
135 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
136 # define SWIGSTDCALL __stdcall
143 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
144 # define _CRT_SECURE_NO_DEPRECATE
148 #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
149 # define _SCL_SECURE_NO_DEPRECATE
153 #if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
154 # define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
162 #ifdef __INTEL_COMPILER
163 # pragma warning disable 592
300 #define SWIG_contract_assert(nullreturn, expr, msg) if (!(expr)) {SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentOutOfRangeException, msg, ""); return nullreturn; } else
313 #ifdef SWIG_DIRECTOR_STATIC
324 #if defined(DEBUG_DIRECTOR_OWNED)
336 class DirectorException :
public std::exception {
350 const char *
what()
const throw() {
356 class DirectorPureVirtualException :
public DirectorException {
361 static void raise(
const char *msg) {
371 #define SWIGWORDSIZE64
375 #if (__WORDSIZE == 32) || (LONG_MAX == INT_MAX)
376 # error "SWIG wrapped code invalid in 32 bit architecture, regenerate code using -DSWIGWORDSIZE32"
396 #include "ortools/sat/swig_helper.h"
407 swig_init_callbacks();
416 if (!swig_callbackOnSolutionCallback) {
420 swig_callbackOnSolutionCallback();
425 swig_callbackOnSolutionCallback = callbackOnSolutionCallback;
428 void SwigDirector_SolutionCallback::swig_init_callbacks() {
429 swig_callbackOnSolutionCallback = 0;
438 operations_research::sat::SolutionCallback *arg1 = (operations_research::sat::SolutionCallback *) 0 ;
440 arg1 = (operations_research::sat::SolutionCallback *)jarg1;
446 operations_research::sat::SolutionCallback *arg1 = (operations_research::sat::SolutionCallback *) 0 ;
448 arg1 = (operations_research::sat::SolutionCallback *)jarg1;
449 ((operations_research::sat::SolutionCallback
const *)arg1)->OnSolutionCallback();
455 operations_research::sat::SolutionCallback *arg1 = (operations_research::sat::SolutionCallback *) 0 ;
458 arg1 = (operations_research::sat::SolutionCallback *)jarg1;
459 result = (
int64)((operations_research::sat::SolutionCallback
const *)arg1)->NumBooleans();
467 operations_research::sat::SolutionCallback *arg1 = (operations_research::sat::SolutionCallback *) 0 ;
470 arg1 = (operations_research::sat::SolutionCallback *)jarg1;
471 result = (
int64)((operations_research::sat::SolutionCallback
const *)arg1)->NumBranches();
479 operations_research::sat::SolutionCallback *arg1 = (operations_research::sat::SolutionCallback *) 0 ;
482 arg1 = (operations_research::sat::SolutionCallback *)jarg1;
483 result = (
int64)((operations_research::sat::SolutionCallback
const *)arg1)->NumConflicts();
491 operations_research::sat::SolutionCallback *arg1 = (operations_research::sat::SolutionCallback *) 0 ;
494 arg1 = (operations_research::sat::SolutionCallback *)jarg1;
495 result = (
int64)((operations_research::sat::SolutionCallback
const *)arg1)->NumBinaryPropagations();
503 operations_research::sat::SolutionCallback *arg1 = (operations_research::sat::SolutionCallback *) 0 ;
506 arg1 = (operations_research::sat::SolutionCallback *)jarg1;
507 result = (
int64)((operations_research::sat::SolutionCallback
const *)arg1)->NumIntegerPropagations();
515 operations_research::sat::SolutionCallback *arg1 = (operations_research::sat::SolutionCallback *) 0 ;
518 arg1 = (operations_research::sat::SolutionCallback *)jarg1;
519 result = (double)((operations_research::sat::SolutionCallback
const *)arg1)->WallTime();
527 operations_research::sat::SolutionCallback *arg1 = (operations_research::sat::SolutionCallback *) 0 ;
530 arg1 = (operations_research::sat::SolutionCallback *)jarg1;
531 result = (double)((operations_research::sat::SolutionCallback
const *)arg1)->UserTime();
539 operations_research::sat::SolutionCallback *arg1 = (operations_research::sat::SolutionCallback *) 0 ;
542 arg1 = (operations_research::sat::SolutionCallback *)jarg1;
543 result = (double)((operations_research::sat::SolutionCallback
const *)arg1)->ObjectiveValue();
551 operations_research::sat::SolutionCallback *arg1 = (operations_research::sat::SolutionCallback *) 0 ;
554 arg1 = (operations_research::sat::SolutionCallback *)jarg1;
555 result = (double)((operations_research::sat::SolutionCallback
const *)arg1)->BestObjectiveBound();
563 operations_research::sat::SolutionCallback *arg1 = (operations_research::sat::SolutionCallback *) 0 ;
567 arg1 = (operations_research::sat::SolutionCallback *)jarg1;
569 result = (
int64)(arg1)->SolutionIntegerValue(arg2);
576 unsigned int jresult ;
577 operations_research::sat::SolutionCallback *arg1 = (operations_research::sat::SolutionCallback *) 0 ;
581 arg1 = (operations_research::sat::SolutionCallback *)jarg1;
583 result = (bool)(arg1)->SolutionBooleanValue(arg2);
590 operations_research::sat::SolutionCallback *arg1 = (operations_research::sat::SolutionCallback *) 0 ;
592 arg1 = (operations_research::sat::SolutionCallback *)jarg1;
593 (arg1)->StopSearch();
599 operations_research::sat::SolutionCallback *arg1 = (operations_research::sat::SolutionCallback *) 0 ;
600 operations_research::sat::CpSolverResponse result;
602 arg1 = (operations_research::sat::SolutionCallback *)jarg1;
603 result = ((operations_research::sat::SolutionCallback
const *)arg1)->Response();
605 const long size = (&result)->ByteSizeLong();
606 jresult =
new uint8[size + 4];
607 (&result)->SerializeWithCachedSizesToArray(jresult + 4);
608 jresult[0] = size & 0xFF;
609 jresult[1] = (size >> 8) & 0xFF;
610 jresult[2] = (size >> 16) & 0xFF;
611 jresult[3] = (size >> 24) & 0xFF;
619 operations_research::sat::SolutionCallback *result = 0 ;
622 jresult = (
void *)result;
628 operations_research::sat::SolutionCallback *obj = (operations_research::sat::SolutionCallback *)objarg;
636 operations_research::sat::CpModelProto *arg1 = 0 ;
637 operations_research::sat::CpSolverResponse result;
640 arg1 =
new operations_research::sat::CpModelProto;
641 bool parsed_ok = arg1->ParseFromArray(jarg1, model_proto_size);
645 "Unable to parse operations_research::sat::CpModelProto protocol message.");
650 const long size = (&result)->ByteSizeLong();
651 jresult =
new uint8[size + 4];
652 (&result)->SerializeWithCachedSizesToArray(jresult + 4);
653 jresult[0] = size & 0xFF;
654 jresult[1] = (size >> 8) & 0xFF;
655 jresult[2] = (size >> 16) & 0xFF;
656 jresult[3] = (size >> 24) & 0xFF;
667 operations_research::sat::CpModelProto *arg1 = 0 ;
668 std::string *arg2 = 0 ;
669 operations_research::sat::CpSolverResponse result;
672 arg1 =
new operations_research::sat::CpModelProto;
673 bool parsed_ok = arg1->ParseFromArray(jarg1, model_proto_size);
677 "Unable to parse operations_research::sat::CpModelProto protocol message.");
684 std::string arg2_str(jarg2);
686 result = operations_research::sat::SatHelper::SolveWithStringParameters((operations_research::sat::CpModelProto
const &)*arg1,(std::string
const &)*arg2);
688 const long size = (&result)->ByteSizeLong();
689 jresult =
new uint8[size + 4];
690 (&result)->SerializeWithCachedSizesToArray(jresult + 4);
691 jresult[0] = size & 0xFF;
692 jresult[1] = (size >> 8) & 0xFF;
693 jresult[2] = (size >> 16) & 0xFF;
694 jresult[3] = (size >> 24) & 0xFF;
705 operations_research::sat::CpModelProto *arg1 = 0 ;
706 std::string *arg2 = 0 ;
707 operations_research::sat::SolutionCallback *arg3 = 0 ;
708 operations_research::sat::CpSolverResponse result;
711 arg1 =
new operations_research::sat::CpModelProto;
712 bool parsed_ok = arg1->ParseFromArray(jarg1, model_proto_size);
716 "Unable to parse operations_research::sat::CpModelProto protocol message.");
723 std::string arg2_str(jarg2);
725 arg3 = (operations_research::sat::SolutionCallback *)jarg3;
730 result = operations_research::sat::SatHelper::SolveWithStringParametersAndSolutionCallback((operations_research::sat::CpModelProto
const &)*arg1,(std::string
const &)*arg2,(operations_research::sat::SolutionCallback
const &)*arg3);
732 const long size = (&result)->ByteSizeLong();
733 jresult =
new uint8[size + 4];
734 (&result)->SerializeWithCachedSizesToArray(jresult + 4);
735 jresult[0] = size & 0xFF;
736 jresult[1] = (size >> 8) & 0xFF;
737 jresult[2] = (size >> 16) & 0xFF;
738 jresult[3] = (size >> 24) & 0xFF;
749 operations_research::sat::CpModelProto *arg1 = 0 ;
753 arg1 =
new operations_research::sat::CpModelProto;
754 bool parsed_ok = arg1->ParseFromArray(jarg1, model_proto_size);
758 "Unable to parse operations_research::sat::CpModelProto protocol message.");
761 result = operations_research::sat::SatHelper::ModelStats((operations_research::sat::CpModelProto
const &)*arg1);
772 operations_research::sat::CpSolverResponse *arg1 = 0 ;
776 arg1 =
new operations_research::sat::CpSolverResponse;
777 bool parsed_ok = arg1->ParseFromArray(jarg1, response_size);
781 "Unable to parse operations_research::sat::CpSolverResponse protocol message.");
784 result = operations_research::sat::SatHelper::SolverResponseStats((operations_research::sat::CpSolverResponse
const &)*arg1);
795 operations_research::sat::CpModelProto *arg1 = 0 ;
799 arg1 =
new operations_research::sat::CpModelProto;
800 bool parsed_ok = arg1->ParseFromArray(jarg1, model_proto_size);
804 "Unable to parse operations_research::sat::CpModelProto protocol message.");
807 result = operations_research::sat::SatHelper::ValidateModel((operations_research::sat::CpModelProto
const &)*arg1);
818 operations_research::sat::IntegerVariableProto *arg1 = 0 ;
822 arg1 =
new operations_research::sat::IntegerVariableProto;
823 bool parsed_ok = arg1->ParseFromArray(jarg1, variable_proto_size);
827 "Unable to parse operations_research::sat::IntegerVariableProto protocol message.");
830 result = operations_research::sat::SatHelper::VariableDomain((operations_research::sat::IntegerVariableProto
const &)*arg1);
840 unsigned int jresult ;
841 operations_research::sat::CpModelProto *arg1 = 0 ;
842 std::string *arg2 = 0 ;
846 arg1 =
new operations_research::sat::CpModelProto;
847 bool parsed_ok = arg1->ParseFromArray(jarg1, model_proto_size);
851 "Unable to parse operations_research::sat::CpModelProto protocol message.");
858 std::string arg2_str(jarg2);
860 result = (bool)operations_research::sat::SatHelper::WriteModelToFile((operations_research::sat::CpModelProto
const &)*arg1,(std::string
const &)*arg2);
871 operations_research::sat::SatHelper *result = 0 ;
873 result = (operations_research::sat::SatHelper *)
new operations_research::sat::SatHelper();
874 jresult = (
void *)result;
880 operations_research::sat::SatHelper *arg1 = (operations_research::sat::SatHelper *) 0 ;
882 arg1 = (operations_research::sat::SatHelper *)jarg1;
DirectorException(const std::string &msg)
const char * what() const
DirectorException(const char *msg)
virtual ~DirectorException()
static void raise(const char *msg)
DirectorPureVirtualException(const char *msg)
virtual ~SwigDirector_SolutionCallback()
void swig_connect_director(SWIG_Callback0_t callbackOnSolutionCallback)
virtual void OnSolutionCallback() const
SwigDirector_SolutionCallback()
void(SWIGSTDCALL * SWIG_Callback0_t)()
We call domain any subset of Int64 = [kint64min, kint64max].
SWIG_CSharpExceptionArgumentCodes
SWIG_CSharpExceptionCodes
CpSolverResponse Solve(const CpModelProto &model_proto)
Solves the given CpModelProto and returns an instance of CpSolverResponse.
The vehicle routing library lets one model and solve generic vehicle routing problems ranging from th...
SWIGEXPORT void SWIGSTDCALL CSharp_GooglefOrToolsfSat_delete_SatHelper___(void *jarg1)
SWIGEXPORT void SWIGSTDCALL CSharp_GooglefOrToolsfSat_SolutionCallback_OnSolutionCallback___(void *jarg1)
static SWIG_CSharpExceptionArgument_t SWIG_csharp_exceptions_argument[]
void(SWIGSTDCALL * SWIG_CSharpExceptionCallback_t)(const char *)
SWIGEXPORT long long SWIGSTDCALL CSharp_GooglefOrToolsfSat_SolutionCallback_NumBranches___(void *jarg1)
static void SWIGUNUSED SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpExceptionArgumentCodes code, const char *msg, const char *param_name)
SWIGEXPORT void *SWIGSTDCALL CSharp_GooglefOrToolsfSat_new_SatHelper___()
SWIGEXPORT double SWIGSTDCALL CSharp_GooglefOrToolsfSat_SolutionCallback_WallTime___(void *jarg1)
SWIGEXPORT void *SWIGSTDCALL CSharp_GooglefOrToolsfSat_new_SolutionCallback___()
SWIGEXPORT long long SWIGSTDCALL CSharp_GooglefOrToolsfSat_SolutionCallback_NumBinaryPropagations___(void *jarg1)
SWIGEXPORT long long SWIGSTDCALL CSharp_GooglefOrToolsfSat_SolutionCallback_NumBooleans___(void *jarg1)
void(SWIGSTDCALL * SWIG_CSharpExceptionArgumentCallback_t)(const char *, const char *)
static SWIG_CSharpStringHelperCallback SWIG_csharp_string_callback
static SWIG_CSharpException_t SWIG_csharp_exceptions[]
SWIGEXPORT long long SWIGSTDCALL CSharp_GooglefOrToolsfSat_SolutionCallback_NumIntegerPropagations___(void *jarg1)
SWIGEXPORT void SWIGSTDCALL CSharp_GooglefOrToolsfSat_SolutionCallback_StopSearch___(void *jarg1)
SWIGEXPORT char *SWIGSTDCALL CSharp_GooglefOrToolsfSat_SatHelper_SolverResponseStats___(int response_size, uint8 *jarg1)
SWIGEXPORT void SWIGSTDCALL SWIGRegisterExceptionArgumentCallbacks_operations_research_sat(SWIG_CSharpExceptionArgumentCallback_t argumentCallback, SWIG_CSharpExceptionArgumentCallback_t argumentNullCallback, SWIG_CSharpExceptionArgumentCallback_t argumentOutOfRangeCallback)
SWIGEXPORT double SWIGSTDCALL CSharp_GooglefOrToolsfSat_SolutionCallback_UserTime___(void *jarg1)
SWIG_CSharpExceptionArgumentCodes
@ SWIG_CSharpArgumentException
@ SWIG_CSharpArgumentOutOfRangeException
@ SWIG_CSharpArgumentNullException
SWIGEXPORT uint8 *SWIGSTDCALL CSharp_GooglefOrToolsfSat_SatHelper_SolveWithStringParametersAndSolutionCallback___(int model_proto_size, uint8 *jarg1, char *jarg2, void *jarg3)
SWIGEXPORT uint8 *SWIGSTDCALL CSharp_GooglefOrToolsfSat_SolutionCallback_Response___(void *jarg1)
char *(SWIGSTDCALL * SWIG_CSharpStringHelperCallback)(const char *)
SWIGEXPORT void *SWIGSTDCALL CSharp_GooglefOrToolsfSat_SatHelper_VariableDomain___(int variable_proto_size, uint8 *jarg1)
SWIGEXPORT void SWIGSTDCALL CSharp_GooglefOrToolsfSat_delete_SolutionCallback___(void *jarg1)
SWIGEXPORT uint8 *SWIGSTDCALL CSharp_GooglefOrToolsfSat_SatHelper_SolveWithStringParameters___(int model_proto_size, uint8 *jarg1, char *jarg2)
SWIGEXPORT long long SWIGSTDCALL CSharp_GooglefOrToolsfSat_SolutionCallback_NumConflicts___(void *jarg1)
SWIGEXPORT unsigned int SWIGSTDCALL CSharp_GooglefOrToolsfSat_SolutionCallback_SolutionBooleanValue___(void *jarg1, int jarg2)
static void SWIGUNUSED SWIG_CSharpSetPendingException(SWIG_CSharpExceptionCodes code, const char *msg)
SWIGEXPORT void SWIGSTDCALL CSharp_GooglefOrToolsfSat_SolutionCallback_director_connect___(void *objarg, SwigDirector_SolutionCallback::SWIG_Callback0_t callback0)
SWIGEXPORT char *SWIGSTDCALL CSharp_GooglefOrToolsfSat_SatHelper_ModelStats___(int model_proto_size, uint8 *jarg1)
SWIGEXPORT unsigned int SWIGSTDCALL CSharp_GooglefOrToolsfSat_SatHelper_WriteModelToFile___(int model_proto_size, uint8 *jarg1, char *jarg2)
SWIGEXPORT void SWIGSTDCALL SWIGRegisterExceptionCallbacks_operations_research_sat(SWIG_CSharpExceptionCallback_t applicationCallback, SWIG_CSharpExceptionCallback_t arithmeticCallback, SWIG_CSharpExceptionCallback_t divideByZeroCallback, SWIG_CSharpExceptionCallback_t indexOutOfRangeCallback, SWIG_CSharpExceptionCallback_t invalidCastCallback, SWIG_CSharpExceptionCallback_t invalidOperationCallback, SWIG_CSharpExceptionCallback_t ioCallback, SWIG_CSharpExceptionCallback_t nullReferenceCallback, SWIG_CSharpExceptionCallback_t outOfMemoryCallback, SWIG_CSharpExceptionCallback_t overflowCallback, SWIG_CSharpExceptionCallback_t systemCallback)
SWIGEXPORT double SWIGSTDCALL CSharp_GooglefOrToolsfSat_SolutionCallback_ObjectiveValue___(void *jarg1)
SWIGEXPORT double SWIGSTDCALL CSharp_GooglefOrToolsfSat_SolutionCallback_BestObjectiveBound___(void *jarg1)
SWIGEXPORT uint8 *SWIGSTDCALL CSharp_GooglefOrToolsfSat_SatHelper_Solve___(int model_proto_size, uint8 *jarg1)
SWIG_CSharpExceptionCodes
@ SWIG_CSharpDivideByZeroException
@ SWIG_CSharpOutOfMemoryException
@ SWIG_CSharpArithmeticException
@ SWIG_CSharpSystemException
@ SWIG_CSharpApplicationException
@ SWIG_CSharpNullReferenceException
@ SWIG_CSharpInvalidCastException
@ SWIG_CSharpInvalidOperationException
@ SWIG_CSharpOverflowException
@ SWIG_CSharpIndexOutOfRangeException
SWIGEXPORT long long SWIGSTDCALL CSharp_GooglefOrToolsfSat_SolutionCallback_SolutionIntegerValue___(void *jarg1, int jarg2)
SWIGEXPORT char *SWIGSTDCALL CSharp_GooglefOrToolsfSat_SatHelper_ValidateModel___(int model_proto_size, uint8 *jarg1)
SWIGEXPORT void SWIGSTDCALL SWIGRegisterStringCallback_operations_research_sat(SWIG_CSharpStringHelperCallback callback)
SWIG_CSharpExceptionCallback_t callback
SWIG_CSharpExceptionArgumentCallback_t callback