GAMS
1.4.0
Acquire_VM.h
Go to the documentation of this file.
1
2
#ifndef _GAMS_JAVA_ACQUIRE_VM_H_
3
#define _GAMS_JAVA_ACQUIRE_VM_H_
4
5
#include "gams_jni.h"
6
14
namespace
gams
15
{
16
namespace
utility
17
{
18
namespace
java
19
{
24
class
Acquire_VM
25
{
26
public
:
27
Acquire_VM
()
28
{
29
needs_detach
= !gams_jni_is_attached();
30
env
= gams_jni_get_env();
31
}
32
33
~Acquire_VM
()
34
{
35
if
(
needs_detach
)
36
jni_detach();
37
}
38
39
JNIEnv *
env
;
40
bool
needs_detach
;
41
};
42
}
43
}
44
}
45
46
#endif
// not defined _GAMS_JAVA_ACQUIRE_VM_H_
gams::utility::java::Acquire_VM
This class encapsulates attaching and detaching to a VM.
Definition:
Acquire_VM.h:25
gams::utility::java::Acquire_VM::Acquire_VM
Acquire_VM()
Definition:
Acquire_VM.h:27
gams::utility::java::Acquire_VM::~Acquire_VM
~Acquire_VM()
Definition:
Acquire_VM.h:33
gams::utility::java::Acquire_VM::needs_detach
bool needs_detach
Definition:
Acquire_VM.h:40
gams::utility::java::Acquire_VM::env
JNIEnv * env
Definition:
Acquire_VM.h:39
gams
Contains all GAMS-related tools, classes and code.
Definition:
AlgorithmFactory.h:65
src
gams
utility
java
Acquire_VM.h
Generated on Sat Jan 20 2024 00:55:56 for GAMS by
1.9.1