Java Reference

Java Reference

CppBridge.java
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  * Do not make changes to this file unless you know what you are doing--modify
6  * the SWIG interface file instead.
7  * ----------------------------------------------------------------------------- */
8 
9 package com.google.ortools.init;
10 
16 public class CppBridge {
17  private transient long swigCPtr;
18  protected transient boolean swigCMemOwn;
19 
20  protected CppBridge(long cPtr, boolean cMemoryOwn) {
21  swigCMemOwn = cMemoryOwn;
22  swigCPtr = cPtr;
23  }
24 
25  protected static long getCPtr(CppBridge obj) {
26  return (obj == null) ? 0 : obj.swigCPtr;
27  }
28 
29  @SuppressWarnings("deprecation")
30  protected void finalize() {
31  delete();
32  }
33 
34  public synchronized void delete() {
35  if (swigCPtr != 0) {
36  if (swigCMemOwn) {
37  swigCMemOwn = false;
38  mainJNI.delete_CppBridge(swigCPtr);
39  }
40  swigCPtr = 0;
41  }
42  }
43 
49  public static void initLogging(String program_name) {
50  mainJNI.CppBridge_initLogging(program_name);
51  }
52 
59  public static void shutdownLogging() {
60  mainJNI.CppBridge_shutdownLogging();
61  }
62 
66  public static void setFlags(CppFlags flags) {
67  mainJNI.CppBridge_setFlags(CppFlags.getCPtr(flags), flags);
68  }
69 
78  public static boolean logGurobiSharedLibrary(String full_library_path) {
79  return mainJNI.CppBridge_logGurobiSharedLibrary(full_library_path);
80  }
81 
82  public CppBridge() {
83  this(mainJNI.new_CppBridge(), true);
84  }
85 
86 }
This class performs various C++ initialization.
Definition: CppBridge.java:16
static void shutdownLogging()
Shutdown the C++ logging layer.
Definition: CppBridge.java:59
static void setFlags(CppFlags flags)
Sets all the C++ flags contained in the CppFlags structure.
Definition: CppBridge.java:66
CppBridge(long cPtr, boolean cMemoryOwn)
Definition: CppBridge.java:20
static boolean logGurobiSharedLibrary(String full_library_path)
Load the gurobi shared library.
Definition: CppBridge.java:78
static void initLogging(String program_name)
Initialize the C++ logging layer.
Definition: CppBridge.java:49
Simple structure that holds useful C++ flags to setup from non-C++ languages.
Definition: CppFlags.java:14