FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
gridlab-d/java/init.cpp at master · INFERLab/gridlab-d · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
INFERLab
/
gridlab-d
Public
forked from
gridlab-d/gridlab-d
Notifications
You must be signed in to change notification settings
Fork
2
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
gridlab-d
/
java
/
init.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
50 lines (37 loc) · 1.07 KB
Breadcrumbs
gridlab-d
/
java
/
init.cpp
Copy path
File metadata and controls
50 lines (37 loc) · 1.07 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*
$Id: init.cpp 4738 2014-07-03 00:55:39Z dchassin $
* Copyright (C) 2008 Battelle Memorial Institute
* glmjava module
*/
#
include
<
stdlib.h
>
#
include
<
stdio.h
>
#
include
<
errno.h
>
#
include
"
holder.h
"
#
include
"
gridlabd.h
"
#
include
"
gridlabd_java.h
"
EXPORT
CLASS
*
init
(
CALLBACKS
*fntable,
MODULE
*
module
,
int
argc,
char
*argv[])
{
PROPERTYTYPE
p;
if
(
sizeof
(
void
*) ==
sizeof
(int32))
p = PT_int32;
if
(
sizeof
(
void
*) ==
sizeof
(int64))
p = PT_int64;
//
set the GridLAB core API callback table
callback = fntable;
gl_global_create
(
"
glmjava::classpath
"
,PT_char256,
get_classpath
(),
NULL
);
gl_global_create
(
"
glmjava::libpath
"
,PT_char256,
get_libpath
(),
NULL
);
gl_global_create
(
"
glmjava::jcallback
"
,p,
get_jcb
(),
PT_ACCESS
,
PA_REFERENCE
,
NULL
);
//
default values
strcpy
(
get_classpath
(),
"
Win32/Debug/
"
);
strcpy
(
get_libpath
(),
"
Win32/Debug/
"
);
//
if(get_jvm() == NULL){
//
gl_error("Unable to initialize JVM in java->init()");
//
return NULL;
//
}
//
very nonstandard.
return
new_holder
(
module
);
}
EXPORT
int
check
(){
return
0
;
}
//
static CALLBACKS *callback = NULL;
/*
EOF
*/
Back
|
FazBrowse Home
|
New Git URL