Browse Source
Re-arrangement of PrismUtils stuff (split of native and non-native code).
Re-arrangement of PrismUtils stuff (split of native and non-native code).
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@1019 bbc10eb1-c90d-0410-af57-cb519fbb1720master
7 changed files with 184 additions and 153 deletions
-
53prism/include/PrismNative.h
-
53prism/include/PrismUtils.h
-
6prism/src/prism/Makefile
-
10prism/src/prism/PrismFileLog.java
-
14prism/src/prism/PrismNative.cc
-
53prism/src/prism/PrismNative.java
-
148prism/src/prism/PrismUtils.java
@ -0,0 +1,53 @@ |
|||
/* DO NOT EDIT THIS FILE - it is machine generated */ |
|||
#include <jni.h> |
|||
/* Header for class prism_PrismNative */ |
|||
|
|||
#ifndef _Included_prism_PrismNative |
|||
#define _Included_prism_PrismNative |
|||
#ifdef __cplusplus |
|||
extern "C" { |
|||
#endif |
|||
/* |
|||
* Class: prism_PrismNative |
|||
* Method: PN_GetStdout |
|||
* Signature: ()J |
|||
*/ |
|||
JNIEXPORT jlong JNICALL Java_prism_PrismNative_PN_1GetStdout |
|||
(JNIEnv *, jclass); |
|||
|
|||
/* |
|||
* Class: prism_PrismNative |
|||
* Method: PN_OpenFile |
|||
* Signature: (Ljava/lang/String;)J |
|||
*/ |
|||
JNIEXPORT jlong JNICALL Java_prism_PrismNative_PN_1OpenFile |
|||
(JNIEnv *, jclass, jstring); |
|||
|
|||
/* |
|||
* Class: prism_PrismNative |
|||
* Method: PN_PrintToFile |
|||
* Signature: (JLjava/lang/String;)V |
|||
*/ |
|||
JNIEXPORT void JNICALL Java_prism_PrismNative_PN_1PrintToFile |
|||
(JNIEnv *, jclass, jlong, jstring); |
|||
|
|||
/* |
|||
* Class: prism_PrismNative |
|||
* Method: PN_FlushFile |
|||
* Signature: (J)V |
|||
*/ |
|||
JNIEXPORT void JNICALL Java_prism_PrismNative_PN_1FlushFile |
|||
(JNIEnv *, jclass, jlong); |
|||
|
|||
/* |
|||
* Class: prism_PrismNative |
|||
* Method: PN_CloseFile |
|||
* Signature: (J)V |
|||
*/ |
|||
JNIEXPORT void JNICALL Java_prism_PrismNative_PN_1CloseFile |
|||
(JNIEnv *, jclass, jlong); |
|||
|
|||
#ifdef __cplusplus |
|||
} |
|||
#endif |
|||
#endif |
|||
@ -1,53 +0,0 @@ |
|||
/* DO NOT EDIT THIS FILE - it is machine generated */ |
|||
#include <jni.h> |
|||
/* Header for class prism_PrismUtils */ |
|||
|
|||
#ifndef _Included_prism_PrismUtils |
|||
#define _Included_prism_PrismUtils |
|||
#ifdef __cplusplus |
|||
extern "C" { |
|||
#endif |
|||
/* |
|||
* Class: prism_PrismUtils |
|||
* Method: PU_GetStdout |
|||
* Signature: ()J |
|||
*/ |
|||
JNIEXPORT jlong JNICALL Java_prism_PrismUtils_PU_1GetStdout |
|||
(JNIEnv *, jclass); |
|||
|
|||
/* |
|||
* Class: prism_PrismUtils |
|||
* Method: PU_OpenFile |
|||
* Signature: (Ljava/lang/String;)J |
|||
*/ |
|||
JNIEXPORT jlong JNICALL Java_prism_PrismUtils_PU_1OpenFile |
|||
(JNIEnv *, jclass, jstring); |
|||
|
|||
/* |
|||
* Class: prism_PrismUtils |
|||
* Method: PU_PrintToFile |
|||
* Signature: (JLjava/lang/String;)V |
|||
*/ |
|||
JNIEXPORT void JNICALL Java_prism_PrismUtils_PU_1PrintToFile |
|||
(JNIEnv *, jclass, jlong, jstring); |
|||
|
|||
/* |
|||
* Class: prism_PrismUtils |
|||
* Method: PU_FlushFile |
|||
* Signature: (J)V |
|||
*/ |
|||
JNIEXPORT void JNICALL Java_prism_PrismUtils_PU_1FlushFile |
|||
(JNIEnv *, jclass, jlong); |
|||
|
|||
/* |
|||
* Class: prism_PrismUtils |
|||
* Method: PU_CloseFile |
|||
* Signature: (J)V |
|||
*/ |
|||
JNIEXPORT void JNICALL Java_prism_PrismUtils_PU_1CloseFile |
|||
(JNIEnv *, jclass, jlong); |
|||
|
|||
#ifdef __cplusplus |
|||
} |
|||
#endif |
|||
#endif |
|||
@ -0,0 +1,53 @@ |
|||
//============================================================================== |
|||
// |
|||
// Copyright (c) 2002- |
|||
// Authors: |
|||
// * Dave Parker <david.parker@comlab.ox.ac.uk> (University of Oxford) |
|||
// |
|||
//------------------------------------------------------------------------------ |
|||
// |
|||
// This file is part of PRISM. |
|||
// |
|||
// PRISM is free software; you can redistribute it and/or modify |
|||
// it under the terms of the GNU General Public License as published by |
|||
// the Free Software Foundation; either version 2 of the License, or |
|||
// (at your option) any later version. |
|||
// |
|||
// PRISM is distributed in the hope that it will be useful, |
|||
// but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
// GNU General Public License for more details. |
|||
// |
|||
// You should have received a copy of the GNU General Public License |
|||
// along with PRISM; if not, write to the Free Software Foundation, |
|||
// Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|||
// |
|||
//============================================================================== |
|||
|
|||
package prism; |
|||
|
|||
/** |
|||
* A few utility methods, relying on native methods in the "prism" shared library |
|||
*/ |
|||
public class PrismNative |
|||
{ |
|||
// Load "prism" shared library |
|||
static |
|||
{ |
|||
try { |
|||
System.loadLibrary("prism"); |
|||
} |
|||
catch (UnsatisfiedLinkError e) { |
|||
System.out.println(e); |
|||
System.exit(1); |
|||
} |
|||
} |
|||
|
|||
public static native long PN_GetStdout(); |
|||
public static native long PN_OpenFile(String filename); |
|||
public static native void PN_PrintToFile(long fp, String s); |
|||
public static native void PN_FlushFile(long fp); |
|||
public static native void PN_CloseFile(long fp); |
|||
} |
|||
|
|||
//------------------------------------------------------------------------------ |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue