Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
3f0d2767
Commit
3f0d2767
authored
Dec 06, 2005
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adapted to V4.1 object orientation
parent
4f18368b
Changes
23
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
1291 additions
and
77 deletions
+1291
-77
java/exe/jpwr_rt_gdh/src/jpwr_rt_gdh.c
java/exe/jpwr_rt_gdh/src/jpwr_rt_gdh.c
+145
-1
java/exe/jpwr_rt_gdh/src/jpwr_rt_gdh.h
java/exe/jpwr_rt_gdh/src/jpwr_rt_gdh.h
+8
-0
java/jpwr/jop/src/DynamicObj.java
java/jpwr/jop/src/DynamicObj.java
+4
-2
java/jpwr/jop/src/XttObj.java
java/jpwr/jop/src/XttObj.java
+81
-7
java/jpwr/jop/src/XttTree.java
java/jpwr/jop/src/XttTree.java
+73
-6
java/jpwr/rt/src/Gdh.java
java/jpwr/rt/src/Gdh.java
+108
-7
java/jpwr/rt/src/GdhServer.java
java/jpwr/rt/src/GdhServer.java
+23
-8
java/jpwr/rt/src/GdhrsAttrDef.java
java/jpwr/rt/src/GdhrsAttrDef.java
+61
-0
java/jpwr/rt/src/Pwr.java
java/jpwr/rt/src/Pwr.java
+16
-1
java/jpwr/rt/src/PwrsParInfo.java
java/jpwr/rt/src/PwrsParInfo.java
+55
-0
java/jpwr/rt/src/jpwr_rt_Gdh.h
java/jpwr/rt/src/jpwr_rt_Gdh.h
+126
-6
java/jpwr/rt_client/src/Gdh.java
java/jpwr/rt_client/src/Gdh.java
+21
-1
src/jpwr/jop/src/DynamicObj.java
src/jpwr/jop/src/DynamicObj.java
+4
-2
src/jpwr/jop/src/XttObj.java
src/jpwr/jop/src/XttObj.java
+81
-7
src/jpwr/jop/src/XttTree.java
src/jpwr/jop/src/XttTree.java
+73
-6
src/jpwr/rt/src/Gdh.java
src/jpwr/rt/src/Gdh.java
+108
-7
src/jpwr/rt/src/GdhServer.java
src/jpwr/rt/src/GdhServer.java
+23
-8
src/jpwr/rt/src/GdhrsAttrDef.java
src/jpwr/rt/src/GdhrsAttrDef.java
+61
-0
src/jpwr/rt/src/Pwr.java
src/jpwr/rt/src/Pwr.java
+16
-1
src/jpwr/rt/src/PwrsParInfo.java
src/jpwr/rt/src/PwrsParInfo.java
+55
-0
src/jpwr/rt/src/jpwr_rt_Gdh.h
src/jpwr/rt/src/jpwr_rt_Gdh.h
+126
-6
src/jpwr/rt/src/os_linux/hw_x86/makefile
src/jpwr/rt/src/os_linux/hw_x86/makefile
+2
-0
src/jpwr/rt_client/src/Gdh.java
src/jpwr/rt_client/src/Gdh.java
+21
-1
No files found.
java/exe/jpwr_rt_gdh/src/jpwr_rt_gdh.c
View file @
3f0d2767
/*
/*
* Proview $Id: jpwr_rt_gdh.c,v 1.1
0 2005-11-04 11:51:20
claes Exp $
* Proview $Id: jpwr_rt_gdh.c,v 1.1
1 2005-12-06 11:17:01
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
* Copyright (C) 2005 SSAB Oxelsund AB.
*
*
* This program is free software; you can redistribute it and/or
* This program is free software; you can redistribute it and/or
...
@@ -2425,7 +2425,151 @@ JNIEXPORT jobject JNICALL Java_jpwr_rt_Gdh_getSuperClass
...
@@ -2425,7 +2425,151 @@ JNIEXPORT jobject JNICALL Java_jpwr_rt_Gdh_getSuperClass
}
}
JNIEXPORT
jobjectArray
JNICALL
Java_jpwr_rt_Gdh_getObjectBodyDef
(
JNIEnv
*
env
,
jobject
obj
,
jint
classid
,
jobject
objid_obj
)
{
int
sts
,
i
;
int
j
=
0
;
jclass
pwrsParInfo_id
;
static
jmethodID
pwrsParInfo_cid
=
NULL
;
jclass
gdhrsAttrDef_id
;
static
jmethodID
gdhrsAttrDef_cid
=
NULL
;
// jclass cdhrClassId_id;
// static jmethodID cdhrClassId_cid;
jclass
pwrtObjid_id
;
static
jmethodID
pwrtObjid_getOix
=
NULL
;
static
jmethodID
pwrtObjid_getVid
=
NULL
;
static
jmethodID
pwrtObjid_cid
=
NULL
;
pwr_tObjid
objid
=
pwr_cNObjid
;
jobjectArray
gdhrsAttrDefArr
=
NULL
;
jobject
gdhrsAttrDef
;
jobject
pwrsParInfo
;
// jint jsts;
pwr_tClassId
cid
;
gdh_sAttrDef
*
bd
;
int
rows
;
pwr_sAttrRef
aref
;
pwr_sAttrRef
aaref
;
pwr_tDisableAttr
disabled
;
pwrtObjid_id
=
(
*
env
)
->
FindClass
(
env
,
"jpwr/rt/PwrtObjid"
);
if
(
pwrtObjid_cid
==
NULL
||
pwrtObjid_getOix
==
NULL
||
pwrtObjid_getVid
==
NULL
)
{
pwrtObjid_cid
=
(
*
env
)
->
GetMethodID
(
env
,
pwrtObjid_id
,
"<init>"
,
"(II)V"
);
pwrtObjid_getOix
=
(
*
env
)
->
GetMethodID
(
env
,
pwrtObjid_id
,
"getOix"
,
"()I"
);
pwrtObjid_getVid
=
(
*
env
)
->
GetMethodID
(
env
,
pwrtObjid_id
,
"getVid"
,
"()I"
);
}
//find the class for PwrsParInfo
pwrsParInfo_id
=
(
*
env
)
->
FindClass
(
env
,
"jpwr/rt/PwrsParInfo"
);
gdhrsAttrDef_id
=
(
*
env
)
->
FindClass
(
env
,
"jpwr/rt/GdhrsAttrDef"
);
if
(
pwrsParInfo_id
==
NULL
||
gdhrsAttrDef_id
==
NULL
)
{
printf
(
"Fel vid FindClass getObjectBodyDef
\n
"
);
return
(
jobjectArray
)
NULL
;
}
if
(
pwrsParInfo_cid
==
NULL
)
{
pwrsParInfo_cid
=
(
*
env
)
->
GetMethodID
(
env
,
pwrsParInfo_id
,
"<init>"
,
"(Ljava/lang/String;IIIIII)V"
);
}
if
(
gdhrsAttrDef_cid
==
NULL
)
{
gdhrsAttrDef_cid
=
(
*
env
)
->
GetMethodID
(
env
,
gdhrsAttrDef_id
,
"<init>"
,
"(Ljava/lang/String;IIIILjpwr/rt/PwrsParInfo;I)V"
);
}
if
(
pwrsParInfo_cid
==
NULL
||
gdhrsAttrDef_cid
==
NULL
)
{
printf
(
"Fel vid GetMethodId getObjectBodyDef
\n
"
);
return
(
jobjectArray
)
NULL
;
}
if
(
objid_obj
!=
0
)
{
objid
.
oix
=
(
*
env
)
->
CallIntMethod
(
env
,
objid_obj
,
pwrtObjid_getOix
);
objid
.
vid
=
(
*
env
)
->
CallIntMethod
(
env
,
objid_obj
,
pwrtObjid_getVid
);
sts
=
gdh_GetObjectClass
(
objid
,
&
cid
);
if
(
EVEN
(
sts
))
{
printf
(
"Fel frn GetObjectClass %d
\n
"
,
sts
);
//return (jobjectArray)NULL;
}
sts
=
gdh_GetObjectBodyDef
(
cid
,
&
bd
,
&
rows
,
objid
);
if
(
EVEN
(
sts
))
{
printf
(
"Fel frn GetObjectBodyDef %d
\n
"
,
sts
);
return
(
jobjectArray
)
NULL
;
}
//create a new GdhrsAttrDef[]
gdhrsAttrDefArr
=
(
*
env
)
->
NewObjectArray
(
env
,
(
jint
)
rows
,
gdhrsAttrDef_id
,
NULL
);
for
(
i
=
0
;
i
<
rows
;
i
++
)
{
if
(
(
bd
[
i
].
flags
&
gdh_mAttrDef_Shadowed
)
||
(
bd
[
i
].
attr
->
Param
.
Info
.
Flags
&
PWR_MASK_RTHIDE
)
||
(
bd
[
i
].
attr
->
Param
.
Info
.
Flags
&
PWR_MASK_RTVIRTUAL
)
||
(
bd
[
i
].
attr
->
Param
.
Info
.
Flags
&
PWR_MASK_PRIVATE
)
||
(
bd
[
i
].
attr
->
Param
.
Info
.
Type
==
pwr_eType_CastId
)
||
(
bd
[
i
].
attr
->
Param
.
Info
.
Type
==
pwr_eType_DisableAttr
)
)
continue
;
if
(
bd
[
i
].
attr
->
Param
.
Info
.
Flags
&
PWR_MASK_DISABLEATTR
)
{
aref
=
cdh_ObjidToAref
(
objid
);
sts
=
gdh_ArefANameToAref
(
&
aref
,
bd
[
i
].
attrName
,
&
aaref
);
if
(
EVEN
(
sts
))
printf
(
"Fel frn ArefANameToAref %d
\n
"
,
sts
);
sts
=
gdh_ArefDisabled
(
&
aaref
,
&
disabled
);
if
(
EVEN
(
sts
))
printf
(
"Fel frn ArefDisabled %d
\n
"
,
sts
);
if
(
disabled
)
continue
;
}
pwrsParInfo
=
(
*
env
)
->
NewObject
(
env
,
pwrsParInfo_id
,
pwrsParInfo_cid
,
NULL
,
bd
[
i
].
attr
->
Param
.
Info
.
Type
,
bd
[
i
].
attr
->
Param
.
Info
.
Offset
,
bd
[
i
].
attr
->
Param
.
Info
.
Size
,
bd
[
i
].
attr
->
Param
.
Info
.
Flags
,
bd
[
i
].
attr
->
Param
.
Info
.
Elements
,
bd
[
i
].
attr
->
Param
.
Info
.
ParamIndex
);
gdhrsAttrDef
=
(
*
env
)
->
NewObject
(
env
,
gdhrsAttrDef_id
,
gdhrsAttrDef_cid
,
(
*
env
)
->
NewStringUTF
(
env
,
(
char
*
)
bd
[
i
].
attrName
),
(
jint
)
bd
[
i
].
attrLevel
,
(
jint
)
bd
[
i
].
attrClass
,
(
jint
)
bd
[
i
].
flags
,
(
jint
)(
bd
[
i
].
attr
->
Param
.
TypeRef
),
pwrsParInfo
,
(
jint
)
sts
);
(
*
env
)
->
SetObjectArrayElement
(
env
,
gdhrsAttrDefArr
,
j
,
gdhrsAttrDef
);
j
++
;
}
free
((
char
*
)
bd
);
return
gdhrsAttrDefArr
;
}
printf
(
"Fel i getObjectBodyDef Objid r 0
\n
"
);
return
(
jobjectArray
)
NULL
;
}
...
...
java/exe/jpwr_rt_gdh/src/jpwr_rt_gdh.h
View file @
3f0d2767
...
@@ -356,6 +356,14 @@ JNIEXPORT jobject JNICALL Java_jpwr_rt_Gdh_getMsgText
...
@@ -356,6 +356,14 @@ JNIEXPORT jobject JNICALL Java_jpwr_rt_Gdh_getMsgText
JNIEXPORT
jobject
JNICALL
Java_jpwr_rt_Gdh_getSuperClass
JNIEXPORT
jobject
JNICALL
Java_jpwr_rt_Gdh_getSuperClass
(
JNIEnv
*
,
jobject
,
jint
,
jobject
);
(
JNIEnv
*
,
jobject
,
jint
,
jobject
);
/*
* Class: jpwr_rt_Gdh
* Method: getObjectBodyDef
* Signature: (ILjpwr/rt/PwrtObjid;)[Ljpwr/rt/GdhrsAttrDef;
*/
JNIEXPORT
jobjectArray
JNICALL
Java_jpwr_rt_Gdh_getObjectBodyDef
(
JNIEnv
*
,
jobject
,
jint
,
jobject
);
#ifdef __cplusplus
#ifdef __cplusplus
}
}
#endif
#endif
...
...
java/jpwr/jop/src/DynamicObj.java
View file @
3f0d2767
/*
/*
* Proview $Id: DynamicObj.java,v 1.
3 2005-09-01 14:57:50
claes Exp $
* Proview $Id: DynamicObj.java,v 1.
4 2005-12-06 11:17:01
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
* Copyright (C) 2005 SSAB Oxelsund AB.
*
*
* This program is free software; you can redistribute it and/or
* This program is free software; you can redistribute it and/or
...
@@ -76,7 +76,9 @@ public class DynamicObj extends TreeObj
...
@@ -76,7 +76,9 @@ public class DynamicObj extends TreeObj
obj
.
setValue
(
en
.
gdh
.
getObjectRefInfoBoolean
(
obj
.
refObj
.
id
));
obj
.
setValue
(
en
.
gdh
.
getObjectRefInfoBoolean
(
obj
.
refObj
.
id
));
break
;
break
;
default
:
default
:
Logg
.
logg
(
"getObjectRefInfoString("
+
obj
.
refObj
.
id
+
")"
,
6
);
// Logg.logg(obj.name + " getObjectRefInfoString(" + obj.refObj.id + /*" " + obj.type +*/ ")", 1);
// Logg.logg("getObjectRefInfoString: " + en.gdh.getObjectRefInfoString(obj.refObj.id, obj.type), 1);
obj
.
setValue
(
en
.
gdh
.
getObjectRefInfoString
(
obj
.
refObj
.
id
,
obj
.
type
));
obj
.
setValue
(
en
.
gdh
.
getObjectRefInfoString
(
obj
.
refObj
.
id
,
obj
.
type
));
break
;
break
;
}
}
...
...
java/jpwr/jop/src/XttObj.java
View file @
3f0d2767
/*
/*
* Proview $Id: XttObj.java,v 1.
2 2005-09-01 14:57:5
1 claes Exp $
* Proview $Id: XttObj.java,v 1.
3 2005-12-06 11:17:0
1 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
* Copyright (C) 2005 SSAB Oxelsund AB.
*
*
* This program is free software; you can redistribute it and/or
* This program is free software; you can redistribute it and/or
...
@@ -61,6 +61,9 @@ public class XttObj extends DynamicObj implements JopDynamic
...
@@ -61,6 +61,9 @@ public class XttObj extends DynamicObj implements JopDynamic
// public String name = null;
// public String name = null;
/** Description of the Field */
/** Description of the Field */
public
CdhrObjid
objId
=
null
;
public
CdhrObjid
objId
=
null
;
public
CdhrAttrRef
aref
=
null
;
/** Description of the Field */
/** Description of the Field */
public
XttRefObj
refObj
=
null
;
public
XttRefObj
refObj
=
null
;
/** Description of the Field */
/** Description of the Field */
...
@@ -179,13 +182,50 @@ public class XttObj extends DynamicObj implements JopDynamic
...
@@ -179,13 +182,50 @@ public class XttObj extends DynamicObj implements JopDynamic
s
=
this
.
fullName
+
"."
+
obj
.
name
+
suffix
;
s
=
this
.
fullName
+
"."
+
obj
.
name
+
suffix
;
obj
.
fullName
=
s
;
obj
.
fullName
=
s
;
Logg
.
logg
(
"XttObj: Name "
+
s
+
"Type "
+
this
.
className
,
6
);
Logg
.
logg
(
"XttObj: Name "
+
s
+
"Type "
+
this
.
className
,
6
);
if
((
obj
.
flags
&
Pwr
.
mAdef_array
)
>
0
)
if
(
((
obj
.
flags
&
Pwr
.
mAdef_array
)
>
0
)
&&
((
obj
.
flags
&
Pwr
.
mAdef_class
)
<=
0
)
)
{
{
Logg
.
logg
(
"XttObj: Hittat array, vad ska jag gra nu?? "
+
s
,
6
);
Logg
.
logg
(
"XttObj: Hittat array, vad ska jag gra nu?? "
+
s
,
6
);
XttArrayAttr
arrayAttr
=
new
XttArrayAttr
(
s
);
XttArrayAttr
arrayAttr
=
new
XttArrayAttr
(
s
);
DefaultMutableTreeNode
arrayChildNode
=
new
DefaultMutableTreeNode
(
arrayAttr
);
DefaultMutableTreeNode
arrayChildNode
=
new
DefaultMutableTreeNode
(
arrayAttr
);
obj
.
treeNode
.
add
(
arrayChildNode
);
obj
.
treeNode
.
add
(
arrayChildNode
);
}
}
else
if
((
obj
.
flags
&
Pwr
.
mAdef_class
)
>
0
)
{
Logg
.
logg
(
"XttObj: Hittat klass, vad ska jag gra nu?? "
+
this
.
fullName
+
" "
+
obj
.
name
,
1
);
// CdhrObjid cdhrObjid = gdh.nameToObjid(this.fullName + obj.name);
// System.out.println("nameToObjid " + cdhrObjid.getSts());
// CdhrClassId cdhrClassId = gdh.getObjectClass(cdhrObjid.objid);
/*
CdhrAttrRef aref = gdh.nameToAttrRef(this.fullName + "." + obj.name);
System.out.println("nameToAttrRef " + aref.getSts());
CdhrTypeId tid = gdh.getAttrRefTid(aref.aref);
String className = gdh.attrRefToName(aref.aref, Cdh.mName_object).str;
XttObj classObj = new XttObj(this.en.gdh,
this.en,
this.fullName + "." + obj.name,
obj.name,
className,
new CdhrObjid(aref.aref.getObjid(),aref.getSts()),
new CdhrClassId(tid.typeId, tid.sts));
System.out.println("classObj: " + classObj.hasChildren + " " + className);
*/
/*
XttObj classObj = new XttObj(this.en.gdh,
this.en,
this.fullName + obj.name,
obj.name,
"Tjofljt",
cdhrObjid,
cdhrClassId);
*/
// DefaultMutableTreeNode classChildNode = new DefaultMutableTreeNode(classObj);
// obj.treeNode.add(classChildNode);
}
//p grund av bugg i nuvarande proviewversion DataPointer borde vara PRIVATE
//p grund av bugg i nuvarande proviewversion DataPointer borde vara PRIVATE
else
if
(
obj
.
name
.
compareTo
(
"DataPointer"
)
!=
0
)
else
if
(
obj
.
name
.
compareTo
(
"DataPointer"
)
!=
0
)
{
{
...
@@ -208,15 +248,16 @@ public class XttObj extends DynamicObj implements JopDynamic
...
@@ -208,15 +248,16 @@ public class XttObj extends DynamicObj implements JopDynamic
ret
=
(
GdhrRefObjectInfo
)
retVec
.
get
(
i
);
ret
=
(
GdhrRefObjectInfo
)
retVec
.
get
(
i
);
if
(
ret
.
evenSts
())
if
(
ret
.
evenSts
())
{
{
Logg
.
logg
(
"XttObj: refObjectInfo_Vector("
+
s
+
") Error "
,
4
);
Logg
.
logg
(
"XttObj: refObjectInfo_Vector("
+
s
+
") Error "
,
1
);
}
}
//p grund av bugg i nuvarande proviewversion DataPointer borde vara PRIVATE
//p grund av bugg i nuvarande proviewversion DataPointer borde vara PRIVATE
while
(
j
<
attrVector
.
size
()
&&
while
(
j
<
attrVector
.
size
()
&&
(((
XttObjAttr
)
attrVector
.
get
(
j
)).
name
.
compareTo
(
"DataPointer"
)
==
0
||
(((
XttObjAttr
)
attrVector
.
get
(
j
)).
name
.
compareTo
(
"DataPointer"
)
==
0
||
((((
XttObjAttr
)
attrVector
.
get
(
j
)).
flags
&
Pwr
.
mAdef_array
)
>
0
)))
((((
XttObjAttr
)
attrVector
.
get
(
j
)).
flags
&
Pwr
.
mAdef_array
)
>
0
)
||
((((
XttObjAttr
)
attrVector
.
get
(
j
)).
flags
&
Pwr
.
mAdef_class
)
>
0
))
)
{
{
Logg
.
logg
(
"Hittat datapointer"
,
4
);
Logg
.
logg
(
"Hittat datapointer"
,
1
);
j
++;
j
++;
}
}
if
(
j
<
attrVector
.
size
())
if
(
j
<
attrVector
.
size
())
...
@@ -253,7 +294,8 @@ public class XttObj extends DynamicObj implements JopDynamic
...
@@ -253,7 +294,8 @@ public class XttObj extends DynamicObj implements JopDynamic
for
(
int
i
=
0
;
i
<
this
.
attrVector
.
size
();
i
++)
for
(
int
i
=
0
;
i
<
this
.
attrVector
.
size
();
i
++)
{
{
XttObjAttr
obj
=
(
XttObjAttr
)
this
.
attrVector
.
get
(
i
);
XttObjAttr
obj
=
(
XttObjAttr
)
this
.
attrVector
.
get
(
i
);
if
((
obj
.
flags
&
Pwr
.
mAdef_array
)
>
0
)
if
(
((
obj
.
flags
&
Pwr
.
mAdef_array
)
>
0
)
&&
((
obj
.
flags
&
Pwr
.
mAdef_class
)
<=
0
)
)
{
{
Enumeration
enum
=
obj
.
treeNode
.
children
();
Enumeration
enum
=
obj
.
treeNode
.
children
();
while
(
enum
.
hasMoreElements
())
while
(
enum
.
hasMoreElements
())
...
@@ -266,6 +308,22 @@ public class XttObj extends DynamicObj implements JopDynamic
...
@@ -266,6 +308,22 @@ public class XttObj extends DynamicObj implements JopDynamic
}
}
}
}
}
else
if
((
obj
.
flags
&
Pwr
.
mAdef_class
)
>
0
)
{
/*
Enumeration enum = obj.treeNode.children();
while(enum.hasMoreElements())
{
DefaultMutableTreeNode child = (DefaultMutableTreeNode)enum.nextElement();
XttArrayAttr arrayObj = (XttArrayAttr)child.getUserObject();
if(arrayObj.elements == obj.elements)
{
this.setObjectAttributeValue(arrayObj);
}
}
*/
}
}
else
if
(
obj
.
name
.
compareTo
(
"DataPointer"
)
!=
0
)
else
if
(
obj
.
name
.
compareTo
(
"DataPointer"
)
!=
0
)
{
{
...
@@ -307,8 +365,23 @@ public class XttObj extends DynamicObj implements JopDynamic
...
@@ -307,8 +365,23 @@ public class XttObj extends DynamicObj implements JopDynamic
for
(
int
i
=
0
;
i
<
attrVector
.
size
();
i
++)
for
(
int
i
=
0
;
i
<
attrVector
.
size
();
i
++)
{
{
XttObjAttr
obj
=
(
XttObjAttr
)
attrVector
.
get
(
i
);
XttObjAttr
obj
=
(
XttObjAttr
)
attrVector
.
get
(
i
);
if
((
obj
.
flags
&
Pwr
.
mAdef_array
)
>
0
)
if
(
((
obj
.
flags
&
Pwr
.
mAdef_array
)
>
0
)
&&
((
obj
.
flags
&
Pwr
.
mAdef_class
)
<=
0
)
)
{
Enumeration
enum
=
obj
.
treeNode
.
children
();
while
(
enum
.
hasMoreElements
())
{
DefaultMutableTreeNode
child
=
(
DefaultMutableTreeNode
)
enum
.
nextElement
();
XttArrayAttr
arrayObj
=
(
XttArrayAttr
)
child
.
getUserObject
();
if
(
arrayObj
.
elements
==
obj
.
elements
)
{
unref_vec
.
add
(
arrayObj
.
refObj
.
refid
);
}
}
}
else
if
((
obj
.
flags
&
Pwr
.
mAdef_class
)
>
0
)
{
{
/*
Enumeration enum = obj.treeNode.children();
Enumeration enum = obj.treeNode.children();
while(enum.hasMoreElements())
while(enum.hasMoreElements())
{
{
...
@@ -319,6 +392,7 @@ public class XttObj extends DynamicObj implements JopDynamic
...
@@ -319,6 +392,7 @@ public class XttObj extends DynamicObj implements JopDynamic
unref_vec.add(arrayObj.refObj.refid);
unref_vec.add(arrayObj.refObj.refid);
}
}
}
}
*/
}
}
//p grund av bugg i nuvarande proviewversion DataPointer borde vara PRIVATE
//p grund av bugg i nuvarande proviewversion DataPointer borde vara PRIVATE
else
if
(
obj
.
name
.
compareTo
(
"DataPointer"
)
!=
0
)
else
if
(
obj
.
name
.
compareTo
(
"DataPointer"
)
!=
0
)
...
...
java/jpwr/jop/src/XttTree.java
View file @
3f0d2767
/*
/*
* Proview $Id: XttTree.java,v 1.
8 2005-11-04 11:47:58
claes Exp $
* Proview $Id: XttTree.java,v 1.
9 2005-12-06 11:17:01
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
* Copyright (C) 2005 SSAB Oxelsund AB.
*
*
* This program is free software; you can redistribute it and/or
* This program is free software; you can redistribute it and/or
...
@@ -165,7 +165,7 @@ public class XttTree extends JPanel
...
@@ -165,7 +165,7 @@ public class XttTree extends JPanel
public
XttTree
(
JopSession
session
,
URL
url
,
Object
root
)
public
XttTree
(
JopSession
session
,
URL
url
,
Object
root
)
{
{
Logg
.
text_lbl
=
this
.
labelMessage
;
Logg
.
text_lbl
=
this
.
labelMessage
;
Logg
.
logg
(
"ver 1.9.
6
"
,
0
);
Logg
.
logg
(
"ver 1.9.
7
"
,
0
);
this
.
session
=
session
;
this
.
session
=
session
;
this
.
root
=
root
;
this
.
root
=
root
;
...
@@ -504,7 +504,9 @@ public class XttTree extends JPanel
...
@@ -504,7 +504,9 @@ public class XttTree extends JPanel
Logg
.
logg
(
"XttTree: Fre getObjectAttributes"
,
6
);
Logg
.
logg
(
"XttTree: Fre getObjectAttributes"
,
6
);
PwrtObjid
pwrobjid
=
new
PwrtObjid
(
0
,
0
);
PwrtObjid
pwrobjid
=
new
PwrtObjid
(
0
,
0
);
Vector
v
=
(
Vector
)
gdh
.
getAllClassAttributes
(
obj
.
classId
.
classId
,
pwrobjid
);
// Vector v = (Vector)gdh.getAllClassAttributes(obj.classId.classId, obj.objId.objid);
Vector
v
=
(
Vector
)
gdh
.
getAllClassAttributes
(
obj
.
fullName
);
//Vector v = (Vector)gdh.getAllClassAttributes(obj.classId.classId, pwrobjid);
Logg
.
logg
(
"XttTree: Efter getAllClassAttributes"
,
6
);
Logg
.
logg
(
"XttTree: Efter getAllClassAttributes"
,
6
);
if
(
v
==
null
)
if
(
v
==
null
)
{
{
...
@@ -514,12 +516,62 @@ public class XttTree extends JPanel
...
@@ -514,12 +516,62 @@ public class XttTree extends JPanel
Vector
xttObjAttrVec
=
new
Vector
();
Vector
xttObjAttrVec
=
new
Vector
();
for
(
int
i
=
0
;
i
<
v
.
size
();
i
++)
for
(
int
i
=
0
;
i
<
v
.
size
();
i
++)
{
{
CdhrObjAttr
cdhrobjattr
=
(
CdhrObjAttr
)
v
.
get
(
i
);
CdhrObjAttr
cdhrobjattr
=
(
CdhrObjAttr
)
v
.
get
(
i
);
/*
if(((cdhrobjattr.flags & Pwr.mAdef_class) > 0) &&
((cdhrobjattr.flags & Pwr.mAdef_array) <= 0))
*/
if
((
cdhrobjattr
.
flags
&
Pwr
.
mAdef_class
)
>
0
)
{
Logg
.
logg
(
"XttTree: Hittat klass, vad ska jag gra nu?? "
+
obj
.
fullName
+
" "
+
cdhrobjattr
.
name
,
1
);
CdhrObjid
cdhrObjid
=
gdh
.
classIdToObjid
(
cdhrobjattr
.
type
);
//System.out.println("classIdToObjid " + cdhrObjid.getSts() + " " + cdhrObjid.objid.oix + " " + cdhrObjid.objid.vid);
//CdhrClassId cdhrClassId = gdh.getObjectClass(cdhrObjid.objid);
CdhrAttrRef
aref
=
gdh
.
nameToAttrRef
(
obj
.
fullName
+
"."
+
cdhrobjattr
.
name
);
//System.out.println("nameToAttrRef " + aref.getSts());
//CdhrTypeId tid = gdh.getAttrRefTid(aref.aref);
//CdhrObjid co = gdh.classIdToObjid( tid.getTypeId() );
//System.out.println("classIdToObjid " + co.getSts()+ " " + co.objid.oix + " " + co.objid.vid);
String
className
=
gdh
.
objidToName
(
cdhrObjid
.
objid
,
Cdh
.
mName_object
).
str
;
//String className = gdh.attrRefToName(aref.aref, Cdh.mName_object).str;
XttObj
classObj
=
new
XttObj
(
this
.
engine
.
gdh
,
this
.
engine
,
obj
.
fullName
+
"."
+
cdhrobjattr
.
name
,
cdhrobjattr
.
name
,
className
,
cdhrObjid
,
// co, new CdhrObjid(aref.aref.getObjid(),aref.getSts()),
new
CdhrClassId
(
cdhrobjattr
.
type
,
1
));
System
.
out
.
println
(
"classObj: "
+
classObj
.
fullName
);
DefaultMutableTreeNode
classObjTreeNode
=
new
DefaultMutableTreeNode
(
classObj
);
classObj
.
treeNode
=
classObjTreeNode
;
tN
.
add
(
classObjTreeNode
);
if
((
cdhrobjattr
.
flags
&
Pwr
.
mAdef_array
)
>
0
)
{
classObj
.
hasChildren
=
true
;
DefaultMutableTreeNode
c
=
new
DefaultMutableTreeNode
(
new
XttObj
(
"DummyXttObj"
));
classObjTreeNode
.
add
(
c
);
}
}
else
{
XttObjAttr
xttObjAttr
=
new
XttObjAttr
(
cdhrobjattr
);
XttObjAttr
xttObjAttr
=
new
XttObjAttr
(
cdhrobjattr
);
System
.
out
.
println
(
"xttObjAttr: "
+
xttObjAttr
.
name
);
xttObjAttrVec
.
add
(
xttObjAttr
);
xttObjAttrVec
.
add
(
xttObjAttr
);
DefaultMutableTreeNode
objAttrTreeNode
=
new
DefaultMutableTreeNode
(
xttObjAttr
);
DefaultMutableTreeNode
objAttrTreeNode
=
new
DefaultMutableTreeNode
(
xttObjAttr
);
xttObjAttr
.
treeNode
=
objAttrTreeNode
;
xttObjAttr
.
treeNode
=
objAttrTreeNode
;
tN
.
add
(
objAttrTreeNode
);
tN
.
add
(
objAttrTreeNode
);
}
}
}
obj
.
addAttrVector
(
xttObjAttrVec
);
obj
.
addAttrVector
(
xttObjAttrVec
);
Logg
.
logg
(
"XttTree: Efter getObjectAttributes"
,
6
);
Logg
.
logg
(
"XttTree: Efter getObjectAttributes"
,
6
);
...
@@ -1618,12 +1670,21 @@ public class XttTree extends JPanel
...
@@ -1618,12 +1670,21 @@ public class XttTree extends JPanel
DefaultMutableTreeNode
tn
=
(
DefaultMutableTreeNode
)(
tp
.
getLastPathComponent
());
DefaultMutableTreeNode
tn
=
(
DefaultMutableTreeNode
)(
tp
.
getLastPathComponent
());
DefaultMutableTreeNode
tc
=
(
DefaultMutableTreeNode
)
tn
.
getFirstChild
();
DefaultMutableTreeNode
tc
=
(
DefaultMutableTreeNode
)
tn
.
getFirstChild
();
if
((
tn
!=
null
)
&&
(
tree
.
getSelectionPath
()
!=
null
)
&&
if
((
tn
!=
null
)
&&
(
tree
.
getSelectionPath
()
!=
null
)
&&
(
tc
!=
null
)
&&
!
tree
.
hasBeenExpanded
(
tp
)
&&
tc
.
getUserObject
()
instanceof
XttObj
&&
tn
.
getUserObject
()
instanceof
XttObjAttr
)
{
XttObj
obj
=
(
XttObj
)
tc
.
getUserObject
();
Logg
.
logg
(
"XttTree: Skall expanderas addChildrenClass"
,
1
);
addObjectInfo
(
tp
);
Logg
.
logg
(
"XttTree: Expandering klar"
,
1
);
}
else
if
((
tn
!=
null
)
&&
(
tree
.
getSelectionPath
()
!=
null
)
&&
(
tc
!=
null
)
&&
!
tree
.
hasBeenExpanded
(
tp
)
&&
tc
.
getUserObject
()
instanceof
XttObj
)
(
tc
!=
null
)
&&
!
tree
.
hasBeenExpanded
(
tp
)
&&
tc
.
getUserObject
()
instanceof
XttObj
)
{
{
XttObj
obj
=
(
XttObj
)
tc
.
getUserObject
();
XttObj
obj
=
(
XttObj
)
tc
.
getUserObject
();
Logg
.
logg
(
"XttTree: Skall expanderas
"
,
6
);
Logg
.
logg
(
"XttTree: Skall expanderas
1"
,
1
);
addChildren
(
tn
,
tc
);
addChildren
(
tn
,
tc
);
Logg
.
logg
(
"XttTree: Expandering klar"
,
6
);
Logg
.
logg
(
"XttTree: Expandering klar"
,
1
);
}
}
else
if
((
tn
!=
null
)
&&
(
tree
.
getSelectionPath
()
!=
null
)
else
if
((
tn
!=
null
)
&&
(
tree
.
getSelectionPath
()
!=
null
)
&&
tn
.
getUserObject
()
instanceof
XttObjAttr
)
&&
tn
.
getUserObject
()
instanceof
XttObjAttr
)
...
@@ -1780,7 +1841,13 @@ public class XttTree extends JPanel
...
@@ -1780,7 +1841,13 @@ public class XttTree extends JPanel
{
{
int
flags
=
((
XttObjAttr
)(
userObject
)).
flags
;
int
flags
=
((
XttObjAttr
)(
userObject
)).
flags
;
int
type
=
((
XttObjAttr
)(
userObject
)).
type
;
int
type
=
((
XttObjAttr
)(
userObject
)).
type
;
if
((
flags
&
Pwr
.
mAdef_array
)
>
0
)
if
((
flags
&
Pwr
.
mAdef_class
)
>
0
)
{
System
.
out
.
println
(
"Hittat klass i bildhittarrutin"
);
setIcon
(
ObjAttrIcon
);
}
else
if
((
flags
&
Pwr
.
mAdef_array
)
>
0
)
{
{
setIcon
(
ObjAttrArrayIcon
);
setIcon
(
ObjAttrArrayIcon
);
}
}
...
...
java/jpwr/rt/src/Gdh.java
View file @
3f0d2767
/*
/*
* Proview $Id: Gdh.java,v 1.
6 2005-11-02 14:02:20
claes Exp $
* Proview $Id: Gdh.java,v 1.
7 2005-12-06 11:17:01
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
* Copyright (C) 2005 SSAB Oxelsund AB.
*
*
* This program is free software; you can redistribute it and/or
* This program is free software; you can redistribute it and/or
...
@@ -129,17 +129,106 @@ public class Gdh {
...
@@ -129,17 +129,106 @@ public class Gdh {
// Used by applets only
// Used by applets only
return
false
;
return
false
;
}
}
public
Vector
getAllClassAttributes
(
int
classid
,
PwrtObjid
objid_obj
)
public
Vector
getAllClassAttributes
(
int
classid
,
PwrtObjid
objid_obj
)
{
{
CdhrObjAttr
attr
=
(
CdhrObjAttr
)
this
.
getClassAttribute
(
classid
,
objid_obj
);
//System.out.println("getAllClassAttributes" + classid + " " + objid_obj.oix + " " + objid_obj.vid);
//CdhrObjid co = this.classIdToObjid(classid);
String
name
=
this
.
objidToName
(
objid_obj
,
Cdh
.
mName_pathStrict
).
str
;
// fullName = this.attrRefToName( attrRef.aref, Cdh.mName_pathStrict).str;
CdhrClassId
cdhrClassId
=
this
.
getObjectClass
(
objid_obj
);
GdhrsAttrDef
[]
gdhrsAttrDefArr
=
this
.
getObjectBodyDef
(
classid
,
objid_obj
);
Vector
v
=
new
Vector
();
for
(
int
i
=
0
;
i
<
gdhrsAttrDefArr
.
length
;
i
++)
{
if
(
gdhrsAttrDefArr
[
i
]
==
null
)
break
;
//System.out.println("getAllClassAttributesFor:" + i + gdhrsAttrDefArr[i].attrName);
while
(
gdhrsAttrDefArr
[
i
].
attrName
.
startsWith
(
"Super."
))
gdhrsAttrDefArr
[
i
].
attrName
=
gdhrsAttrDefArr
[
i
].
attrName
.
substring
(
6
);
CdhrObjAttr
oa
;
if
((
gdhrsAttrDefArr
[
i
].
info
.
Flags
&
Pwr
.
mAdef_class
)
>
0
)
{
oa
=
new
CdhrObjAttr
(
this
.
nameToObjid
(
name
+
"."
+
gdhrsAttrDefArr
[
i
].
attrName
).
objid
,
gdhrsAttrDefArr
[
i
].
attrName
,
gdhrsAttrDefArr
[
i
].
typeRef
,
gdhrsAttrDefArr
[
i
].
info
.
Size
,
gdhrsAttrDefArr
[
i
].
info
.
Flags
,
gdhrsAttrDefArr
[
i
].
info
.
Elements
);
}
else
{
//System.out.println("getAllClassAttr:" + name + "." + gdhrsAttrDefArr[i].attrName);
oa
=
new
CdhrObjAttr
(
this
.
nameToObjid
(
name
+
"."
+
gdhrsAttrDefArr
[
i
].
attrName
).
objid
,
gdhrsAttrDefArr
[
i
].
attrName
,
gdhrsAttrDefArr
[
i
].
info
.
Type
,
gdhrsAttrDefArr
[
i
].
info
.
Size
,
gdhrsAttrDefArr
[
i
].
info
.
Flags
,
gdhrsAttrDefArr
[
i
].
info
.
Elements
);
}
v
.
add
(
oa
);
}
return
v
;
}
public
Vector
getAllClassAttributes
(
String
name
)
{
System
.
out
.
println
(
"getAllClassAttributes"
+
name
);
CdhrAttrRef
attrRef
=
this
.
nameToAttrRef
(
name
);
CdhrTypeId
cdhrTypeId
=
this
.
getAttrRefTid
(
attrRef
.
aref
);
GdhrsAttrDef
[]
gdhrsAttrDefArr
=
this
.
getObjectBodyDef
(
cdhrTypeId
.
getTypeId
(),
new
PwrtObjid
(
0
,
0
));
if
(
gdhrsAttrDefArr
==
null
)
{
System
.
out
.
println
(
"getAllClassAttributes(String name) gdhrsAttrDefArr == null"
);
return
this
.
getAllClassAttributes
(
this
.
getObjectClass
(
this
.
nameToObjid
(
name
).
objid
).
classId
,
this
.
nameToObjid
(
name
).
objid
);
}
Vector
v
=
new
Vector
();
Vector
v
=
new
Vector
();
while
(
attr
!=
null
)
for
(
int
i
=
0
;
i
<
gdhrsAttrDefArr
.
length
;
i
++
)
{
{
v
.
add
(
attr
);
if
(
gdhrsAttrDefArr
[
i
]
==
null
)
attr
=
this
.
getClassAttribute
(
classid
,
attr
.
objid
);
break
;
//System.out.println("getAllClassAttributesFor:" + i + gdhrsAttrDefArr[i].attrName);
while
(
gdhrsAttrDefArr
[
i
].
attrName
.
startsWith
(
"Super."
))
gdhrsAttrDefArr
[
i
].
attrName
=
gdhrsAttrDefArr
[
i
].
attrName
.
substring
(
6
);
CdhrObjAttr
oa
;
if
((
gdhrsAttrDefArr
[
i
].
info
.
Flags
&
Pwr
.
mAdef_class
)
>
0
)
{
oa
=
new
CdhrObjAttr
(
this
.
nameToObjid
(
name
+
"."
+
gdhrsAttrDefArr
[
i
].
attrName
).
objid
,
gdhrsAttrDefArr
[
i
].
attrName
,
gdhrsAttrDefArr
[
i
].
typeRef
,
gdhrsAttrDefArr
[
i
].
info
.
Size
,
gdhrsAttrDefArr
[
i
].
info
.
Flags
,
gdhrsAttrDefArr
[
i
].
info
.
Elements
);
}
else
{
//System.out.println("getAllClassAttr2:" + name + "." + gdhrsAttrDefArr[i].attrName);
oa
=
new
CdhrObjAttr
(
this
.
nameToObjid
(
name
+
"."
+
gdhrsAttrDefArr
[
i
].
attrName
).
objid
,
gdhrsAttrDefArr
[
i
].
attrName
,
gdhrsAttrDefArr
[
i
].
info
.
Type
,
gdhrsAttrDefArr
[
i
].
info
.
Size
,
gdhrsAttrDefArr
[
i
].
info
.
Flags
,
gdhrsAttrDefArr
[
i
].
info
.
Elements
);
}
v
.
add
(
oa
);
}
}
return
v
;
return
v
;
}
}
public
Vector
getAllSiblings
(
PwrtObjid
objid
)
public
Vector
getAllSiblings
(
PwrtObjid
objid
)
{
{
CdhrObjid
sibling
=
(
CdhrObjid
)
this
.
getNextSibling
(
objid
);
CdhrObjid
sibling
=
(
CdhrObjid
)
this
.
getNextSibling
(
objid
);
...
@@ -205,7 +294,6 @@ public class Gdh {
...
@@ -205,7 +294,6 @@ public class Gdh {
}
}
return
v
;
return
v
;
}
}
public
Vector
getAllXttChildren
(
PwrtObjid
objid
)
public
Vector
getAllXttChildren
(
PwrtObjid
objid
)
{
{
String
name
=
null
;
String
name
=
null
;
...
@@ -219,10 +307,12 @@ public class Gdh {
...
@@ -219,10 +307,12 @@ public class Gdh {
Vector
v
=
new
Vector
();
Vector
v
=
new
Vector
();
CdhrObjid
classObj
;
CdhrObjid
classObj
;
System
.
out
.
println
(
"getAllXttChildren"
);
cdhrObjId
=
(
CdhrObjid
)
this
.
getChild
(
objid
);
cdhrObjId
=
(
CdhrObjid
)
this
.
getChild
(
objid
);
while
(
cdhrObjId
.
oddSts
())
while
(
cdhrObjId
.
oddSts
())
{
{
//System.out.println("whilegetAllXttChildren");
cdhrClassId
=
this
.
getObjectClass
(
cdhrObjId
.
objid
);
cdhrClassId
=
this
.
getObjectClass
(
cdhrObjId
.
objid
);
if
(
cdhrClassId
.
oddSts
())
if
(
cdhrClassId
.
oddSts
())
{
{
...
@@ -259,13 +349,15 @@ public class Gdh {
...
@@ -259,13 +349,15 @@ public class Gdh {
}
}
return
v
;
return
v
;
}
}
public
Vector
refObjectInfo_Vector
(
Vector
vec
)
public
Vector
refObjectInfo_Vector
(
Vector
vec
)
{
{
Vector
retVec
=
new
Vector
();
Vector
retVec
=
new
Vector
();
for
(
int
i
=
0
;
i
<
vec
.
size
();
i
++)
for
(
int
i
=
0
;
i
<
vec
.
size
();
i
++)
{
{
//System.out.println("refObjectInfo_vector: " + (String)vec.get(i));
GdhrRefObjectInfo
ret
=
this
.
refObjectInfo
(
(
String
)
vec
.
get
(
i
)
);
GdhrRefObjectInfo
ret
=
this
.
refObjectInfo
(
(
String
)
vec
.
get
(
i
)
);
retVec
.
add
(
ret
);
retVec
.
add
(
ret
);
}
}
return
retVec
;
return
retVec
;
...
@@ -305,15 +397,18 @@ public class Gdh {
...
@@ -305,15 +397,18 @@ public class Gdh {
public
native
String
[]
getObjectRefInfoStringArray
(
int
id
,
int
typeid
,
int
size
,
int
elements
);
public
native
String
[]
getObjectRefInfoStringArray
(
int
id
,
int
typeid
,
int
size
,
int
elements
);
public
native
PwrtStatus
unrefObjectInfo
(
PwrtRefId
refid
);
public
native
PwrtStatus
unrefObjectInfo
(
PwrtRefId
refid
);
public
native
CdhrObjid
nameToObjid
(
String
objectName
);
public
native
CdhrObjid
nameToObjid
(
String
objectName
);
public
native
CdhrAttrRef
nameToAttrRef
(
String
objectName
);
public
native
CdhrAttrRef
nameToAttrRef
(
String
objectName
);
public
native
CdhrString
objidToName
(
PwrtObjid
objid
,
int
nameType
);
public
native
CdhrString
objidToName
(
PwrtObjid
objid
,
int
nameType
);
public
native
CdhrString
attrRefToName
(
PwrtAttrRef
aref
,
int
nameType
);
public
native
CdhrString
attrRefToName
(
PwrtAttrRef
aref
,
int
nameType
);
public
native
CdhrObjid
getRootList
();
public
native
CdhrObjid
getRootList
();
public
native
CdhrObjid
getNextObject
(
PwrtObjid
objid
);
public
native
CdhrObjid
getNextObject
(
PwrtObjid
objid
);
public
native
CdhrObjid
getChild
(
PwrtObjid
objid
);
public
native
CdhrObjid
getChild
(
PwrtObjid
objid
);
public
native
CdhrObjid
getParent
(
PwrtObjid
objid
);
public
native
CdhrObjid
getParent
(
PwrtObjid
objid
);
public
native
CdhrObjid
getNextSibling
(
PwrtObjid
objid
);
public
native
CdhrObjid
getNextSibling
(
PwrtObjid
objid
);
public
native
CdhrClassId
getObjectClass
(
PwrtObjid
objid
);
public
native
CdhrClassId
getObjectClass
(
PwrtObjid
objid
);
public
native
CdhrTypeId
getAttrRefTid
(
PwrtAttrRef
aref
);
public
native
CdhrTypeId
getAttrRefTid
(
PwrtAttrRef
aref
);
public
native
CdhrObjid
getClassList
(
int
classid
);
public
native
CdhrObjid
getClassList
(
int
classid
);
...
@@ -327,6 +422,8 @@ public class Gdh {
...
@@ -327,6 +422,8 @@ public class Gdh {
public
native
CdhrString
getMsg
(
int
sts
);
public
native
CdhrString
getMsg
(
int
sts
);
public
native
CdhrString
getMsgText
(
int
sts
);
public
native
CdhrString
getMsgText
(
int
sts
);
public
native
CdhrClassId
getSuperClass
(
int
classid
,
PwrtObjid
objid
);
public
native
CdhrClassId
getSuperClass
(
int
classid
,
PwrtObjid
objid
);
public
native
GdhrsAttrDef
[]
getObjectBodyDef
(
int
classid
,
PwrtObjid
objid
);
// public native GdhrGetXttObj[] getAllXttChildrenNative(PwrtObjid objid);
}
}
...
@@ -336,3 +433,7 @@ public class Gdh {
...
@@ -336,3 +433,7 @@ public class Gdh {
java/jpwr/rt/src/GdhServer.java
View file @
3f0d2767
/*
/*
* Proview $Id: GdhServer.java,v 1.1
1 2005-11-04 11:50:17
claes Exp $
* Proview $Id: GdhServer.java,v 1.1
2 2005-12-06 11:17:01
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
* Copyright (C) 2005 SSAB Oxelsund AB.
*
*
* This program is free software; you can redistribute it and/or
* This program is free software; you can redistribute it and/or
...
@@ -91,6 +91,7 @@ public class GdhServer
...
@@ -91,6 +91,7 @@ public class GdhServer
public
final
static
int
ATTRREF_TO_NAME
=
53
;
public
final
static
int
ATTRREF_TO_NAME
=
53
;
public
final
static
int
GET_ATTRREF_TID
=
54
;
public
final
static
int
GET_ATTRREF_TID
=
54
;
public
final
static
int
GET_SUPER_CLASS
=
55
;
public
final
static
int
GET_SUPER_CLASS
=
55
;
public
final
static
int
GET_ALL_CLASS_ATTRIBUTES_STRING
=
56
;
public
final
static
int
PORT
=
4445
;
public
final
static
int
PORT
=
4445
;
...
@@ -1476,13 +1477,14 @@ public class GdhServer
...
@@ -1476,13 +1477,14 @@ public class GdhServer
int
oix
=
in
.
readInt
();
int
oix
=
in
.
readInt
();
int
vid
=
in
.
readInt
();
int
vid
=
in
.
readInt
();
PwrtObjid
objid
=
new
PwrtObjid
(
oix
,
vid
);
PwrtObjid
objid
=
new
PwrtObjid
(
oix
,
vid
);
CdhrObjAttr
attr
=
(
CdhrObjAttr
)
gdh
.
getClassAttribute
(
classid
,
objid
);
Vector
v
=
gdh
.
getAllClassAttributes
(
classid
,
objid
);
Vector
v
=
new
Vector
();
//CdhrObjAttr attr = (CdhrObjAttr)gdh.getClassAttribute(classid, objid);
while
(
attr
!=
null
)
//Vector v = new Vector();
{
//while(attr != null)
v
.
add
(
attr
);
//{
attr
=
gdh
.
getClassAttribute
(
classid
,
attr
.
objid
);
// v.add(attr);
}
// attr = gdh.getClassAttribute(classid, attr.objid);
//}
out
.
writeObject
(
v
);
out
.
writeObject
(
v
);
out
.
flush
();
out
.
flush
();
}
}
...
@@ -1491,6 +1493,19 @@ public class GdhServer
...
@@ -1491,6 +1493,19 @@ public class GdhServer
System
.
out
.
println
(
"getAllClassAttributes: IO exception"
);
System
.
out
.
println
(
"getAllClassAttributes: IO exception"
);
}
}
break
;
break
;
case
GET_ALL_CLASS_ATTRIBUTES_STRING:
try
{
String
name
=
in
.
readUTF
();
Vector
v
=
gdh
.
getAllClassAttributes
(
name
);
out
.
writeObject
(
v
);
out
.
flush
();
}
catch
(
IOException
e
)
{
System
.
out
.
println
(
"getAllClassAttributesString: IO exception"
);
}
break
;
case
GET_ALL_SIBLINGS:
case
GET_ALL_SIBLINGS:
try
try
{
{
...
...
java/jpwr/rt/src/GdhrsAttrDef.java
0 → 100644
View file @
3f0d2767
/*
* Proview $Id: GdhrsAttrDef.java,v 1.1 2005-12-06 11:17:01 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program 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.
*
* This program 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 the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/**
* Title: <p>
* Description: <p>
* Copyright: <p>
* Company SSAB<p>
* @author JN
* @version 1.0
*/
package
jpwr.rt
;
import
java.io.Serializable
;
import
jpwr.rt.PwrsParInfo
;
public
class
GdhrsAttrDef
implements
Serializable
{
public
String
attrName
;
public
int
attrLevel
;
public
int
attrClass
;
public
int
flags
;
public
int
typeRef
;
public
PwrsParInfo
info
;
public
int
sts
;
public
GdhrsAttrDef
(
String
attrName
,
int
attrLevel
,
int
attrClass
,
int
flags
,
int
typeRef
,
PwrsParInfo
info
,
int
sts
)
{
this
.
attrName
=
attrName
;
this
.
attrLevel
=
attrLevel
;
this
.
attrClass
=
attrClass
;
this
.
flags
=
flags
;
this
.
info
=
info
;
this
.
typeRef
=
typeRef
;
this
.
sts
=
sts
;
}
public
boolean
evenSts
()
{
return
(
sts
%
2
==
0
);}
public
boolean
oddSts
()
{
return
(
sts
%
2
==
1
);}
public
int
getSts
()
{
return
sts
;}
}
java/jpwr/rt/src/Pwr.java
View file @
3f0d2767
/*
/*
* Proview $Id: Pwr.java,v 1.
3 2005-09-01 14:57:52
claes Exp $
* Proview $Id: Pwr.java,v 1.
4 2005-12-06 11:17:01
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
* Copyright (C) 2005 SSAB Oxelsund AB.
*
*
* This program is free software; you can redistribute it and/or
* This program is free software; you can redistribute it and/or
...
@@ -59,6 +59,10 @@ public class Pwr {
...
@@ -59,6 +59,10 @@ public class Pwr {
public
static
final
int
eTix_DeltaTime
=
28
;
public
static
final
int
eTix_DeltaTime
=
28
;
public
static
final
int
eTix_Status
=
29
;
public
static
final
int
eTix_Status
=
29
;
public
static
final
int
eTix_NetStatus
=
30
;
public
static
final
int
eTix_NetStatus
=
30
;
public
static
final
int
eTix_CastId
=
31
;
public
static
final
int
eTix_ProString
=
32
;
public
static
final
int
eTix_DisableAttr
=
33
;
public
static
final
int
eTix_DataRef
=
34
;
public
static
final
int
eType_Unknown
=
0
;
public
static
final
int
eType_Unknown
=
0
;
public
static
final
int
eType_Boolean
=
(
1
<<
16
)
+
(
1
<<
15
)
+
eTix_Boolean
;
public
static
final
int
eType_Boolean
=
(
1
<<
16
)
+
(
1
<<
15
)
+
eTix_Boolean
;
public
static
final
int
eType_Float32
=
(
1
<<
16
)
+
(
1
<<
15
)
+
eTix_Float32
;
public
static
final
int
eType_Float32
=
(
1
<<
16
)
+
(
1
<<
15
)
+
eTix_Float32
;
...
@@ -90,6 +94,10 @@ public class Pwr {
...
@@ -90,6 +94,10 @@ public class Pwr {
public
static
final
int
eType_DeltaTime
=
(
1
<<
16
)
+
(
1
<<
15
)
+
eTix_DeltaTime
;
public
static
final
int
eType_DeltaTime
=
(
1
<<
16
)
+
(
1
<<
15
)
+
eTix_DeltaTime
;
public
static
final
int
eType_Status
=
(
1
<<
16
)
+
(
1
<<
15
)
+
eTix_Status
;
public
static
final
int
eType_Status
=
(
1
<<
16
)
+
(
1
<<
15
)
+
eTix_Status
;
public
static
final
int
eType_NetStatus
=
(
1
<<
16
)
+
(
1
<<
15
)
+
eTix_NetStatus
;
public
static
final
int
eType_NetStatus
=
(
1
<<
16
)
+
(
1
<<
15
)
+
eTix_NetStatus
;
public
static
final
int
eType_CastId
=
(
1
<<
16
)
+
(
1
<<
15
)
+
eTix_CastId
;
public
static
final
int
eType_ProString
=
(
1
<<
16
)
+
(
1
<<
15
)
+
eTix_ProString
;
public
static
final
int
eType_DisableAttr
=
(
1
<<
16
)
+
(
1
<<
15
)
+
eTix_DisableAttr
;
public
static
final
int
eType_DataRef
=
(
1
<<
16
)
+
(
1
<<
15
)
+
eTix_DataRef
;
public
static
final
int
mPrv_RtRead
=
1
<<
0
;
public
static
final
int
mPrv_RtRead
=
1
<<
0
;
public
static
final
int
mPrv_RtWrite
=
1
<<
1
;
public
static
final
int
mPrv_RtWrite
=
1
<<
1
;
...
@@ -155,6 +163,13 @@ public class Pwr {
...
@@ -155,6 +163,13 @@ public class Pwr {
public
static
final
int
mAdef_noremove
=
1
<<
14
;
/* 16384 Cannot be removed, no used chkbx */
public
static
final
int
mAdef_noremove
=
1
<<
14
;
/* 16384 Cannot be removed, no used chkbx */
public
static
final
int
mAdef_rtdbref
=
1
<<
15
;
/* 32768 */
public
static
final
int
mAdef_rtdbref
=
1
<<
15
;
/* 32768 */
public
static
final
int
mAdef_private
=
1
<<
16
;
/* 65536 Private pointer, not to be displayed */
public
static
final
int
mAdef_private
=
1
<<
16
;
/* 65536 Private pointer, not to be displayed */
public
static
final
int
mAdef_class
=
1
<<
17
;
public
static
final
int
mAdef_superclass
=
1
<<
18
;
public
static
final
int
mAdef_buffer
=
1
<<
19
;
public
static
final
int
mAdef_nowbl
=
1
<<
20
;
/* Don't print to wbl file */
public
static
final
int
mAdef_alwayswbl
=
1
<<
21
;
/* Always print to wbl file */
public
static
final
int
mAdef_disableattr
=
1
<<
22
;
/* Can be disabled */
public
static
final
int
mAdef_rthide
=
1
<<
23
;
/* Hide in runtime */
}
}
...
...
java/jpwr/rt/src/PwrsParInfo.java
0 → 100644
View file @
3f0d2767
/*
* Proview $Id: PwrsParInfo.java,v 1.1 2005-12-06 11:17:01 claes Exp $
* Copyright (C) 2005 SSAB Oxelösund AB.
*
* This program 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.
*
* This program 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 the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/**
* Title: <p>
* Description: <p>
* Copyright: <p>
* Company SSAB<p>
* @author JN
* @version 1.0
*/
package
jpwr.rt
;
import
java.io.Serializable
;
public
class
PwrsParInfo
implements
Serializable
{
public
String
PgmName
;
public
int
Type
;
public
int
Offset
;
public
int
Size
;
public
int
Flags
;
public
int
Elements
;
public
int
ParamIndex
;
public
PwrsParInfo
(
String
name
,
int
type
,
int
offset
,
int
size
,
int
flags
,
int
elements
,
int
paramindex
)
{
this
.
PgmName
=
name
;
this
.
Type
=
type
;
this
.
Offset
=
offset
;
this
.
Size
=
size
;
this
.
Flags
=
flags
;
this
.
Elements
=
elements
;
this
.
ParamIndex
=
paramindex
;
}
}
java/jpwr/rt/src/jpwr_rt_Gdh.h
View file @
3f0d2767
...
@@ -84,6 +84,14 @@ JNIEXPORT jobject JNICALL Java_jpwr_rt_Gdh_getObjectInfoBoolean
...
@@ -84,6 +84,14 @@ JNIEXPORT jobject JNICALL Java_jpwr_rt_Gdh_getObjectInfoBoolean
JNIEXPORT
jobject
JNICALL
Java_jpwr_rt_Gdh_getObjectInfoString
JNIEXPORT
jobject
JNICALL
Java_jpwr_rt_Gdh_getObjectInfoString
(
JNIEnv
*
,
jobject
,
jstring
);
(
JNIEnv
*
,
jobject
,
jstring
);
/*
* Class: jpwr_rt_Gdh
* Method: getObjectInfoObjid
* Signature: (Ljava/lang/String;)Ljpwr/rt/CdhrObjid;
*/
JNIEXPORT
jobject
JNICALL
Java_jpwr_rt_Gdh_getObjectInfoObjid
(
JNIEnv
*
,
jobject
,
jstring
);
/*
/*
* Class: jpwr_rt_Gdh
* Class: jpwr_rt_Gdh
* Method: toggleObjectInfo
* Method: toggleObjectInfo
...
@@ -132,6 +140,38 @@ JNIEXPORT jint JNICALL Java_jpwr_rt_Gdh_getObjectRefInfoInt
...
@@ -132,6 +140,38 @@ JNIEXPORT jint JNICALL Java_jpwr_rt_Gdh_getObjectRefInfoInt
JNIEXPORT
jstring
JNICALL
Java_jpwr_rt_Gdh_getObjectRefInfoString
JNIEXPORT
jstring
JNICALL
Java_jpwr_rt_Gdh_getObjectRefInfoString
(
JNIEnv
*
,
jobject
,
jint
,
jint
);
(
JNIEnv
*
,
jobject
,
jint
,
jint
);
/*
* Class: jpwr_rt_Gdh
* Method: getObjectRefInfoFloatArray
* Signature: (II)[F
*/
JNIEXPORT
jfloatArray
JNICALL
Java_jpwr_rt_Gdh_getObjectRefInfoFloatArray
(
JNIEnv
*
,
jobject
,
jint
,
jint
);
/*
* Class: jpwr_rt_Gdh
* Method: getObjectRefInfoBooleanArray
* Signature: (II)[Z
*/
JNIEXPORT
jbooleanArray
JNICALL
Java_jpwr_rt_Gdh_getObjectRefInfoBooleanArray
(
JNIEnv
*
,
jobject
,
jint
,
jint
);
/*
* Class: jpwr_rt_Gdh
* Method: getObjectRefInfoIntArray
* Signature: (II)[I
*/
JNIEXPORT
jintArray
JNICALL
Java_jpwr_rt_Gdh_getObjectRefInfoIntArray
(
JNIEnv
*
,
jobject
,
jint
,
jint
);
/*
* Class: jpwr_rt_Gdh
* Method: getObjectRefInfoStringArray
* Signature: (IIII)[Ljava/lang/String;
*/
JNIEXPORT
jobjectArray
JNICALL
Java_jpwr_rt_Gdh_getObjectRefInfoStringArray
(
JNIEnv
*
,
jobject
,
jint
,
jint
,
jint
,
jint
);
/*
/*
* Class: jpwr_rt_Gdh
* Class: jpwr_rt_Gdh
* Method: unrefObjectInfo
* Method: unrefObjectInfo
...
@@ -148,6 +188,14 @@ JNIEXPORT jobject JNICALL Java_jpwr_rt_Gdh_unrefObjectInfo
...
@@ -148,6 +188,14 @@ JNIEXPORT jobject JNICALL Java_jpwr_rt_Gdh_unrefObjectInfo
JNIEXPORT
jobject
JNICALL
Java_jpwr_rt_Gdh_nameToObjid
JNIEXPORT
jobject
JNICALL
Java_jpwr_rt_Gdh_nameToObjid
(
JNIEnv
*
,
jobject
,
jstring
);
(
JNIEnv
*
,
jobject
,
jstring
);
/*
* Class: jpwr_rt_Gdh
* Method: nameToAttrRef
* Signature: (Ljava/lang/String;)Ljpwr/rt/CdhrAttrRef;
*/
JNIEXPORT
jobject
JNICALL
Java_jpwr_rt_Gdh_nameToAttrRef
(
JNIEnv
*
,
jobject
,
jstring
);
/*
/*
* Class: jpwr_rt_Gdh
* Class: jpwr_rt_Gdh
* Method: objidToName
* Method: objidToName
...
@@ -156,6 +204,14 @@ JNIEXPORT jobject JNICALL Java_jpwr_rt_Gdh_nameToObjid
...
@@ -156,6 +204,14 @@ JNIEXPORT jobject JNICALL Java_jpwr_rt_Gdh_nameToObjid
JNIEXPORT
jobject
JNICALL
Java_jpwr_rt_Gdh_objidToName
JNIEXPORT
jobject
JNICALL
Java_jpwr_rt_Gdh_objidToName
(
JNIEnv
*
,
jobject
,
jobject
,
jint
);
(
JNIEnv
*
,
jobject
,
jobject
,
jint
);
/*
* Class: jpwr_rt_Gdh
* Method: attrRefToName
* Signature: (Ljpwr/rt/PwrtAttrRef;I)Ljpwr/rt/CdhrString;
*/
JNIEXPORT
jobject
JNICALL
Java_jpwr_rt_Gdh_attrRefToName
(
JNIEnv
*
,
jobject
,
jobject
,
jint
);
/*
/*
* Class: jpwr_rt_Gdh
* Class: jpwr_rt_Gdh
* Method: getRootList
* Method: getRootList
...
@@ -180,6 +236,14 @@ JNIEXPORT jobject JNICALL Java_jpwr_rt_Gdh_getNextObject
...
@@ -180,6 +236,14 @@ JNIEXPORT jobject JNICALL Java_jpwr_rt_Gdh_getNextObject
JNIEXPORT
jobject
JNICALL
Java_jpwr_rt_Gdh_getChild
JNIEXPORT
jobject
JNICALL
Java_jpwr_rt_Gdh_getChild
(
JNIEnv
*
,
jobject
,
jobject
);
(
JNIEnv
*
,
jobject
,
jobject
);
/*
* Class: jpwr_rt_Gdh
* Method: getParent
* Signature: (Ljpwr/rt/PwrtObjid;)Ljpwr/rt/CdhrObjid;
*/
JNIEXPORT
jobject
JNICALL
Java_jpwr_rt_Gdh_getParent
(
JNIEnv
*
,
jobject
,
jobject
);
/*
/*
* Class: jpwr_rt_Gdh
* Class: jpwr_rt_Gdh
* Method: getNextSibling
* Method: getNextSibling
...
@@ -196,6 +260,14 @@ JNIEXPORT jobject JNICALL Java_jpwr_rt_Gdh_getNextSibling
...
@@ -196,6 +260,14 @@ JNIEXPORT jobject JNICALL Java_jpwr_rt_Gdh_getNextSibling
JNIEXPORT
jobject
JNICALL
Java_jpwr_rt_Gdh_getObjectClass
JNIEXPORT
jobject
JNICALL
Java_jpwr_rt_Gdh_getObjectClass
(
JNIEnv
*
,
jobject
,
jobject
);
(
JNIEnv
*
,
jobject
,
jobject
);
/*
* Class: jpwr_rt_Gdh
* Method: getAttrRefTid
* Signature: (Ljpwr/rt/PwrtAttrRef;)Ljpwr/rt/CdhrTypeId;
*/
JNIEXPORT
jobject
JNICALL
Java_jpwr_rt_Gdh_getAttrRefTid
(
JNIEnv
*
,
jobject
,
jobject
);
/*
/*
* Class: jpwr_rt_Gdh
* Class: jpwr_rt_Gdh
* Method: getClassList
* Method: getClassList
...
@@ -215,10 +287,10 @@ JNIEXPORT jobject JNICALL Java_jpwr_rt_Gdh_classIdToObjid
...
@@ -215,10 +287,10 @@ JNIEXPORT jobject JNICALL Java_jpwr_rt_Gdh_classIdToObjid
/*
/*
* Class: jpwr_rt_Gdh
* Class: jpwr_rt_Gdh
* Method: getNodeObject
* Method: getNodeObject
* Signature: ()Ljpwr/rt/CdhrObjid;
* Signature: (
I
)Ljpwr/rt/CdhrObjid;
*/
*/
JNIEXPORT
jobject
JNICALL
Java_jpwr_rt_Gdh_getNodeObject
JNIEXPORT
jobject
JNICALL
Java_jpwr_rt_Gdh_getNodeObject
(
JNIEnv
*
,
jobject
);
(
JNIEnv
*
,
jobject
,
jint
);
/*
/*
* Class: jpwr_rt_Gdh
* Class: jpwr_rt_Gdh
...
@@ -230,11 +302,11 @@ JNIEXPORT jobject JNICALL Java_jpwr_rt_Gdh_getAttributeChar
...
@@ -230,11 +302,11 @@ JNIEXPORT jobject JNICALL Java_jpwr_rt_Gdh_getAttributeChar
/*
/*
* Class: jpwr_rt_Gdh
* Class: jpwr_rt_Gdh
* Method: get
ObjectAttributes
* Method: get
ClassAttribute
* Signature: (
Ljpwr/rt/PwrtObjid;)Ljava/util/Vecto
r;
* Signature: (
ILjpwr/rt/PwrtObjid;)Ljpwr/rt/CdhrObjAtt
r;
*/
*/
JNIEXPORT
jobject
JNICALL
Java_jpwr_rt_Gdh_get
ObjectAttributes
JNIEXPORT
jobject
JNICALL
Java_jpwr_rt_Gdh_get
ClassAttribute
(
JNIEnv
*
,
jobject
,
jobject
);
(
JNIEnv
*
,
jobject
,
j
int
,
j
object
);
/*
/*
* Class: jpwr_rt_Gdh
* Class: jpwr_rt_Gdh
...
@@ -244,6 +316,54 @@ JNIEXPORT jobject JNICALL Java_jpwr_rt_Gdh_getObjectAttributes
...
@@ -244,6 +316,54 @@ JNIEXPORT jobject JNICALL Java_jpwr_rt_Gdh_getObjectAttributes
JNIEXPORT
jstring
JNICALL
Java_jpwr_rt_Gdh_translateFilename
JNIEXPORT
jstring
JNICALL
Java_jpwr_rt_Gdh_translateFilename
(
JNIEnv
*
,
jclass
,
jstring
);
(
JNIEnv
*
,
jclass
,
jstring
);
/*
* Class: jpwr_rt_Gdh
* Method: crrSignal
* Signature: (Ljava/lang/String;)Ljpwr/rt/CdhrString;
*/
JNIEXPORT
jobject
JNICALL
Java_jpwr_rt_Gdh_crrSignal
(
JNIEnv
*
,
jobject
,
jstring
);
/*
* Class: jpwr_rt_Gdh
* Method: crrObject
* Signature: (Ljava/lang/String;)Ljpwr/rt/CdhrString;
*/
JNIEXPORT
jobject
JNICALL
Java_jpwr_rt_Gdh_crrObject
(
JNIEnv
*
,
jobject
,
jstring
);
/*
* Class: jpwr_rt_Gdh
* Method: getMsg
* Signature: (I)Ljpwr/rt/CdhrString;
*/
JNIEXPORT
jobject
JNICALL
Java_jpwr_rt_Gdh_getMsg
(
JNIEnv
*
,
jobject
,
jint
);
/*
* Class: jpwr_rt_Gdh
* Method: getMsgText
* Signature: (I)Ljpwr/rt/CdhrString;
*/
JNIEXPORT
jobject
JNICALL
Java_jpwr_rt_Gdh_getMsgText
(
JNIEnv
*
,
jobject
,
jint
);
/*
* Class: jpwr_rt_Gdh
* Method: getSuperClass
* Signature: (ILjpwr/rt/PwrtObjid;)Ljpwr/rt/CdhrClassId;
*/
JNIEXPORT
jobject
JNICALL
Java_jpwr_rt_Gdh_getSuperClass
(
JNIEnv
*
,
jobject
,
jint
,
jobject
);
/*
* Class: jpwr_rt_Gdh
* Method: getObjectBodyDef
* Signature: (ILjpwr/rt/PwrtObjid;)[Ljpwr/rt/GdhrsAttrDef;
*/
JNIEXPORT
jobjectArray
JNICALL
Java_jpwr_rt_Gdh_getObjectBodyDef
(
JNIEnv
*
,
jobject
,
jint
,
jobject
);
#ifdef __cplusplus
#ifdef __cplusplus
}
}
#endif
#endif
...
...
java/jpwr/rt_client/src/Gdh.java
View file @
3f0d2767
/*
/*
* Proview $Id: Gdh.java,v 1.
8 2005-11-04 11:50:32
claes Exp $
* Proview $Id: Gdh.java,v 1.
9 2005-12-06 11:17:01
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
* Copyright (C) 2005 SSAB Oxelsund AB.
*
*
* This program is free software; you can redistribute it and/or
* This program is free software; you can redistribute it and/or
...
@@ -80,6 +80,7 @@ public class Gdh
...
@@ -80,6 +80,7 @@ public class Gdh
public
final
static
int
ATTRREF_TO_NAME
=
53
;
public
final
static
int
ATTRREF_TO_NAME
=
53
;
public
final
static
int
GET_ATTRREF_TID
=
54
;
public
final
static
int
GET_ATTRREF_TID
=
54
;
public
final
static
int
GET_SUPER_CLASS
=
55
;
public
final
static
int
GET_SUPER_CLASS
=
55
;
public
final
static
int
GET_ALL_CLASS_ATTRIBUTES_STRING
=
56
;
...
@@ -1585,6 +1586,25 @@ public class Gdh
...
@@ -1585,6 +1586,25 @@ public class Gdh
return
(
Vector
)
null
;
return
(
Vector
)
null
;
}
}
}
}
public
Vector
getAllClassAttributes
(
String
name
)
{
try
{
out
.
writeInt
(
GET_ALL_CLASS_ATTRIBUTES_STRING
);
out
.
writeUTF
(
name
);
out
.
flush
();
Vector
ret_obj
=
(
Vector
)
in
.
readObject
();
return
ret_obj
;
}
catch
(
IOException
e
)
{
return
(
Vector
)
null
;
}
catch
(
ClassNotFoundException
e
)
{
return
(
Vector
)
null
;
}
}
public
Vector
getAllSiblings
(
PwrtObjid
objid
)
public
Vector
getAllSiblings
(
PwrtObjid
objid
)
...
...
src/jpwr/jop/src/DynamicObj.java
View file @
3f0d2767
/*
/*
* Proview $Id: DynamicObj.java,v 1.
3 2005-09-01 14:57:50
claes Exp $
* Proview $Id: DynamicObj.java,v 1.
4 2005-12-06 11:17:01
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
* Copyright (C) 2005 SSAB Oxelsund AB.
*
*
* This program is free software; you can redistribute it and/or
* This program is free software; you can redistribute it and/or
...
@@ -76,7 +76,9 @@ public class DynamicObj extends TreeObj
...
@@ -76,7 +76,9 @@ public class DynamicObj extends TreeObj
obj
.
setValue
(
en
.
gdh
.
getObjectRefInfoBoolean
(
obj
.
refObj
.
id
));
obj
.
setValue
(
en
.
gdh
.
getObjectRefInfoBoolean
(
obj
.
refObj
.
id
));
break
;
break
;
default
:
default
:
Logg
.
logg
(
"getObjectRefInfoString("
+
obj
.
refObj
.
id
+
")"
,
6
);
// Logg.logg(obj.name + " getObjectRefInfoString(" + obj.refObj.id + /*" " + obj.type +*/ ")", 1);
// Logg.logg("getObjectRefInfoString: " + en.gdh.getObjectRefInfoString(obj.refObj.id, obj.type), 1);
obj
.
setValue
(
en
.
gdh
.
getObjectRefInfoString
(
obj
.
refObj
.
id
,
obj
.
type
));
obj
.
setValue
(
en
.
gdh
.
getObjectRefInfoString
(
obj
.
refObj
.
id
,
obj
.
type
));
break
;
break
;
}
}
...
...
src/jpwr/jop/src/XttObj.java
View file @
3f0d2767
/*
/*
* Proview $Id: XttObj.java,v 1.
2 2005-09-01 14:57:5
1 claes Exp $
* Proview $Id: XttObj.java,v 1.
3 2005-12-06 11:17:0
1 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
* Copyright (C) 2005 SSAB Oxelsund AB.
*
*
* This program is free software; you can redistribute it and/or
* This program is free software; you can redistribute it and/or
...
@@ -61,6 +61,9 @@ public class XttObj extends DynamicObj implements JopDynamic
...
@@ -61,6 +61,9 @@ public class XttObj extends DynamicObj implements JopDynamic
// public String name = null;
// public String name = null;
/** Description of the Field */
/** Description of the Field */
public
CdhrObjid
objId
=
null
;
public
CdhrObjid
objId
=
null
;
public
CdhrAttrRef
aref
=
null
;
/** Description of the Field */
/** Description of the Field */
public
XttRefObj
refObj
=
null
;
public
XttRefObj
refObj
=
null
;
/** Description of the Field */
/** Description of the Field */
...
@@ -179,13 +182,50 @@ public class XttObj extends DynamicObj implements JopDynamic
...
@@ -179,13 +182,50 @@ public class XttObj extends DynamicObj implements JopDynamic
s
=
this
.
fullName
+
"."
+
obj
.
name
+
suffix
;
s
=
this
.
fullName
+
"."
+
obj
.
name
+
suffix
;
obj
.
fullName
=
s
;
obj
.
fullName
=
s
;
Logg
.
logg
(
"XttObj: Name "
+
s
+
"Type "
+
this
.
className
,
6
);
Logg
.
logg
(
"XttObj: Name "
+
s
+
"Type "
+
this
.
className
,
6
);
if
((
obj
.
flags
&
Pwr
.
mAdef_array
)
>
0
)
if
(
((
obj
.
flags
&
Pwr
.
mAdef_array
)
>
0
)
&&
((
obj
.
flags
&
Pwr
.
mAdef_class
)
<=
0
)
)
{
{
Logg
.
logg
(
"XttObj: Hittat array, vad ska jag gra nu?? "
+
s
,
6
);
Logg
.
logg
(
"XttObj: Hittat array, vad ska jag gra nu?? "
+
s
,
6
);
XttArrayAttr
arrayAttr
=
new
XttArrayAttr
(
s
);
XttArrayAttr
arrayAttr
=
new
XttArrayAttr
(
s
);
DefaultMutableTreeNode
arrayChildNode
=
new
DefaultMutableTreeNode
(
arrayAttr
);
DefaultMutableTreeNode
arrayChildNode
=
new
DefaultMutableTreeNode
(
arrayAttr
);
obj
.
treeNode
.
add
(
arrayChildNode
);
obj
.
treeNode
.
add
(
arrayChildNode
);
}
}
else
if
((
obj
.
flags
&
Pwr
.
mAdef_class
)
>
0
)
{
Logg
.
logg
(
"XttObj: Hittat klass, vad ska jag gra nu?? "
+
this
.
fullName
+
" "
+
obj
.
name
,
1
);
// CdhrObjid cdhrObjid = gdh.nameToObjid(this.fullName + obj.name);
// System.out.println("nameToObjid " + cdhrObjid.getSts());
// CdhrClassId cdhrClassId = gdh.getObjectClass(cdhrObjid.objid);
/*
CdhrAttrRef aref = gdh.nameToAttrRef(this.fullName + "." + obj.name);
System.out.println("nameToAttrRef " + aref.getSts());
CdhrTypeId tid = gdh.getAttrRefTid(aref.aref);
String className = gdh.attrRefToName(aref.aref, Cdh.mName_object).str;
XttObj classObj = new XttObj(this.en.gdh,
this.en,
this.fullName + "." + obj.name,
obj.name,
className,
new CdhrObjid(aref.aref.getObjid(),aref.getSts()),
new CdhrClassId(tid.typeId, tid.sts));
System.out.println("classObj: " + classObj.hasChildren + " " + className);
*/
/*
XttObj classObj = new XttObj(this.en.gdh,
this.en,
this.fullName + obj.name,
obj.name,
"Tjofljt",
cdhrObjid,
cdhrClassId);
*/
// DefaultMutableTreeNode classChildNode = new DefaultMutableTreeNode(classObj);
// obj.treeNode.add(classChildNode);
}
//p grund av bugg i nuvarande proviewversion DataPointer borde vara PRIVATE
//p grund av bugg i nuvarande proviewversion DataPointer borde vara PRIVATE
else
if
(
obj
.
name
.
compareTo
(
"DataPointer"
)
!=
0
)
else
if
(
obj
.
name
.
compareTo
(
"DataPointer"
)
!=
0
)
{
{
...
@@ -208,15 +248,16 @@ public class XttObj extends DynamicObj implements JopDynamic
...
@@ -208,15 +248,16 @@ public class XttObj extends DynamicObj implements JopDynamic
ret
=
(
GdhrRefObjectInfo
)
retVec
.
get
(
i
);
ret
=
(
GdhrRefObjectInfo
)
retVec
.
get
(
i
);
if
(
ret
.
evenSts
())
if
(
ret
.
evenSts
())
{
{
Logg
.
logg
(
"XttObj: refObjectInfo_Vector("
+
s
+
") Error "
,
4
);
Logg
.
logg
(
"XttObj: refObjectInfo_Vector("
+
s
+
") Error "
,
1
);
}
}
//p grund av bugg i nuvarande proviewversion DataPointer borde vara PRIVATE
//p grund av bugg i nuvarande proviewversion DataPointer borde vara PRIVATE
while
(
j
<
attrVector
.
size
()
&&
while
(
j
<
attrVector
.
size
()
&&
(((
XttObjAttr
)
attrVector
.
get
(
j
)).
name
.
compareTo
(
"DataPointer"
)
==
0
||
(((
XttObjAttr
)
attrVector
.
get
(
j
)).
name
.
compareTo
(
"DataPointer"
)
==
0
||
((((
XttObjAttr
)
attrVector
.
get
(
j
)).
flags
&
Pwr
.
mAdef_array
)
>
0
)))
((((
XttObjAttr
)
attrVector
.
get
(
j
)).
flags
&
Pwr
.
mAdef_array
)
>
0
)
||
((((
XttObjAttr
)
attrVector
.
get
(
j
)).
flags
&
Pwr
.
mAdef_class
)
>
0
))
)
{
{
Logg
.
logg
(
"Hittat datapointer"
,
4
);
Logg
.
logg
(
"Hittat datapointer"
,
1
);
j
++;
j
++;
}
}
if
(
j
<
attrVector
.
size
())
if
(
j
<
attrVector
.
size
())
...
@@ -253,7 +294,8 @@ public class XttObj extends DynamicObj implements JopDynamic
...
@@ -253,7 +294,8 @@ public class XttObj extends DynamicObj implements JopDynamic
for
(
int
i
=
0
;
i
<
this
.
attrVector
.
size
();
i
++)
for
(
int
i
=
0
;
i
<
this
.
attrVector
.
size
();
i
++)
{
{
XttObjAttr
obj
=
(
XttObjAttr
)
this
.
attrVector
.
get
(
i
);
XttObjAttr
obj
=
(
XttObjAttr
)
this
.
attrVector
.
get
(
i
);
if
((
obj
.
flags
&
Pwr
.
mAdef_array
)
>
0
)
if
(
((
obj
.
flags
&
Pwr
.
mAdef_array
)
>
0
)
&&
((
obj
.
flags
&
Pwr
.
mAdef_class
)
<=
0
)
)
{
{
Enumeration
enum
=
obj
.
treeNode
.
children
();
Enumeration
enum
=
obj
.
treeNode
.
children
();
while
(
enum
.
hasMoreElements
())
while
(
enum
.
hasMoreElements
())
...
@@ -266,6 +308,22 @@ public class XttObj extends DynamicObj implements JopDynamic
...
@@ -266,6 +308,22 @@ public class XttObj extends DynamicObj implements JopDynamic
}
}
}
}
}
else
if
((
obj
.
flags
&
Pwr
.
mAdef_class
)
>
0
)
{
/*
Enumeration enum = obj.treeNode.children();
while(enum.hasMoreElements())
{
DefaultMutableTreeNode child = (DefaultMutableTreeNode)enum.nextElement();
XttArrayAttr arrayObj = (XttArrayAttr)child.getUserObject();
if(arrayObj.elements == obj.elements)
{
this.setObjectAttributeValue(arrayObj);
}
}
*/
}
}
else
if
(
obj
.
name
.
compareTo
(
"DataPointer"
)
!=
0
)
else
if
(
obj
.
name
.
compareTo
(
"DataPointer"
)
!=
0
)
{
{
...
@@ -307,8 +365,23 @@ public class XttObj extends DynamicObj implements JopDynamic
...
@@ -307,8 +365,23 @@ public class XttObj extends DynamicObj implements JopDynamic
for
(
int
i
=
0
;
i
<
attrVector
.
size
();
i
++)
for
(
int
i
=
0
;
i
<
attrVector
.
size
();
i
++)
{
{
XttObjAttr
obj
=
(
XttObjAttr
)
attrVector
.
get
(
i
);
XttObjAttr
obj
=
(
XttObjAttr
)
attrVector
.
get
(
i
);
if
((
obj
.
flags
&
Pwr
.
mAdef_array
)
>
0
)
if
(
((
obj
.
flags
&
Pwr
.
mAdef_array
)
>
0
)
&&
((
obj
.
flags
&
Pwr
.
mAdef_class
)
<=
0
)
)
{
Enumeration
enum
=
obj
.
treeNode
.
children
();
while
(
enum
.
hasMoreElements
())
{
DefaultMutableTreeNode
child
=
(
DefaultMutableTreeNode
)
enum
.
nextElement
();
XttArrayAttr
arrayObj
=
(
XttArrayAttr
)
child
.
getUserObject
();
if
(
arrayObj
.
elements
==
obj
.
elements
)
{
unref_vec
.
add
(
arrayObj
.
refObj
.
refid
);
}
}
}
else
if
((
obj
.
flags
&
Pwr
.
mAdef_class
)
>
0
)
{
{
/*
Enumeration enum = obj.treeNode.children();
Enumeration enum = obj.treeNode.children();
while(enum.hasMoreElements())
while(enum.hasMoreElements())
{
{
...
@@ -319,6 +392,7 @@ public class XttObj extends DynamicObj implements JopDynamic
...
@@ -319,6 +392,7 @@ public class XttObj extends DynamicObj implements JopDynamic
unref_vec.add(arrayObj.refObj.refid);
unref_vec.add(arrayObj.refObj.refid);
}
}
}
}
*/
}
}
//p grund av bugg i nuvarande proviewversion DataPointer borde vara PRIVATE
//p grund av bugg i nuvarande proviewversion DataPointer borde vara PRIVATE
else
if
(
obj
.
name
.
compareTo
(
"DataPointer"
)
!=
0
)
else
if
(
obj
.
name
.
compareTo
(
"DataPointer"
)
!=
0
)
...
...
src/jpwr/jop/src/XttTree.java
View file @
3f0d2767
/*
/*
* Proview $Id: XttTree.java,v 1.
8 2005-11-04 11:47:58
claes Exp $
* Proview $Id: XttTree.java,v 1.
9 2005-12-06 11:17:01
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
* Copyright (C) 2005 SSAB Oxelsund AB.
*
*
* This program is free software; you can redistribute it and/or
* This program is free software; you can redistribute it and/or
...
@@ -165,7 +165,7 @@ public class XttTree extends JPanel
...
@@ -165,7 +165,7 @@ public class XttTree extends JPanel
public
XttTree
(
JopSession
session
,
URL
url
,
Object
root
)
public
XttTree
(
JopSession
session
,
URL
url
,
Object
root
)
{
{
Logg
.
text_lbl
=
this
.
labelMessage
;
Logg
.
text_lbl
=
this
.
labelMessage
;
Logg
.
logg
(
"ver 1.9.
6
"
,
0
);
Logg
.
logg
(
"ver 1.9.
7
"
,
0
);
this
.
session
=
session
;
this
.
session
=
session
;
this
.
root
=
root
;
this
.
root
=
root
;
...
@@ -504,7 +504,9 @@ public class XttTree extends JPanel
...
@@ -504,7 +504,9 @@ public class XttTree extends JPanel
Logg
.
logg
(
"XttTree: Fre getObjectAttributes"
,
6
);
Logg
.
logg
(
"XttTree: Fre getObjectAttributes"
,
6
);
PwrtObjid
pwrobjid
=
new
PwrtObjid
(
0
,
0
);
PwrtObjid
pwrobjid
=
new
PwrtObjid
(
0
,
0
);
Vector
v
=
(
Vector
)
gdh
.
getAllClassAttributes
(
obj
.
classId
.
classId
,
pwrobjid
);
// Vector v = (Vector)gdh.getAllClassAttributes(obj.classId.classId, obj.objId.objid);
Vector
v
=
(
Vector
)
gdh
.
getAllClassAttributes
(
obj
.
fullName
);
//Vector v = (Vector)gdh.getAllClassAttributes(obj.classId.classId, pwrobjid);
Logg
.
logg
(
"XttTree: Efter getAllClassAttributes"
,
6
);
Logg
.
logg
(
"XttTree: Efter getAllClassAttributes"
,
6
);
if
(
v
==
null
)
if
(
v
==
null
)
{
{
...
@@ -514,12 +516,62 @@ public class XttTree extends JPanel
...
@@ -514,12 +516,62 @@ public class XttTree extends JPanel
Vector
xttObjAttrVec
=
new
Vector
();
Vector
xttObjAttrVec
=
new
Vector
();
for
(
int
i
=
0
;
i
<
v
.
size
();
i
++)
for
(
int
i
=
0
;
i
<
v
.
size
();
i
++)
{
{
CdhrObjAttr
cdhrobjattr
=
(
CdhrObjAttr
)
v
.
get
(
i
);
CdhrObjAttr
cdhrobjattr
=
(
CdhrObjAttr
)
v
.
get
(
i
);
/*
if(((cdhrobjattr.flags & Pwr.mAdef_class) > 0) &&
((cdhrobjattr.flags & Pwr.mAdef_array) <= 0))
*/
if
((
cdhrobjattr
.
flags
&
Pwr
.
mAdef_class
)
>
0
)
{
Logg
.
logg
(
"XttTree: Hittat klass, vad ska jag gra nu?? "
+
obj
.
fullName
+
" "
+
cdhrobjattr
.
name
,
1
);
CdhrObjid
cdhrObjid
=
gdh
.
classIdToObjid
(
cdhrobjattr
.
type
);
//System.out.println("classIdToObjid " + cdhrObjid.getSts() + " " + cdhrObjid.objid.oix + " " + cdhrObjid.objid.vid);
//CdhrClassId cdhrClassId = gdh.getObjectClass(cdhrObjid.objid);
CdhrAttrRef
aref
=
gdh
.
nameToAttrRef
(
obj
.
fullName
+
"."
+
cdhrobjattr
.
name
);
//System.out.println("nameToAttrRef " + aref.getSts());
//CdhrTypeId tid = gdh.getAttrRefTid(aref.aref);
//CdhrObjid co = gdh.classIdToObjid( tid.getTypeId() );
//System.out.println("classIdToObjid " + co.getSts()+ " " + co.objid.oix + " " + co.objid.vid);
String
className
=
gdh
.
objidToName
(
cdhrObjid
.
objid
,
Cdh
.
mName_object
).
str
;
//String className = gdh.attrRefToName(aref.aref, Cdh.mName_object).str;
XttObj
classObj
=
new
XttObj
(
this
.
engine
.
gdh
,
this
.
engine
,
obj
.
fullName
+
"."
+
cdhrobjattr
.
name
,
cdhrobjattr
.
name
,
className
,
cdhrObjid
,
// co, new CdhrObjid(aref.aref.getObjid(),aref.getSts()),
new
CdhrClassId
(
cdhrobjattr
.
type
,
1
));
System
.
out
.
println
(
"classObj: "
+
classObj
.
fullName
);
DefaultMutableTreeNode
classObjTreeNode
=
new
DefaultMutableTreeNode
(
classObj
);
classObj
.
treeNode
=
classObjTreeNode
;
tN
.
add
(
classObjTreeNode
);
if
((
cdhrobjattr
.
flags
&
Pwr
.
mAdef_array
)
>
0
)
{
classObj
.
hasChildren
=
true
;
DefaultMutableTreeNode
c
=
new
DefaultMutableTreeNode
(
new
XttObj
(
"DummyXttObj"
));
classObjTreeNode
.
add
(
c
);
}
}
else
{
XttObjAttr
xttObjAttr
=
new
XttObjAttr
(
cdhrobjattr
);
XttObjAttr
xttObjAttr
=
new
XttObjAttr
(
cdhrobjattr
);
System
.
out
.
println
(
"xttObjAttr: "
+
xttObjAttr
.
name
);
xttObjAttrVec
.
add
(
xttObjAttr
);
xttObjAttrVec
.
add
(
xttObjAttr
);
DefaultMutableTreeNode
objAttrTreeNode
=
new
DefaultMutableTreeNode
(
xttObjAttr
);
DefaultMutableTreeNode
objAttrTreeNode
=
new
DefaultMutableTreeNode
(
xttObjAttr
);
xttObjAttr
.
treeNode
=
objAttrTreeNode
;
xttObjAttr
.
treeNode
=
objAttrTreeNode
;
tN
.
add
(
objAttrTreeNode
);
tN
.
add
(
objAttrTreeNode
);
}
}
}
obj
.
addAttrVector
(
xttObjAttrVec
);
obj
.
addAttrVector
(
xttObjAttrVec
);
Logg
.
logg
(
"XttTree: Efter getObjectAttributes"
,
6
);
Logg
.
logg
(
"XttTree: Efter getObjectAttributes"
,
6
);
...
@@ -1618,12 +1670,21 @@ public class XttTree extends JPanel
...
@@ -1618,12 +1670,21 @@ public class XttTree extends JPanel
DefaultMutableTreeNode
tn
=
(
DefaultMutableTreeNode
)(
tp
.
getLastPathComponent
());
DefaultMutableTreeNode
tn
=
(
DefaultMutableTreeNode
)(
tp
.
getLastPathComponent
());
DefaultMutableTreeNode
tc
=
(
DefaultMutableTreeNode
)
tn
.
getFirstChild
();
DefaultMutableTreeNode
tc
=
(
DefaultMutableTreeNode
)
tn
.
getFirstChild
();
if
((
tn
!=
null
)
&&
(
tree
.
getSelectionPath
()
!=
null
)
&&
if
((
tn
!=
null
)
&&
(
tree
.
getSelectionPath
()
!=
null
)
&&
(
tc
!=
null
)
&&
!
tree
.
hasBeenExpanded
(
tp
)
&&
tc
.
getUserObject
()
instanceof
XttObj
&&
tn
.
getUserObject
()
instanceof
XttObjAttr
)
{
XttObj
obj
=
(
XttObj
)
tc
.
getUserObject
();
Logg
.
logg
(
"XttTree: Skall expanderas addChildrenClass"
,
1
);
addObjectInfo
(
tp
);
Logg
.
logg
(
"XttTree: Expandering klar"
,
1
);
}
else
if
((
tn
!=
null
)
&&
(
tree
.
getSelectionPath
()
!=
null
)
&&
(
tc
!=
null
)
&&
!
tree
.
hasBeenExpanded
(
tp
)
&&
tc
.
getUserObject
()
instanceof
XttObj
)
(
tc
!=
null
)
&&
!
tree
.
hasBeenExpanded
(
tp
)
&&
tc
.
getUserObject
()
instanceof
XttObj
)
{
{
XttObj
obj
=
(
XttObj
)
tc
.
getUserObject
();
XttObj
obj
=
(
XttObj
)
tc
.
getUserObject
();
Logg
.
logg
(
"XttTree: Skall expanderas
"
,
6
);
Logg
.
logg
(
"XttTree: Skall expanderas
1"
,
1
);
addChildren
(
tn
,
tc
);
addChildren
(
tn
,
tc
);
Logg
.
logg
(
"XttTree: Expandering klar"
,
6
);
Logg
.
logg
(
"XttTree: Expandering klar"
,
1
);
}
}
else
if
((
tn
!=
null
)
&&
(
tree
.
getSelectionPath
()
!=
null
)
else
if
((
tn
!=
null
)
&&
(
tree
.
getSelectionPath
()
!=
null
)
&&
tn
.
getUserObject
()
instanceof
XttObjAttr
)
&&
tn
.
getUserObject
()
instanceof
XttObjAttr
)
...
@@ -1780,7 +1841,13 @@ public class XttTree extends JPanel
...
@@ -1780,7 +1841,13 @@ public class XttTree extends JPanel
{
{
int
flags
=
((
XttObjAttr
)(
userObject
)).
flags
;
int
flags
=
((
XttObjAttr
)(
userObject
)).
flags
;
int
type
=
((
XttObjAttr
)(
userObject
)).
type
;
int
type
=
((
XttObjAttr
)(
userObject
)).
type
;
if
((
flags
&
Pwr
.
mAdef_array
)
>
0
)
if
((
flags
&
Pwr
.
mAdef_class
)
>
0
)
{
System
.
out
.
println
(
"Hittat klass i bildhittarrutin"
);
setIcon
(
ObjAttrIcon
);
}
else
if
((
flags
&
Pwr
.
mAdef_array
)
>
0
)
{
{
setIcon
(
ObjAttrArrayIcon
);
setIcon
(
ObjAttrArrayIcon
);
}
}
...
...
src/jpwr/rt/src/Gdh.java
View file @
3f0d2767
/*
/*
* Proview $Id: Gdh.java,v 1.
6 2005-11-02 14:02:20
claes Exp $
* Proview $Id: Gdh.java,v 1.
7 2005-12-06 11:17:01
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
* Copyright (C) 2005 SSAB Oxelsund AB.
*
*
* This program is free software; you can redistribute it and/or
* This program is free software; you can redistribute it and/or
...
@@ -129,17 +129,106 @@ public class Gdh {
...
@@ -129,17 +129,106 @@ public class Gdh {
// Used by applets only
// Used by applets only
return
false
;
return
false
;
}
}
public
Vector
getAllClassAttributes
(
int
classid
,
PwrtObjid
objid_obj
)
public
Vector
getAllClassAttributes
(
int
classid
,
PwrtObjid
objid_obj
)
{
{
CdhrObjAttr
attr
=
(
CdhrObjAttr
)
this
.
getClassAttribute
(
classid
,
objid_obj
);
//System.out.println("getAllClassAttributes" + classid + " " + objid_obj.oix + " " + objid_obj.vid);
//CdhrObjid co = this.classIdToObjid(classid);
String
name
=
this
.
objidToName
(
objid_obj
,
Cdh
.
mName_pathStrict
).
str
;
// fullName = this.attrRefToName( attrRef.aref, Cdh.mName_pathStrict).str;
CdhrClassId
cdhrClassId
=
this
.
getObjectClass
(
objid_obj
);
GdhrsAttrDef
[]
gdhrsAttrDefArr
=
this
.
getObjectBodyDef
(
classid
,
objid_obj
);
Vector
v
=
new
Vector
();
for
(
int
i
=
0
;
i
<
gdhrsAttrDefArr
.
length
;
i
++)
{
if
(
gdhrsAttrDefArr
[
i
]
==
null
)
break
;
//System.out.println("getAllClassAttributesFor:" + i + gdhrsAttrDefArr[i].attrName);
while
(
gdhrsAttrDefArr
[
i
].
attrName
.
startsWith
(
"Super."
))
gdhrsAttrDefArr
[
i
].
attrName
=
gdhrsAttrDefArr
[
i
].
attrName
.
substring
(
6
);
CdhrObjAttr
oa
;
if
((
gdhrsAttrDefArr
[
i
].
info
.
Flags
&
Pwr
.
mAdef_class
)
>
0
)
{
oa
=
new
CdhrObjAttr
(
this
.
nameToObjid
(
name
+
"."
+
gdhrsAttrDefArr
[
i
].
attrName
).
objid
,
gdhrsAttrDefArr
[
i
].
attrName
,
gdhrsAttrDefArr
[
i
].
typeRef
,
gdhrsAttrDefArr
[
i
].
info
.
Size
,
gdhrsAttrDefArr
[
i
].
info
.
Flags
,
gdhrsAttrDefArr
[
i
].
info
.
Elements
);
}
else
{
//System.out.println("getAllClassAttr:" + name + "." + gdhrsAttrDefArr[i].attrName);
oa
=
new
CdhrObjAttr
(
this
.
nameToObjid
(
name
+
"."
+
gdhrsAttrDefArr
[
i
].
attrName
).
objid
,
gdhrsAttrDefArr
[
i
].
attrName
,
gdhrsAttrDefArr
[
i
].
info
.
Type
,
gdhrsAttrDefArr
[
i
].
info
.
Size
,
gdhrsAttrDefArr
[
i
].
info
.
Flags
,
gdhrsAttrDefArr
[
i
].
info
.
Elements
);
}
v
.
add
(
oa
);
}
return
v
;
}
public
Vector
getAllClassAttributes
(
String
name
)
{
System
.
out
.
println
(
"getAllClassAttributes"
+
name
);
CdhrAttrRef
attrRef
=
this
.
nameToAttrRef
(
name
);
CdhrTypeId
cdhrTypeId
=
this
.
getAttrRefTid
(
attrRef
.
aref
);
GdhrsAttrDef
[]
gdhrsAttrDefArr
=
this
.
getObjectBodyDef
(
cdhrTypeId
.
getTypeId
(),
new
PwrtObjid
(
0
,
0
));
if
(
gdhrsAttrDefArr
==
null
)
{
System
.
out
.
println
(
"getAllClassAttributes(String name) gdhrsAttrDefArr == null"
);
return
this
.
getAllClassAttributes
(
this
.
getObjectClass
(
this
.
nameToObjid
(
name
).
objid
).
classId
,
this
.
nameToObjid
(
name
).
objid
);
}
Vector
v
=
new
Vector
();
Vector
v
=
new
Vector
();
while
(
attr
!=
null
)
for
(
int
i
=
0
;
i
<
gdhrsAttrDefArr
.
length
;
i
++
)
{
{
v
.
add
(
attr
);
if
(
gdhrsAttrDefArr
[
i
]
==
null
)
attr
=
this
.
getClassAttribute
(
classid
,
attr
.
objid
);
break
;
//System.out.println("getAllClassAttributesFor:" + i + gdhrsAttrDefArr[i].attrName);
while
(
gdhrsAttrDefArr
[
i
].
attrName
.
startsWith
(
"Super."
))
gdhrsAttrDefArr
[
i
].
attrName
=
gdhrsAttrDefArr
[
i
].
attrName
.
substring
(
6
);
CdhrObjAttr
oa
;
if
((
gdhrsAttrDefArr
[
i
].
info
.
Flags
&
Pwr
.
mAdef_class
)
>
0
)
{
oa
=
new
CdhrObjAttr
(
this
.
nameToObjid
(
name
+
"."
+
gdhrsAttrDefArr
[
i
].
attrName
).
objid
,
gdhrsAttrDefArr
[
i
].
attrName
,
gdhrsAttrDefArr
[
i
].
typeRef
,
gdhrsAttrDefArr
[
i
].
info
.
Size
,
gdhrsAttrDefArr
[
i
].
info
.
Flags
,
gdhrsAttrDefArr
[
i
].
info
.
Elements
);
}
else
{
//System.out.println("getAllClassAttr2:" + name + "." + gdhrsAttrDefArr[i].attrName);
oa
=
new
CdhrObjAttr
(
this
.
nameToObjid
(
name
+
"."
+
gdhrsAttrDefArr
[
i
].
attrName
).
objid
,
gdhrsAttrDefArr
[
i
].
attrName
,
gdhrsAttrDefArr
[
i
].
info
.
Type
,
gdhrsAttrDefArr
[
i
].
info
.
Size
,
gdhrsAttrDefArr
[
i
].
info
.
Flags
,
gdhrsAttrDefArr
[
i
].
info
.
Elements
);
}
v
.
add
(
oa
);
}
}
return
v
;
return
v
;
}
}
public
Vector
getAllSiblings
(
PwrtObjid
objid
)
public
Vector
getAllSiblings
(
PwrtObjid
objid
)
{
{
CdhrObjid
sibling
=
(
CdhrObjid
)
this
.
getNextSibling
(
objid
);
CdhrObjid
sibling
=
(
CdhrObjid
)
this
.
getNextSibling
(
objid
);
...
@@ -205,7 +294,6 @@ public class Gdh {
...
@@ -205,7 +294,6 @@ public class Gdh {
}
}
return
v
;
return
v
;
}
}
public
Vector
getAllXttChildren
(
PwrtObjid
objid
)
public
Vector
getAllXttChildren
(
PwrtObjid
objid
)
{
{
String
name
=
null
;
String
name
=
null
;
...
@@ -219,10 +307,12 @@ public class Gdh {
...
@@ -219,10 +307,12 @@ public class Gdh {
Vector
v
=
new
Vector
();
Vector
v
=
new
Vector
();
CdhrObjid
classObj
;
CdhrObjid
classObj
;
System
.
out
.
println
(
"getAllXttChildren"
);
cdhrObjId
=
(
CdhrObjid
)
this
.
getChild
(
objid
);
cdhrObjId
=
(
CdhrObjid
)
this
.
getChild
(
objid
);
while
(
cdhrObjId
.
oddSts
())
while
(
cdhrObjId
.
oddSts
())
{
{
//System.out.println("whilegetAllXttChildren");
cdhrClassId
=
this
.
getObjectClass
(
cdhrObjId
.
objid
);
cdhrClassId
=
this
.
getObjectClass
(
cdhrObjId
.
objid
);
if
(
cdhrClassId
.
oddSts
())
if
(
cdhrClassId
.
oddSts
())
{
{
...
@@ -259,13 +349,15 @@ public class Gdh {
...
@@ -259,13 +349,15 @@ public class Gdh {
}
}
return
v
;
return
v
;
}
}
public
Vector
refObjectInfo_Vector
(
Vector
vec
)
public
Vector
refObjectInfo_Vector
(
Vector
vec
)
{
{
Vector
retVec
=
new
Vector
();
Vector
retVec
=
new
Vector
();
for
(
int
i
=
0
;
i
<
vec
.
size
();
i
++)
for
(
int
i
=
0
;
i
<
vec
.
size
();
i
++)
{
{
//System.out.println("refObjectInfo_vector: " + (String)vec.get(i));
GdhrRefObjectInfo
ret
=
this
.
refObjectInfo
(
(
String
)
vec
.
get
(
i
)
);
GdhrRefObjectInfo
ret
=
this
.
refObjectInfo
(
(
String
)
vec
.
get
(
i
)
);
retVec
.
add
(
ret
);
retVec
.
add
(
ret
);
}
}
return
retVec
;
return
retVec
;
...
@@ -305,15 +397,18 @@ public class Gdh {
...
@@ -305,15 +397,18 @@ public class Gdh {
public
native
String
[]
getObjectRefInfoStringArray
(
int
id
,
int
typeid
,
int
size
,
int
elements
);
public
native
String
[]
getObjectRefInfoStringArray
(
int
id
,
int
typeid
,
int
size
,
int
elements
);
public
native
PwrtStatus
unrefObjectInfo
(
PwrtRefId
refid
);
public
native
PwrtStatus
unrefObjectInfo
(
PwrtRefId
refid
);
public
native
CdhrObjid
nameToObjid
(
String
objectName
);
public
native
CdhrObjid
nameToObjid
(
String
objectName
);
public
native
CdhrAttrRef
nameToAttrRef
(
String
objectName
);
public
native
CdhrAttrRef
nameToAttrRef
(
String
objectName
);
public
native
CdhrString
objidToName
(
PwrtObjid
objid
,
int
nameType
);
public
native
CdhrString
objidToName
(
PwrtObjid
objid
,
int
nameType
);
public
native
CdhrString
attrRefToName
(
PwrtAttrRef
aref
,
int
nameType
);
public
native
CdhrString
attrRefToName
(
PwrtAttrRef
aref
,
int
nameType
);
public
native
CdhrObjid
getRootList
();
public
native
CdhrObjid
getRootList
();
public
native
CdhrObjid
getNextObject
(
PwrtObjid
objid
);
public
native
CdhrObjid
getNextObject
(
PwrtObjid
objid
);
public
native
CdhrObjid
getChild
(
PwrtObjid
objid
);
public
native
CdhrObjid
getChild
(
PwrtObjid
objid
);
public
native
CdhrObjid
getParent
(
PwrtObjid
objid
);
public
native
CdhrObjid
getParent
(
PwrtObjid
objid
);
public
native
CdhrObjid
getNextSibling
(
PwrtObjid
objid
);
public
native
CdhrObjid
getNextSibling
(
PwrtObjid
objid
);
public
native
CdhrClassId
getObjectClass
(
PwrtObjid
objid
);
public
native
CdhrClassId
getObjectClass
(
PwrtObjid
objid
);
public
native
CdhrTypeId
getAttrRefTid
(
PwrtAttrRef
aref
);
public
native
CdhrTypeId
getAttrRefTid
(
PwrtAttrRef
aref
);
public
native
CdhrObjid
getClassList
(
int
classid
);
public
native
CdhrObjid
getClassList
(
int
classid
);
...
@@ -327,6 +422,8 @@ public class Gdh {
...
@@ -327,6 +422,8 @@ public class Gdh {
public
native
CdhrString
getMsg
(
int
sts
);
public
native
CdhrString
getMsg
(
int
sts
);
public
native
CdhrString
getMsgText
(
int
sts
);
public
native
CdhrString
getMsgText
(
int
sts
);
public
native
CdhrClassId
getSuperClass
(
int
classid
,
PwrtObjid
objid
);
public
native
CdhrClassId
getSuperClass
(
int
classid
,
PwrtObjid
objid
);
public
native
GdhrsAttrDef
[]
getObjectBodyDef
(
int
classid
,
PwrtObjid
objid
);
// public native GdhrGetXttObj[] getAllXttChildrenNative(PwrtObjid objid);
}
}
...
@@ -336,3 +433,7 @@ public class Gdh {
...
@@ -336,3 +433,7 @@ public class Gdh {
src/jpwr/rt/src/GdhServer.java
View file @
3f0d2767
/*
/*
* Proview $Id: GdhServer.java,v 1.1
1 2005-11-04 11:50:17
claes Exp $
* Proview $Id: GdhServer.java,v 1.1
2 2005-12-06 11:17:01
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
* Copyright (C) 2005 SSAB Oxelsund AB.
*
*
* This program is free software; you can redistribute it and/or
* This program is free software; you can redistribute it and/or
...
@@ -91,6 +91,7 @@ public class GdhServer
...
@@ -91,6 +91,7 @@ public class GdhServer
public
final
static
int
ATTRREF_TO_NAME
=
53
;
public
final
static
int
ATTRREF_TO_NAME
=
53
;
public
final
static
int
GET_ATTRREF_TID
=
54
;
public
final
static
int
GET_ATTRREF_TID
=
54
;
public
final
static
int
GET_SUPER_CLASS
=
55
;
public
final
static
int
GET_SUPER_CLASS
=
55
;
public
final
static
int
GET_ALL_CLASS_ATTRIBUTES_STRING
=
56
;
public
final
static
int
PORT
=
4445
;
public
final
static
int
PORT
=
4445
;
...
@@ -1476,13 +1477,14 @@ public class GdhServer
...
@@ -1476,13 +1477,14 @@ public class GdhServer
int
oix
=
in
.
readInt
();
int
oix
=
in
.
readInt
();
int
vid
=
in
.
readInt
();
int
vid
=
in
.
readInt
();
PwrtObjid
objid
=
new
PwrtObjid
(
oix
,
vid
);
PwrtObjid
objid
=
new
PwrtObjid
(
oix
,
vid
);
CdhrObjAttr
attr
=
(
CdhrObjAttr
)
gdh
.
getClassAttribute
(
classid
,
objid
);
Vector
v
=
gdh
.
getAllClassAttributes
(
classid
,
objid
);
Vector
v
=
new
Vector
();
//CdhrObjAttr attr = (CdhrObjAttr)gdh.getClassAttribute(classid, objid);
while
(
attr
!=
null
)
//Vector v = new Vector();
{
//while(attr != null)
v
.
add
(
attr
);
//{
attr
=
gdh
.
getClassAttribute
(
classid
,
attr
.
objid
);
// v.add(attr);
}
// attr = gdh.getClassAttribute(classid, attr.objid);
//}
out
.
writeObject
(
v
);
out
.
writeObject
(
v
);
out
.
flush
();
out
.
flush
();
}
}
...
@@ -1491,6 +1493,19 @@ public class GdhServer
...
@@ -1491,6 +1493,19 @@ public class GdhServer
System
.
out
.
println
(
"getAllClassAttributes: IO exception"
);
System
.
out
.
println
(
"getAllClassAttributes: IO exception"
);
}
}
break
;
break
;
case
GET_ALL_CLASS_ATTRIBUTES_STRING:
try
{
String
name
=
in
.
readUTF
();
Vector
v
=
gdh
.
getAllClassAttributes
(
name
);
out
.
writeObject
(
v
);
out
.
flush
();
}
catch
(
IOException
e
)
{
System
.
out
.
println
(
"getAllClassAttributesString: IO exception"
);
}
break
;
case
GET_ALL_SIBLINGS:
case
GET_ALL_SIBLINGS:
try
try
{
{
...
...
src/jpwr/rt/src/GdhrsAttrDef.java
0 → 100644
View file @
3f0d2767
/*
* Proview $Id: GdhrsAttrDef.java,v 1.1 2005-12-06 11:17:01 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program 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.
*
* This program 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 the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/**
* Title: <p>
* Description: <p>
* Copyright: <p>
* Company SSAB<p>
* @author JN
* @version 1.0
*/
package
jpwr.rt
;
import
java.io.Serializable
;
import
jpwr.rt.PwrsParInfo
;
public
class
GdhrsAttrDef
implements
Serializable
{
public
String
attrName
;
public
int
attrLevel
;
public
int
attrClass
;
public
int
flags
;
public
int
typeRef
;
public
PwrsParInfo
info
;
public
int
sts
;
public
GdhrsAttrDef
(
String
attrName
,
int
attrLevel
,
int
attrClass
,
int
flags
,
int
typeRef
,
PwrsParInfo
info
,
int
sts
)
{
this
.
attrName
=
attrName
;
this
.
attrLevel
=
attrLevel
;
this
.
attrClass
=
attrClass
;
this
.
flags
=
flags
;
this
.
info
=
info
;
this
.
typeRef
=
typeRef
;
this
.
sts
=
sts
;
}
public
boolean
evenSts
()
{
return
(
sts
%
2
==
0
);}
public
boolean
oddSts
()
{
return
(
sts
%
2
==
1
);}
public
int
getSts
()
{
return
sts
;}
}
src/jpwr/rt/src/Pwr.java
View file @
3f0d2767
/*
/*
* Proview $Id: Pwr.java,v 1.
3 2005-09-01 14:57:52
claes Exp $
* Proview $Id: Pwr.java,v 1.
4 2005-12-06 11:17:01
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
* Copyright (C) 2005 SSAB Oxelsund AB.
*
*
* This program is free software; you can redistribute it and/or
* This program is free software; you can redistribute it and/or
...
@@ -59,6 +59,10 @@ public class Pwr {
...
@@ -59,6 +59,10 @@ public class Pwr {
public
static
final
int
eTix_DeltaTime
=
28
;
public
static
final
int
eTix_DeltaTime
=
28
;
public
static
final
int
eTix_Status
=
29
;
public
static
final
int
eTix_Status
=
29
;
public
static
final
int
eTix_NetStatus
=
30
;
public
static
final
int
eTix_NetStatus
=
30
;
public
static
final
int
eTix_CastId
=
31
;
public
static
final
int
eTix_ProString
=
32
;
public
static
final
int
eTix_DisableAttr
=
33
;
public
static
final
int
eTix_DataRef
=
34
;
public
static
final
int
eType_Unknown
=
0
;
public
static
final
int
eType_Unknown
=
0
;
public
static
final
int
eType_Boolean
=
(
1
<<
16
)
+
(
1
<<
15
)
+
eTix_Boolean
;
public
static
final
int
eType_Boolean
=
(
1
<<
16
)
+
(
1
<<
15
)
+
eTix_Boolean
;
public
static
final
int
eType_Float32
=
(
1
<<
16
)
+
(
1
<<
15
)
+
eTix_Float32
;
public
static
final
int
eType_Float32
=
(
1
<<
16
)
+
(
1
<<
15
)
+
eTix_Float32
;
...
@@ -90,6 +94,10 @@ public class Pwr {
...
@@ -90,6 +94,10 @@ public class Pwr {
public
static
final
int
eType_DeltaTime
=
(
1
<<
16
)
+
(
1
<<
15
)
+
eTix_DeltaTime
;
public
static
final
int
eType_DeltaTime
=
(
1
<<
16
)
+
(
1
<<
15
)
+
eTix_DeltaTime
;
public
static
final
int
eType_Status
=
(
1
<<
16
)
+
(
1
<<
15
)
+
eTix_Status
;
public
static
final
int
eType_Status
=
(
1
<<
16
)
+
(
1
<<
15
)
+
eTix_Status
;
public
static
final
int
eType_NetStatus
=
(
1
<<
16
)
+
(
1
<<
15
)
+
eTix_NetStatus
;
public
static
final
int
eType_NetStatus
=
(
1
<<
16
)
+
(
1
<<
15
)
+
eTix_NetStatus
;
public
static
final
int
eType_CastId
=
(
1
<<
16
)
+
(
1
<<
15
)
+
eTix_CastId
;
public
static
final
int
eType_ProString
=
(
1
<<
16
)
+
(
1
<<
15
)
+
eTix_ProString
;
public
static
final
int
eType_DisableAttr
=
(
1
<<
16
)
+
(
1
<<
15
)
+
eTix_DisableAttr
;
public
static
final
int
eType_DataRef
=
(
1
<<
16
)
+
(
1
<<
15
)
+
eTix_DataRef
;
public
static
final
int
mPrv_RtRead
=
1
<<
0
;
public
static
final
int
mPrv_RtRead
=
1
<<
0
;
public
static
final
int
mPrv_RtWrite
=
1
<<
1
;
public
static
final
int
mPrv_RtWrite
=
1
<<
1
;
...
@@ -155,6 +163,13 @@ public class Pwr {
...
@@ -155,6 +163,13 @@ public class Pwr {
public
static
final
int
mAdef_noremove
=
1
<<
14
;
/* 16384 Cannot be removed, no used chkbx */
public
static
final
int
mAdef_noremove
=
1
<<
14
;
/* 16384 Cannot be removed, no used chkbx */
public
static
final
int
mAdef_rtdbref
=
1
<<
15
;
/* 32768 */
public
static
final
int
mAdef_rtdbref
=
1
<<
15
;
/* 32768 */
public
static
final
int
mAdef_private
=
1
<<
16
;
/* 65536 Private pointer, not to be displayed */
public
static
final
int
mAdef_private
=
1
<<
16
;
/* 65536 Private pointer, not to be displayed */
public
static
final
int
mAdef_class
=
1
<<
17
;
public
static
final
int
mAdef_superclass
=
1
<<
18
;
public
static
final
int
mAdef_buffer
=
1
<<
19
;
public
static
final
int
mAdef_nowbl
=
1
<<
20
;
/* Don't print to wbl file */
public
static
final
int
mAdef_alwayswbl
=
1
<<
21
;
/* Always print to wbl file */
public
static
final
int
mAdef_disableattr
=
1
<<
22
;
/* Can be disabled */
public
static
final
int
mAdef_rthide
=
1
<<
23
;
/* Hide in runtime */
}
}
...
...
src/jpwr/rt/src/PwrsParInfo.java
0 → 100644
View file @
3f0d2767
/*
* Proview $Id: PwrsParInfo.java,v 1.1 2005-12-06 11:17:01 claes Exp $
* Copyright (C) 2005 SSAB Oxelösund AB.
*
* This program 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.
*
* This program 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 the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/**
* Title: <p>
* Description: <p>
* Copyright: <p>
* Company SSAB<p>
* @author JN
* @version 1.0
*/
package
jpwr.rt
;
import
java.io.Serializable
;
public
class
PwrsParInfo
implements
Serializable
{
public
String
PgmName
;
public
int
Type
;
public
int
Offset
;
public
int
Size
;
public
int
Flags
;
public
int
Elements
;
public
int
ParamIndex
;
public
PwrsParInfo
(
String
name
,
int
type
,
int
offset
,
int
size
,
int
flags
,
int
elements
,
int
paramindex
)
{
this
.
PgmName
=
name
;
this
.
Type
=
type
;
this
.
Offset
=
offset
;
this
.
Size
=
size
;
this
.
Flags
=
flags
;
this
.
Elements
=
elements
;
this
.
ParamIndex
=
paramindex
;
}
}
src/jpwr/rt/src/jpwr_rt_Gdh.h
View file @
3f0d2767
...
@@ -84,6 +84,14 @@ JNIEXPORT jobject JNICALL Java_jpwr_rt_Gdh_getObjectInfoBoolean
...
@@ -84,6 +84,14 @@ JNIEXPORT jobject JNICALL Java_jpwr_rt_Gdh_getObjectInfoBoolean
JNIEXPORT
jobject
JNICALL
Java_jpwr_rt_Gdh_getObjectInfoString
JNIEXPORT
jobject
JNICALL
Java_jpwr_rt_Gdh_getObjectInfoString
(
JNIEnv
*
,
jobject
,
jstring
);
(
JNIEnv
*
,
jobject
,
jstring
);
/*
* Class: jpwr_rt_Gdh
* Method: getObjectInfoObjid
* Signature: (Ljava/lang/String;)Ljpwr/rt/CdhrObjid;
*/
JNIEXPORT
jobject
JNICALL
Java_jpwr_rt_Gdh_getObjectInfoObjid
(
JNIEnv
*
,
jobject
,
jstring
);
/*
/*
* Class: jpwr_rt_Gdh
* Class: jpwr_rt_Gdh
* Method: toggleObjectInfo
* Method: toggleObjectInfo
...
@@ -132,6 +140,38 @@ JNIEXPORT jint JNICALL Java_jpwr_rt_Gdh_getObjectRefInfoInt
...
@@ -132,6 +140,38 @@ JNIEXPORT jint JNICALL Java_jpwr_rt_Gdh_getObjectRefInfoInt
JNIEXPORT
jstring
JNICALL
Java_jpwr_rt_Gdh_getObjectRefInfoString
JNIEXPORT
jstring
JNICALL
Java_jpwr_rt_Gdh_getObjectRefInfoString
(
JNIEnv
*
,
jobject
,
jint
,
jint
);
(
JNIEnv
*
,
jobject
,
jint
,
jint
);
/*
* Class: jpwr_rt_Gdh
* Method: getObjectRefInfoFloatArray
* Signature: (II)[F
*/
JNIEXPORT
jfloatArray
JNICALL
Java_jpwr_rt_Gdh_getObjectRefInfoFloatArray
(
JNIEnv
*
,
jobject
,
jint
,
jint
);
/*
* Class: jpwr_rt_Gdh
* Method: getObjectRefInfoBooleanArray
* Signature: (II)[Z
*/
JNIEXPORT
jbooleanArray
JNICALL
Java_jpwr_rt_Gdh_getObjectRefInfoBooleanArray
(
JNIEnv
*
,
jobject
,
jint
,
jint
);
/*
* Class: jpwr_rt_Gdh
* Method: getObjectRefInfoIntArray
* Signature: (II)[I
*/
JNIEXPORT
jintArray
JNICALL
Java_jpwr_rt_Gdh_getObjectRefInfoIntArray
(
JNIEnv
*
,
jobject
,
jint
,
jint
);
/*
* Class: jpwr_rt_Gdh
* Method: getObjectRefInfoStringArray
* Signature: (IIII)[Ljava/lang/String;
*/
JNIEXPORT
jobjectArray
JNICALL
Java_jpwr_rt_Gdh_getObjectRefInfoStringArray
(
JNIEnv
*
,
jobject
,
jint
,
jint
,
jint
,
jint
);
/*
/*
* Class: jpwr_rt_Gdh
* Class: jpwr_rt_Gdh
* Method: unrefObjectInfo
* Method: unrefObjectInfo
...
@@ -148,6 +188,14 @@ JNIEXPORT jobject JNICALL Java_jpwr_rt_Gdh_unrefObjectInfo
...
@@ -148,6 +188,14 @@ JNIEXPORT jobject JNICALL Java_jpwr_rt_Gdh_unrefObjectInfo
JNIEXPORT
jobject
JNICALL
Java_jpwr_rt_Gdh_nameToObjid
JNIEXPORT
jobject
JNICALL
Java_jpwr_rt_Gdh_nameToObjid
(
JNIEnv
*
,
jobject
,
jstring
);
(
JNIEnv
*
,
jobject
,
jstring
);
/*
* Class: jpwr_rt_Gdh
* Method: nameToAttrRef
* Signature: (Ljava/lang/String;)Ljpwr/rt/CdhrAttrRef;
*/
JNIEXPORT
jobject
JNICALL
Java_jpwr_rt_Gdh_nameToAttrRef
(
JNIEnv
*
,
jobject
,
jstring
);
/*
/*
* Class: jpwr_rt_Gdh
* Class: jpwr_rt_Gdh
* Method: objidToName
* Method: objidToName
...
@@ -156,6 +204,14 @@ JNIEXPORT jobject JNICALL Java_jpwr_rt_Gdh_nameToObjid
...
@@ -156,6 +204,14 @@ JNIEXPORT jobject JNICALL Java_jpwr_rt_Gdh_nameToObjid
JNIEXPORT
jobject
JNICALL
Java_jpwr_rt_Gdh_objidToName
JNIEXPORT
jobject
JNICALL
Java_jpwr_rt_Gdh_objidToName
(
JNIEnv
*
,
jobject
,
jobject
,
jint
);
(
JNIEnv
*
,
jobject
,
jobject
,
jint
);
/*
* Class: jpwr_rt_Gdh
* Method: attrRefToName
* Signature: (Ljpwr/rt/PwrtAttrRef;I)Ljpwr/rt/CdhrString;
*/
JNIEXPORT
jobject
JNICALL
Java_jpwr_rt_Gdh_attrRefToName
(
JNIEnv
*
,
jobject
,
jobject
,
jint
);
/*
/*
* Class: jpwr_rt_Gdh
* Class: jpwr_rt_Gdh
* Method: getRootList
* Method: getRootList
...
@@ -180,6 +236,14 @@ JNIEXPORT jobject JNICALL Java_jpwr_rt_Gdh_getNextObject
...
@@ -180,6 +236,14 @@ JNIEXPORT jobject JNICALL Java_jpwr_rt_Gdh_getNextObject
JNIEXPORT
jobject
JNICALL
Java_jpwr_rt_Gdh_getChild
JNIEXPORT
jobject
JNICALL
Java_jpwr_rt_Gdh_getChild
(
JNIEnv
*
,
jobject
,
jobject
);
(
JNIEnv
*
,
jobject
,
jobject
);
/*
* Class: jpwr_rt_Gdh
* Method: getParent
* Signature: (Ljpwr/rt/PwrtObjid;)Ljpwr/rt/CdhrObjid;
*/
JNIEXPORT
jobject
JNICALL
Java_jpwr_rt_Gdh_getParent
(
JNIEnv
*
,
jobject
,
jobject
);
/*
/*
* Class: jpwr_rt_Gdh
* Class: jpwr_rt_Gdh
* Method: getNextSibling
* Method: getNextSibling
...
@@ -196,6 +260,14 @@ JNIEXPORT jobject JNICALL Java_jpwr_rt_Gdh_getNextSibling
...
@@ -196,6 +260,14 @@ JNIEXPORT jobject JNICALL Java_jpwr_rt_Gdh_getNextSibling
JNIEXPORT
jobject
JNICALL
Java_jpwr_rt_Gdh_getObjectClass
JNIEXPORT
jobject
JNICALL
Java_jpwr_rt_Gdh_getObjectClass
(
JNIEnv
*
,
jobject
,
jobject
);
(
JNIEnv
*
,
jobject
,
jobject
);
/*
* Class: jpwr_rt_Gdh
* Method: getAttrRefTid
* Signature: (Ljpwr/rt/PwrtAttrRef;)Ljpwr/rt/CdhrTypeId;
*/
JNIEXPORT
jobject
JNICALL
Java_jpwr_rt_Gdh_getAttrRefTid
(
JNIEnv
*
,
jobject
,
jobject
);
/*
/*
* Class: jpwr_rt_Gdh
* Class: jpwr_rt_Gdh
* Method: getClassList
* Method: getClassList
...
@@ -215,10 +287,10 @@ JNIEXPORT jobject JNICALL Java_jpwr_rt_Gdh_classIdToObjid
...
@@ -215,10 +287,10 @@ JNIEXPORT jobject JNICALL Java_jpwr_rt_Gdh_classIdToObjid
/*
/*
* Class: jpwr_rt_Gdh
* Class: jpwr_rt_Gdh
* Method: getNodeObject
* Method: getNodeObject
* Signature: ()Ljpwr/rt/CdhrObjid;
* Signature: (
I
)Ljpwr/rt/CdhrObjid;
*/
*/
JNIEXPORT
jobject
JNICALL
Java_jpwr_rt_Gdh_getNodeObject
JNIEXPORT
jobject
JNICALL
Java_jpwr_rt_Gdh_getNodeObject
(
JNIEnv
*
,
jobject
);
(
JNIEnv
*
,
jobject
,
jint
);
/*
/*
* Class: jpwr_rt_Gdh
* Class: jpwr_rt_Gdh
...
@@ -230,11 +302,11 @@ JNIEXPORT jobject JNICALL Java_jpwr_rt_Gdh_getAttributeChar
...
@@ -230,11 +302,11 @@ JNIEXPORT jobject JNICALL Java_jpwr_rt_Gdh_getAttributeChar
/*
/*
* Class: jpwr_rt_Gdh
* Class: jpwr_rt_Gdh
* Method: get
ObjectAttributes
* Method: get
ClassAttribute
* Signature: (
Ljpwr/rt/PwrtObjid;)Ljava/util/Vecto
r;
* Signature: (
ILjpwr/rt/PwrtObjid;)Ljpwr/rt/CdhrObjAtt
r;
*/
*/
JNIEXPORT
jobject
JNICALL
Java_jpwr_rt_Gdh_get
ObjectAttributes
JNIEXPORT
jobject
JNICALL
Java_jpwr_rt_Gdh_get
ClassAttribute
(
JNIEnv
*
,
jobject
,
jobject
);
(
JNIEnv
*
,
jobject
,
j
int
,
j
object
);
/*
/*
* Class: jpwr_rt_Gdh
* Class: jpwr_rt_Gdh
...
@@ -244,6 +316,54 @@ JNIEXPORT jobject JNICALL Java_jpwr_rt_Gdh_getObjectAttributes
...
@@ -244,6 +316,54 @@ JNIEXPORT jobject JNICALL Java_jpwr_rt_Gdh_getObjectAttributes
JNIEXPORT
jstring
JNICALL
Java_jpwr_rt_Gdh_translateFilename
JNIEXPORT
jstring
JNICALL
Java_jpwr_rt_Gdh_translateFilename
(
JNIEnv
*
,
jclass
,
jstring
);
(
JNIEnv
*
,
jclass
,
jstring
);
/*
* Class: jpwr_rt_Gdh
* Method: crrSignal
* Signature: (Ljava/lang/String;)Ljpwr/rt/CdhrString;
*/
JNIEXPORT
jobject
JNICALL
Java_jpwr_rt_Gdh_crrSignal
(
JNIEnv
*
,
jobject
,
jstring
);
/*
* Class: jpwr_rt_Gdh
* Method: crrObject
* Signature: (Ljava/lang/String;)Ljpwr/rt/CdhrString;
*/
JNIEXPORT
jobject
JNICALL
Java_jpwr_rt_Gdh_crrObject
(
JNIEnv
*
,
jobject
,
jstring
);
/*
* Class: jpwr_rt_Gdh
* Method: getMsg
* Signature: (I)Ljpwr/rt/CdhrString;
*/
JNIEXPORT
jobject
JNICALL
Java_jpwr_rt_Gdh_getMsg
(
JNIEnv
*
,
jobject
,
jint
);
/*
* Class: jpwr_rt_Gdh
* Method: getMsgText
* Signature: (I)Ljpwr/rt/CdhrString;
*/
JNIEXPORT
jobject
JNICALL
Java_jpwr_rt_Gdh_getMsgText
(
JNIEnv
*
,
jobject
,
jint
);
/*
* Class: jpwr_rt_Gdh
* Method: getSuperClass
* Signature: (ILjpwr/rt/PwrtObjid;)Ljpwr/rt/CdhrClassId;
*/
JNIEXPORT
jobject
JNICALL
Java_jpwr_rt_Gdh_getSuperClass
(
JNIEnv
*
,
jobject
,
jint
,
jobject
);
/*
* Class: jpwr_rt_Gdh
* Method: getObjectBodyDef
* Signature: (ILjpwr/rt/PwrtObjid;)[Ljpwr/rt/GdhrsAttrDef;
*/
JNIEXPORT
jobjectArray
JNICALL
Java_jpwr_rt_Gdh_getObjectBodyDef
(
JNIEnv
*
,
jobject
,
jint
,
jobject
);
#ifdef __cplusplus
#ifdef __cplusplus
}
}
#endif
#endif
...
...
src/jpwr/rt/src/os_linux/hw_x86/makefile
View file @
3f0d2767
...
@@ -29,6 +29,8 @@ local_java_sources = \
...
@@ -29,6 +29,8 @@ local_java_sources = \
GdhrGetAttributeChar.java
\
GdhrGetAttributeChar.java
\
GdhrGetXttObj.java
\
GdhrGetXttObj.java
\
CdhrObjAttr.java
\
CdhrObjAttr.java
\
PwrsParInfo.java
\
GdhrsAttrDef.java
\
Gdh.java
\
Gdh.java
\
Sub.java
\
Sub.java
\
SubElement.java
\
SubElement.java
\
...
...
src/jpwr/rt_client/src/Gdh.java
View file @
3f0d2767
/*
/*
* Proview $Id: Gdh.java,v 1.
8 2005-11-04 11:50:32
claes Exp $
* Proview $Id: Gdh.java,v 1.
9 2005-12-06 11:17:01
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
* Copyright (C) 2005 SSAB Oxelsund AB.
*
*
* This program is free software; you can redistribute it and/or
* This program is free software; you can redistribute it and/or
...
@@ -80,6 +80,7 @@ public class Gdh
...
@@ -80,6 +80,7 @@ public class Gdh
public
final
static
int
ATTRREF_TO_NAME
=
53
;
public
final
static
int
ATTRREF_TO_NAME
=
53
;
public
final
static
int
GET_ATTRREF_TID
=
54
;
public
final
static
int
GET_ATTRREF_TID
=
54
;
public
final
static
int
GET_SUPER_CLASS
=
55
;
public
final
static
int
GET_SUPER_CLASS
=
55
;
public
final
static
int
GET_ALL_CLASS_ATTRIBUTES_STRING
=
56
;
...
@@ -1585,6 +1586,25 @@ public class Gdh
...
@@ -1585,6 +1586,25 @@ public class Gdh
return
(
Vector
)
null
;
return
(
Vector
)
null
;
}
}
}
}
public
Vector
getAllClassAttributes
(
String
name
)
{
try
{
out
.
writeInt
(
GET_ALL_CLASS_ATTRIBUTES_STRING
);
out
.
writeUTF
(
name
);
out
.
flush
();
Vector
ret_obj
=
(
Vector
)
in
.
readObject
();
return
ret_obj
;
}
catch
(
IOException
e
)
{
return
(
Vector
)
null
;
}
catch
(
ClassNotFoundException
e
)
{
return
(
Vector
)
null
;
}
}
public
Vector
getAllSiblings
(
PwrtObjid
objid
)
public
Vector
getAllSiblings
(
PwrtObjid
objid
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment