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
d346aed5
Commit
d346aed5
authored
Feb 21, 2003
by
ml
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
parent
38ad685d
Changes
37
Hide whitespace changes
Inline
Side-by-side
Showing
37 changed files
with
393 additions
and
238 deletions
+393
-238
src/exp/inc/src/pwr.h
src/exp/inc/src/pwr.h
+9
-0
src/exp/inc/src/pwr_class.h
src/exp/inc/src/pwr_class.h
+10
-1
src/lib/co/src/co_cdh.h
src/lib/co/src/co_cdh.h
+1
-9
src/lib/co/src/co_dbs.c
src/lib/co/src/co_dbs.c
+3
-3
src/lib/co/src/co_dbs.pdr
src/lib/co/src/co_dbs.pdr
+1
-1
wb/lib/wb/src/wb_adef.cpp
wb/lib/wb/src/wb_adef.cpp
+1
-1
wb/lib/wb/src/wb_adef.h
wb/lib/wb/src/wb_adef.h
+1
-1
wb/lib/wb/src/wb_adrep.cpp
wb/lib/wb/src/wb_adrep.cpp
+9
-8
wb/lib/wb/src/wb_adrep.h
wb/lib/wb/src/wb_adrep.h
+7
-4
wb/lib/wb/src/wb_attribute.cpp
wb/lib/wb/src/wb_attribute.cpp
+138
-19
wb/lib/wb/src/wb_attribute.h
wb/lib/wb/src/wb_attribute.h
+18
-8
wb/lib/wb/src/wb_bdef.cpp
wb/lib/wb/src/wb_bdef.cpp
+5
-5
wb/lib/wb/src/wb_bdef.h
wb/lib/wb/src/wb_bdef.h
+4
-5
wb/lib/wb/src/wb_bdrep.cpp
wb/lib/wb/src/wb_bdrep.cpp
+14
-3
wb/lib/wb/src/wb_bdrep.h
wb/lib/wb/src/wb_bdrep.h
+5
-6
wb/lib/wb/src/wb_cdef.cpp
wb/lib/wb/src/wb_cdef.cpp
+2
-2
wb/lib/wb/src/wb_cdef.h
wb/lib/wb/src/wb_cdef.h
+1
-1
wb/lib/wb/src/wb_cdrep.cpp
wb/lib/wb/src/wb_cdrep.cpp
+4
-4
wb/lib/wb/src/wb_cdrep.h
wb/lib/wb/src/wb_cdrep.h
+6
-7
wb/lib/wb/src/wb_destination.h
wb/lib/wb/src/wb_destination.h
+0
-2
wb/lib/wb/src/wb_merep.cpp
wb/lib/wb/src/wb_merep.cpp
+3
-2
wb/lib/wb/src/wb_merep.h
wb/lib/wb/src/wb_merep.h
+1
-1
wb/lib/wb/src/wb_mvrep.cpp
wb/lib/wb/src/wb_mvrep.cpp
+1
-0
wb/lib/wb/src/wb_mvrep.h
wb/lib/wb/src/wb_mvrep.h
+6
-4
wb/lib/wb/src/wb_object.cpp
wb/lib/wb/src/wb_object.cpp
+18
-2
wb/lib/wb/src/wb_object.h
wb/lib/wb/src/wb_object.h
+4
-0
wb/lib/wb/src/wb_tdrep.cpp
wb/lib/wb/src/wb_tdrep.cpp
+2
-2
wb/lib/wb/src/wb_volume.cpp
wb/lib/wb/src/wb_volume.cpp
+0
-12
wb/lib/wb/src/wb_volume.h
wb/lib/wb/src/wb_volume.h
+0
-3
wb/lib/wb/src/wb_vrep.h
wb/lib/wb/src/wb_vrep.h
+4
-4
wb/lib/wb/src/wb_vrepdb.cpp
wb/lib/wb/src/wb_vrepdb.cpp
+9
-9
wb/lib/wb/src/wb_vrepdb.h
wb/lib/wb/src/wb_vrepdb.h
+7
-7
wb/lib/wb/src/wb_vrepdbs.cpp
wb/lib/wb/src/wb_vrepdbs.cpp
+8
-8
wb/lib/wb/src/wb_vrepdbs.h
wb/lib/wb/src/wb_vrepdbs.h
+4
-4
wb/lib/wb/src/wb_vrepwbl.cpp
wb/lib/wb/src/wb_vrepwbl.cpp
+36
-36
wb/lib/wb/src/wb_vrepwbl.h
wb/lib/wb/src/wb_vrepwbl.h
+16
-19
wb/lib/wb/src/wb_wblnode.cpp
wb/lib/wb/src/wb_wblnode.cpp
+35
-35
No files found.
src/exp/inc/src/pwr.h
View file @
d346aed5
...
...
@@ -111,6 +111,15 @@ typedef pwr_tOix pwr_tObjectIx;
typedef
unsigned
int
pwr_tMask
;
typedef
unsigned
int
pwr_tEnum
;
typedef
enum
{
pwr_eBix__
=
0
,
pwr_eBix_sys
=
1
,
pwr_eBix_rt
=
1
,
pwr_eBix_dev
=
2
,
pwr_eBix_template
=
7
,
pwr_eBix_
}
pwr_eBix
;
typedef
struct
{
pwr_tOix
oix
;
pwr_tVid
vid
;
...
...
src/exp/inc/src/pwr_class.h
View file @
d346aed5
...
...
@@ -582,7 +582,10 @@ union pwr_m_Adef {
pwr_Bits
(
rtdbref
,
1
),
pwr_Bits
(
privatepointer
,
1
),
pwr_Bits
(
fill_0
,
7
),,,,,,,
pwr_Bits
(
isclass
,
1
),
/* class is a reserved word */
pwr_Bits
(
subclass
,
1
),
pwr_Bits
(
buffer
,
1
),
pwr_Bits
(
fill_0
,
4
),,,,
pwr_Bits
(
fill_1
,
8
),,,,,,,
)
b
;
...
...
@@ -604,6 +607,9 @@ union pwr_m_Adef {
#define pwr_mAdef_noremove pwr_Bit(14)
/* 16384 Cannot be removed, no used chkbx */
#define pwr_mAdef_rtdbref pwr_Bit(15)
/* 32768 */
#define pwr_mAdef_private pwr_Bit(16)
/* 65536 Private pointer, not to be displayed */
#define pwr_mAdef_class pwr_Bit(17)
#define pwr_mAdef_subclass pwr_Bit(18)
#define pwr_mAdef_buffer pwr_Bit(19)
};
#define PWR_MASK_POINTER pwr_mAdef_pointer
...
...
@@ -624,6 +630,9 @@ union pwr_m_Adef {
#define PWR_MASK_NOREMOVE pwr_mAdef_noremove
#define PWR_MASK_RTDBREF pwr_mAdef_rtdbref
#define PWR_MASK_PRIVATE pwr_mAdef_private
#define PWR_MASK_CLASS pwr_mAdef_class
#define PWR_MASK_SUBCLASS pwr_mAdef_subclass
#define PWR_MASK_BUFFER pwr_mAdef_buffer
struct
pwr_s_Param
{
...
...
src/lib/co/src/co_cdh.h
View file @
d346aed5
...
...
@@ -38,14 +38,6 @@ typedef enum {
cdh_eVid3_qid
=
130
}
cdh_eVId3
;
typedef
enum
{
cdh_eBix__
=
0
,
cdh_eBix_sys
=
1
,
cdh_eBix_rt
=
1
,
cdh_eBix_dev
=
2
,
cdh_eBix_template
=
7
,
cdh_eBix_
}
cdh_eBix
;
#define cdh_CidToVid(cid) ((cid) >> 16)
#define cdh_TidToVid(tid) ((tid) >> 16)
...
...
@@ -53,7 +45,7 @@ typedef enum {
#define cdh_tixToTid( Vid, Tyg, Tix) (0 + (Vid << 16) + (1 << 15) + (Tyg << 11) + Tix)
#define cdh_cixToOix( Cix, Bix, Aix) (0 + (1 << 31) + (Cix << 18) + (Bix << 15) + Aix)
#define cdh_tixToOix( Tyg, Tix) (0 + (1 << 31) + (1 << 30) + (Tyg << 26) + (Tix << 15))
#define cdh_oixToBix( Oix) ((
Oix >> 15) & 7
)
#define cdh_oixToBix( Oix) ((
pwr_eBix)((Oix >> 15) & 7)
)
#define cdh_oixToCix( Oix) ((Oix >> 18) & 0xfff)
#define cdh_oixToAix( Oix) (Oix & 0xfff)
...
...
src/lib/co/src/co_dbs.c
View file @
d346aed5
...
...
@@ -918,15 +918,15 @@ dbs_Object(pwr_tStatus *sts, const dbs_sEnv *ep)
}
void
*
dbs_Body
(
pwr_tStatus
*
sts
,
const
dbs_sEnv
*
ep
,
dbs_sObject
*
op
,
cdh
_eBix
bix
)
dbs_Body
(
pwr_tStatus
*
sts
,
const
dbs_sEnv
*
ep
,
dbs_sObject
*
op
,
pwr
_eBix
bix
)
{
char
*
p
=
NULL
;
switch
(
bix
)
{
case
cdh
_eBix_rt
:
case
pwr
_eBix_rt
:
p
=
dbs_Address
(
sts
,
ep
,
op
->
rbody
.
ref
);
break
;
case
cdh
_eBix_dev
:
case
pwr
_eBix_dev
:
p
=
dbs_Address
(
sts
,
ep
,
op
->
dbody
.
ref
);
break
;
default:
...
...
src/lib/co/src/co_dbs.pdr
View file @
d346aed5
...
...
@@ -606,7 +606,7 @@ struct dbs_sScObject {
%dbs_sObject *dbs_VolumeObject(pwr_tStatus *sts, const dbs_sEnv *ep);
%dbs_sObject *dbs_Object(pwr_tStatus *sts, const dbs_sEnv *ep);
%void dbs_ObjectToName(pwr_tStatus *sts, const dbs_sEnv *ep, dbs_sObject *op, char *name);
%void *dbs_Body(pwr_tStatus *sts, const dbs_sEnv *ep, dbs_sObject *op,
cdh
_eBix bix);
%void *dbs_Body(pwr_tStatus *sts, const dbs_sEnv *ep, dbs_sObject *op,
pwr
_eBix bix);
%
%
%#ifdef __cplusplus
...
...
wb/lib/wb/src/wb_adef.cpp
View file @
d346aed5
...
...
@@ -113,7 +113,7 @@ pwr_tCid wb_adef::cid()
return
m_adrep
->
cid
();
}
pwr_
tO
ix
wb_adef
::
bix
()
pwr_
eB
ix
wb_adef
::
bix
()
{
check
();
return
m_adrep
->
bix
();
...
...
wb/lib/wb/src/wb_adef.h
View file @
d346aed5
...
...
@@ -42,7 +42,7 @@ public:
pwr_tOid
aoid
();
pwr_tAix
aix
();
pwr_tCid
cid
();
pwr_
tO
ix
bix
();
pwr_
eB
ix
bix
();
pwr_tOid
boid
();
wb_adef
next
();
...
...
wb/lib/wb/src/wb_adrep.cpp
View file @
d346aed5
...
...
@@ -26,7 +26,7 @@ wb_adrep::wb_adrep( wb_orepdbs& o): m_nRef(0), m_orep(&o), m_sts(LDH__SUCCESS),
{
pwr_sParam
attr
;
m_orep
->
m_vrep
->
readBody
(
&
sts
,
m_orep
,
cdh
_eBix_sys
,
(
void
*
)
&
attr
);
m_orep
->
m_vrep
->
readBody
(
&
sts
,
m_orep
,
pwr
_eBix_sys
,
(
void
*
)
&
attr
);
if
(
EVEN
(
sts
))
throw
wb_error
(
sts
);
strcpy
(
m_pgmname
,
attr
.
Info
.
PgmName
);
...
...
@@ -45,7 +45,7 @@ wb_adrep::wb_adrep( wb_orepdbs& o): m_nRef(0), m_orep(&o), m_sts(LDH__SUCCESS),
{
pwr_sIntern
attr
;
m_orep
->
m_vrep
->
readBody
(
&
sts
,
m_orep
,
cdh
_eBix_sys
,
(
void
*
)
&
attr
);
m_orep
->
m_vrep
->
readBody
(
&
sts
,
m_orep
,
pwr
_eBix_sys
,
(
void
*
)
&
attr
);
if
(
EVEN
(
sts
))
throw
wb_error
(
sts
);
strcpy
(
m_pgmname
,
attr
.
Info
.
PgmName
);
...
...
@@ -64,7 +64,7 @@ wb_adrep::wb_adrep( wb_orepdbs& o): m_nRef(0), m_orep(&o), m_sts(LDH__SUCCESS),
{
pwr_sObjXRef
attr
;
m_orep
->
m_vrep
->
readBody
(
&
sts
,
m_orep
,
cdh
_eBix_sys
,
(
void
*
)
&
attr
);
m_orep
->
m_vrep
->
readBody
(
&
sts
,
m_orep
,
pwr
_eBix_sys
,
(
void
*
)
&
attr
);
if
(
EVEN
(
sts
))
throw
wb_error
(
sts
);
strcpy
(
m_pgmname
,
attr
.
Info
.
PgmName
);
...
...
@@ -82,7 +82,7 @@ wb_adrep::wb_adrep( wb_orepdbs& o): m_nRef(0), m_orep(&o), m_sts(LDH__SUCCESS),
{
pwr_sAttrXRef
attr
;
m_orep
->
m_vrep
->
readBody
(
&
sts
,
m_orep
,
cdh
_eBix_sys
,
(
void
*
)
&
attr
);
m_orep
->
m_vrep
->
readBody
(
&
sts
,
m_orep
,
pwr
_eBix_sys
,
(
void
*
)
&
attr
);
if
(
EVEN
(
sts
))
throw
wb_error
(
sts
);
strcpy
(
m_pgmname
,
attr
.
Info
.
PgmName
);
...
...
@@ -100,7 +100,7 @@ wb_adrep::wb_adrep( wb_orepdbs& o): m_nRef(0), m_orep(&o), m_sts(LDH__SUCCESS),
{
pwr_sBuffer
attr
;
m_orep
->
m_vrep
->
readBody
(
&
sts
,
m_orep
,
cdh
_eBix_sys
,
(
void
*
)
&
attr
);
m_orep
->
m_vrep
->
readBody
(
&
sts
,
m_orep
,
pwr
_eBix_sys
,
(
void
*
)
&
attr
);
if
(
EVEN
(
sts
))
throw
wb_error
(
sts
);
strcpy
(
m_pgmname
,
attr
.
Info
.
PgmName
);
...
...
@@ -110,6 +110,7 @@ wb_adrep::wb_adrep( wb_orepdbs& o): m_nRef(0), m_orep(&o), m_sts(LDH__SUCCESS),
m_elements
=
attr
.
Info
.
Elements
;
m_paramindex
=
attr
.
Info
.
ParamIndex
;
m_flags
=
attr
.
Info
.
Flags
;
m_flags
|=
PWR_MASK_BUFFER
;
m_tid
=
0
;
m_bufferClass
=
attr
.
Class
;
...
...
@@ -165,9 +166,9 @@ int wb_adrep::aix()
return
cdh_oixToAix
(
m_orep
->
oid
().
oix
);
}
cdh
_eBix
wb_adrep
::
bix
()
pwr
_eBix
wb_adrep
::
bix
()
{
return
(
cdh
_eBix
)
cdh_oixToBix
(
m_orep
->
oid
().
oix
);
return
(
pwr
_eBix
)
cdh_oixToBix
(
m_orep
->
oid
().
oix
);
}
pwr_sAttrRef
wb_adrep
::
aref
()
...
...
@@ -247,5 +248,5 @@ void *wb_adrep::body( void *p)
throw
wb_error
(
LDH__NYI
);
}
return
m_orep
->
m_vrep
->
readBody
(
&
sts
,
m_orep
,
cdh
_eBix_sys
,
p
);
return
m_orep
->
m_vrep
->
readBody
(
&
sts
,
m_orep
,
pwr
_eBix_sys
,
p
);
}
wb/lib/wb/src/wb_adrep.h
View file @
d346aed5
#ifndef wb_adrep_h
#define wb_adrep_h
#include "pwr.h"
#include "wb_cdrep.h"
#include "wb_bdrep.h"
#include "pwr_class.h"
#include "co_cdh.h"
#include "wb_name.h"
class
wb_bdrep
;
class
wb_cdrep
;
class
wb_orepdbs
;
class
wb_vrep
;
...
...
@@ -49,7 +52,7 @@ class wb_adrep
pwr_tOid
aoid
();
int
aix
();
pwr_tCid
cid
();
cdh
_eBix
bix
();
pwr
_eBix
bix
();
int
flags
()
{
return
m_flags
;}
pwr_tOid
boid
();
pwr_eClass
bufferClass
()
{
return
m_bufferClass
;}
...
...
wb/lib/wb/src/wb_attribute.cpp
View file @
d346aed5
...
...
@@ -8,14 +8,14 @@
wb_attribute
::
wb_attribute
()
:
wb_status
(
LDH__NOSUCHATTR
),
m_orep
(
0
),
m_adrep
(
0
),
m_size
(
0
),
m_offset
(
0
),
m_tid
(
0
),
m_elements
(
0
),
m_type
(
pwr_eType_
),
m_flags
(
0
)
m_type
(
pwr_eType_
),
m_flags
(
0
)
,
m_bix
(
pwr_eBix__
)
{
}
wb_attribute
::
wb_attribute
(
const
wb_attribute
&
x
)
:
wb_status
(
x
.
m_sts
),
m_orep
(
x
.
m_orep
),
m_adrep
(
x
.
m_adrep
),
m_size
(
x
.
m_size
),
m_offset
(
x
.
m_offset
),
m_tid
(
x
.
m_tid
),
m_elements
(
x
.
m_elements
),
m_type
(
x
.
m_type
),
m_flags
(
x
.
m_flags
)
m_flags
(
x
.
m_flags
)
,
m_bix
(
x
.
m_bix
)
{
if
(
m_orep
)
m_orep
->
ref
();
...
...
@@ -23,9 +23,9 @@ wb_attribute::wb_attribute(const wb_attribute& x) :
m_adrep
->
ref
();
}
wb_attribute
::
wb_attribute
(
pwr_tStatus
sts
,
wb_orep
*
const
orep
)
:
wb_attribute
::
wb_attribute
(
pwr_tStatus
sts
,
wb_orep
*
orep
)
:
wb_status
(
sts
),
m_orep
(
orep
),
m_adrep
(
0
),
m_size
(
0
),
m_offset
(
0
),
m_tid
(
0
),
m_elements
(
0
),
m_type
(
pwr_eType_
),
m_flags
(
0
)
m_elements
(
0
),
m_type
(
pwr_eType_
),
m_flags
(
0
)
,
m_bix
(
pwr_eBix__
)
{
if
(
orep
==
0
)
m_sts
=
LDH__NOSUCHATTR
;
...
...
@@ -36,9 +36,9 @@ wb_attribute::wb_attribute(pwr_tStatus sts, wb_orep * const orep) :
}
}
wb_attribute
::
wb_attribute
(
pwr_tStatus
sts
,
wb_orep
*
const
orep
,
wb_adrep
*
const
adrep
)
:
wb_attribute
::
wb_attribute
(
pwr_tStatus
sts
,
wb_orep
*
orep
,
wb_adrep
*
adrep
)
:
wb_status
(
sts
),
m_orep
(
orep
),
m_adrep
(
adrep
),
m_size
(
0
),
m_offset
(
0
),
m_tid
(
0
),
m_elements
(
0
),
m_type
(
pwr_eType_
),
m_flags
(
0
)
m_elements
(
0
),
m_type
(
pwr_eType_
),
m_flags
(
0
)
,
m_bix
(
pwr_eBix__
)
{
if
(
orep
==
0
)
m_sts
=
LDH__NOSUCHATTR
;
...
...
@@ -60,9 +60,9 @@ wb_attribute::wb_attribute(pwr_tStatus sts, wb_orep * const orep, wb_adrep * con
}
}
wb_attribute
::
wb_attribute
(
pwr_tStatus
sts
,
wb_orep
*
const
orep
,
const
char
*
bname
)
:
wb_attribute
::
wb_attribute
(
pwr_tStatus
sts
,
wb_orep
*
orep
,
const
char
*
bname
)
:
wb_status
(
sts
),
m_orep
(
orep
),
m_adrep
(
0
),
m_size
(
0
),
m_offset
(
0
),
m_tid
(
0
),
m_elements
(
0
),
m_type
(
pwr_eType_
),
m_flags
(
0
)
m_elements
(
0
),
m_type
(
pwr_eType_
),
m_flags
(
0
)
,
m_bix
(
pwr_eBix__
)
{
if
(
orep
==
0
)
m_sts
=
LDH__NOSUCHATTR
;
...
...
@@ -81,9 +81,9 @@ wb_attribute::wb_attribute(pwr_tStatus sts, wb_orep * const orep, const char *bn
}
}
wb_attribute
::
wb_attribute
(
pwr_tStatus
sts
,
wb_orep
*
const
orep
,
char
const
*
bname
,
const
char
*
aname
)
:
wb_attribute
::
wb_attribute
(
pwr_tStatus
sts
,
wb_orep
*
orep
,
char
const
*
bname
,
const
char
*
aname
)
:
wb_status
(
sts
),
m_orep
(
orep
),
m_adrep
(
0
),
m_size
(
0
),
m_offset
(
0
),
m_tid
(
0
),
m_elements
(
0
),
m_type
(
pwr_eType_
),
m_flags
(
0
)
m_elements
(
0
),
m_type
(
pwr_eType_
),
m_flags
(
0
)
,
m_bix
(
pwr_eBix__
)
{
if
(
orep
==
0
)
m_sts
=
LDH__NOSUCHATTR
;
...
...
@@ -120,6 +120,76 @@ wb_attribute::wb_attribute(pwr_tStatus sts, wb_orep * const orep, char const *bn
}
}
wb_attribute
::
wb_attribute
(
wb_attribute
&
pa
,
int
idx
,
const
char
*
aname
)
:
wb_status
(
LDH__NOSUCHATTR
),
m_orep
(
0
),
m_adrep
(
0
),
m_size
(
0
),
m_offset
(
0
),
m_tid
(
0
),
m_elements
(
0
),
m_type
(
pwr_eType_
),
m_flags
(
0
),
m_bix
(
pwr_eBix__
)
{
pwr_tCid
cid
;
wb_attrname
n
;
if
(
!
pa
.
isClass
()
||
pa
.
m_orep
==
0
)
return
;
if
(
idx
<
0
||
idx
>=
pa
.
m_elements
)
throw
wb_error_str
(
"Invalid subscript"
);
if
(
!
(
pa
.
m_flags
&
PWR_MASK_BUFFER
))
throw
wb_error_str
(
"Only $Buffer is supported as sub class"
);
cid
=
pa
.
bufferClass
();
m_orep
=
pa
.
m_orep
;
wb_cdrep
*
cd
=
m_orep
->
vrep
()
->
merep
()
->
cdrep
(
&
m_sts
,
cid
);
if
(
oddSts
())
{
wb_bdrep
*
bd
=
cd
->
bdrep
(
&
m_sts
,
pwr_eBix_sys
);
if
(
oddSts
())
{
if
(
aname
!=
0
){
n
=
aname
;
m_adrep
=
bd
->
adrep
(
&
m_sts
,
n
.
attribute
(
0
));
}
else
{
m_adrep
=
bd
->
adrep
(
&
m_sts
);
if
(
oddSts
())
n
=
m_adrep
->
name
();
}
if
(
oddSts
())
{
m_adrep
->
ref
();
if
(
!
m_orep
->
vrep
()
->
merep
()
->
getAttrInfoRec
(
&
n
,
m_adrep
->
bix
(),
cid
,
(
int
*
)
&
m_size
,
&
m_offset
,
&
m_tid
,
&
m_elements
,
&
m_type
,
&
m_flags
,
0
))
{
m_adrep
->
unref
();
m_sts
=
LDH__NOSUCHATTR
;
}
else
{
m_offset
=
pa
.
m_offset
+
idx
*
pa
.
m_size
/
pa
.
m_elements
;
}
}
}
if
(
bd
)
delete
bd
;
delete
cd
;
}
if
(
oddSts
())
{
m_orep
->
ref
();
m_flags
|=
PWR_MASK_SUBCLASS
;
if
(
pa
.
m_flags
&
PWR_MASK_SUBCLASS
)
m_bix
=
pa
.
m_bix
;
else
m_bix
=
pa
.
m_adrep
->
bix
();
}
else
{
m_adrep
=
0
;
m_orep
=
0
;
}
}
wb_attribute
::~
wb_attribute
()
{
if
(
m_orep
)
...
...
@@ -147,6 +217,8 @@ wb_attribute& wb_attribute::operator=(const wb_attribute& x)
m_elements
=
x
.
m_elements
;
m_type
=
x
.
m_type
;
m_flags
=
x
.
m_flags
;
m_bix
=
x
.
m_bix
;
return
*
this
;
}
...
...
@@ -219,9 +291,11 @@ pwr_tCid wb_attribute::cid()
return
m_orep
->
cid
();
}
pwr_
tA
ix
wb_attribute
::
bix
()
pwr_
eB
ix
wb_attribute
::
bix
()
{
return
0
;
// Fix
throw
wb_error_str
(
"wb_attribute::bix() NYI"
);
return
pwr_eBix__
;
// Fix
}
pwr_tOid
wb_attribute
::
boid
()
...
...
@@ -255,14 +329,20 @@ pwr_sObjXRef *wb_attribute::oxref()
void
*
wb_attribute
::
value
(
void
*
p
)
{
pwr_eBix
bix
;
pwr_tStatus
sts
;
check
();
if
(
m_adrep
==
0
)
{
return
m_orep
->
vrep
()
->
readBody
(
&
sts
,
m_orep
,
cdh
_eBix_rt
,
p
);
return
m_orep
->
vrep
()
->
readBody
(
&
sts
,
m_orep
,
pwr
_eBix_rt
,
p
);
}
return
m_orep
->
vrep
()
->
readAttribute
(
&
sts
,
m_orep
,
(
cdh_eBix
)
m_adrep
->
bix
(),
m_offset
,
m_size
,
p
);
if
(
m_flags
&
PWR_MASK_SUBCLASS
)
bix
=
m_bix
;
else
bix
=
m_adrep
->
bix
();
return
m_orep
->
vrep
()
->
readAttribute
(
&
sts
,
m_orep
,
bix
,
m_offset
,
m_size
,
p
);
}
void
*
wb_attribute
::
value
(
void
*
vp
,
size_t
size
,
pwr_tStatus
*
sts
)
...
...
@@ -290,18 +370,57 @@ pwr_tStatus wb_attribute::fromString(char *)
return
sts
;
}
wb_attribute
wb_attribute
::
next
()
wb_attribute
wb_attribute
::
after
()
{
wb_attribute
a
;
return
a
;
pwr_tStatus
sts
;
check
();
if
(
m_adrep
==
0
)
return
wb_attribute
();
wb_adrep
*
adrep
=
m_adrep
->
next
(
&
sts
);
if
(
evenSts
())
return
wb_attribute
();
wb_attribute
a
(
LDH__SUCCESS
,
m_orep
,
adrep
);
// Fix for sub classes
if
(
m_flags
&
PWR_MASK_SUBCLASS
)
{
a
.
m_flags
|=
PWR_MASK_SUBCLASS
;
a
.
m_bix
=
m_bix
;
a
.
m_offset
=
m_offset
+
m_size
;
}
return
a
;
}
wb_attribute
wb_attribute
::
prev
()
wb_attribute
wb_attribute
::
before
()
{
wb_attribute
a
;
return
a
;
}
wb_attribute
wb_attribute
::
first
(
int
idx
)
{
if
(
!
isClass
())
return
wb_attribute
();
return
wb_attribute
(
*
this
,
idx
,
NULL
);
}
wb_attribute
wb_attribute
::
child
(
int
idx
,
const
char
*
name
)
{
if
(
!
isClass
())
return
wb_attribute
();
return
wb_attribute
(
*
this
,
idx
,
name
);
}
const
char
*
wb_attribute
::
name
()
const
{
check
();
...
...
wb/lib/wb/src/wb_attribute.h
View file @
d346aed5
...
...
@@ -36,14 +36,17 @@ class wb_attribute : public wb_status
int
m_elements
;
pwr_eType
m_type
;
int
m_flags
;
pwr_eBix
m_bix
;
// Used when sub class
public:
wb_attribute
();
wb_attribute
(
const
wb_attribute
&
);
wb_attribute
(
pwr_tStatus
,
wb_orep
*
const
);
wb_attribute
(
pwr_tStatus
,
wb_orep
*
const
,
wb_adrep
*
const
);
wb_attribute
(
pwr_tStatus
,
wb_orep
*
const
,
const
char
*
bname
);
wb_attribute
(
pwr_tStatus
,
wb_orep
*
const
,
const
char
*
aname
,
const
char
*
bname
);
wb_attribute
(
pwr_tStatus
,
wb_orep
*
);
wb_attribute
(
pwr_tStatus
,
wb_orep
*
,
wb_adrep
*
);
wb_attribute
(
pwr_tStatus
,
wb_orep
*
,
const
char
*
bname
);
wb_attribute
(
pwr_tStatus
,
wb_orep
*
,
const
char
*
bname
,
const
char
*
aname
);
wb_attribute
(
wb_attribute
&
pa
,
int
idx
,
const
char
*
aname
);
~
wb_attribute
();
wb_attribute
&
operator
=
(
const
wb_attribute
&
);
...
...
@@ -53,6 +56,10 @@ public:
//wb_object& operator=(const wb_orep&);
bool
isClass
()
const
{
return
(
m_flags
&
PWR_MASK_CLASS
||
m_flags
&
PWR_MASK_BUFFER
);}
bool
isArray
()
const
{
return
(
m_flags
&
PWR_MASK_ARRAY
);}
pwr_tOid
aoid
();
// get objects object id
pwr_sAttrRef
aref
();
pwr_sAttrRef
*
aref
(
pwr_sAttrRef
*
arp
);
...
...
@@ -65,7 +72,7 @@ public:
pwr_tAix
aix
();
// Class of attribute object
pwr_tCid
cid
();
pwr_
tA
ix
bix
();
pwr_
eB
ix
bix
();
pwr_tOid
boid
();
bool
checkXref
();
pwr_sAttrXRef
*
xref
();
...
...
@@ -80,8 +87,11 @@ public:
pwr_tStatus
fromString
(
char
*
);
wb_attribute
next
();
wb_attribute
prev
();
wb_attribute
after
();
wb_attribute
before
();
wb_attribute
first
(
int
idx
);
wb_attribute
child
(
int
idx
,
const
char
*
name
);
const
char
*
name
()
const
;
...
...
wb/lib/wb/src/wb_bdef.cpp
View file @
d346aed5
...
...
@@ -35,7 +35,7 @@ wb_bdef::wb_bdef(const wb_adef *a)
{
}
wb_bdef
::
wb_bdef
(
const
wb_orep
*
o
,
pwr_
tO
ix
bix
)
wb_bdef
::
wb_bdef
(
const
wb_orep
*
o
,
pwr_
eB
ix
bix
)
{
}
...
...
@@ -44,7 +44,7 @@ pwr_tOid wb_bdef::boid()
return
m_bdrep
->
boid
();
}
pwr_
tO
ix
wb_bdef
::
bix
()
pwr_
eB
ix
wb_bdef
::
bix
()
{
return
m_bdrep
->
bix
();
}
...
...
@@ -59,14 +59,14 @@ int wb_bdef::nAttribute()
return
m_bdrep
->
nAttribute
();
}
wb_name
wb_bdef
::
name
()
const
char
*
wb_bdef
::
name
()
const
{
return
m_bdrep
->
name
();
}
wb_name
wb_bdef
::
name
(
ldh_eName
type
)
wb_name
wb_bdef
::
longName
()
const
{
return
m_bdrep
->
name
(
type
);
return
m_bdrep
->
longName
(
);
}
pwr_sAttrRef
wb_bdef
::
aref
()
...
...
wb/lib/wb/src/wb_bdef.h
View file @
d346aed5
...
...
@@ -3,7 +3,6 @@
#include "pwr.h"
#include "wb_bdrep.h"
#include "wb_object.h"
#include "wb_name.h"
class
wb_orep
;
...
...
@@ -22,7 +21,7 @@ public:
wb_bdef
&
operator
=
(
const
wb_bdef
&
);
wb_bdef
(
const
wb_adef
*
a
);
wb_bdef
(
const
wb_orep
*
o
,
pwr_
tA
ix
bix
);
wb_bdef
(
const
wb_orep
*
o
,
pwr_
eB
ix
bix
);
~
wb_bdef
()
{};
// Fix
...
...
@@ -31,12 +30,12 @@ public:
bool
operator
==
(
wb_bdef
&
);
pwr_tOid
boid
();
pwr_
tO
ix
bix
();
pwr_
eB
ix
bix
();
size_t
size
();
int
nAttribute
();
wb_name
name
();
// get attribute
name
wb_name
name
(
ldh_eName
type
)
;
const
char
*
name
()
const
;
// get body
name
wb_name
longName
()
const
;
pwr_sAttrRef
aref
();
...
...
wb/lib/wb/src/wb_bdrep.cpp
View file @
d346aed5
...
...
@@ -50,9 +50,9 @@ wb_adrep *wb_bdrep::adrep( pwr_tStatus *sts, const char *aname)
return
adrep
;
}
cdh
_eBix
wb_bdrep
::
bix
()
pwr
_eBix
wb_bdrep
::
bix
()
{
return
(
cdh_eBix
)
cdh_oixToBix
(
m_orep
->
oid
().
oix
);
return
cdh_oixToBix
(
m_orep
->
oid
().
oix
);
}
size_t
wb_bdrep
::
size
()
...
...
@@ -60,7 +60,7 @@ size_t wb_bdrep::size()
pwr_tStatus
sts
;
pwr_sObjBodyDef
body
;
m_orep
->
m_vrep
->
readBody
(
&
sts
,
m_orep
,
cdh
_eBix_sys
,
(
void
*
)
&
body
);
m_orep
->
m_vrep
->
readBody
(
&
sts
,
m_orep
,
pwr
_eBix_sys
,
(
void
*
)
&
body
);
if
(
EVEN
(
sts
))
throw
wb_error
(
sts
);
return
body
.
Size
;
...
...
@@ -99,3 +99,14 @@ pwr_tOid wb_bdrep::boid()
{
return
m_orep
->
oid
();
}
const
char
*
wb_bdrep
::
name
()
const
{
return
m_orep
->
name
();
}
wb_name
wb_bdrep
::
longName
()
const
{
return
m_orep
->
longName
();
}
wb/lib/wb/src/wb_bdrep.h
View file @
d346aed5
...
...
@@ -2,11 +2,9 @@
#define wb_bdrep_h
#include "pwr.h"
#include "wb_orep.h"
#include "wb_object.h"
#include "wb_ldh.h"
#include "wb_name.h"
class
wb_adef
;
class
wb_adrep
;
class
wb_orepdbs
;
...
...
@@ -28,12 +26,13 @@ public:
pwr_sAttrRef
aref
()
{
pwr_sAttrRef
a
;
return
a
;}
// Fix
size_t
size
();
int
nAttribute
();
cdh
_eBix
bix
();
pwr
_eBix
bix
();
pwr_tOid
boid
();
wb_name
name
()
{
wb_name
n
;
return
n
;}
// Fix // get attribute name
wb_name
name
(
ldh_eName
type
)
{
wb_name
n
;
return
n
;}
// Fix
const
char
*
name
()
const
;
// get body name
wb_name
longName
()
const
;
wb_adrep
*
adrep
(
pwr_tStatus
*
sts
);
// Get first attribute
wb_adrep
*
adrep
(
pwr_tStatus
*
sts
,
const
char
*
aname
);
...
...
wb/lib/wb/src/wb_cdef.cpp
View file @
d346aed5
#include "wb_cdef.h"
#include "wb_adef.h"
#include "wb_object.h"
wb_cdef
::
wb_cdef
()
:
wb_status
(
LDH__NOCLASS
),
m_cdrep
(
0
)
{
...
...
@@ -116,7 +116,7 @@ wb_bdef wb_cdef::bdef( const char *bname)
return
wb_bdef
();
}
wb_bdef
wb_cdef
::
bdef
(
pwr_
tO
ix
bix
)
wb_bdef
wb_cdef
::
bdef
(
pwr_
eB
ix
bix
)
{
check
();
pwr_tStatus
sts
;
...
...
wb/lib/wb/src/wb_cdef.h
View file @
d346aed5
...
...
@@ -42,7 +42,7 @@ class wb_cdef : public wb_status
const
char
*
name
()
const
;
wb_name
longName
();
wb_bdef
bdef
(
pwr_
tO
ix
bix
);
wb_bdef
bdef
(
pwr_
eB
ix
bix
);
wb_bdef
bdef
(
const
char
*
bname
);
wb_bdef
bdef
(
wb_name
bname
);
...
...
wb/lib/wb/src/wb_cdrep.cpp
View file @
d346aed5
...
...
@@ -91,13 +91,13 @@ wb_bdrep *wb_cdrep::bdrep( pwr_tStatus *sts, const char *bname)
return
bdrep
;
}
wb_bdrep
*
wb_cdrep
::
bdrep
(
pwr_tStatus
*
sts
,
int
bix
)
wb_bdrep
*
wb_cdrep
::
bdrep
(
pwr_tStatus
*
sts
,
pwr_eBix
bix
)
{
wb_orepdbs
*
orep
=
(
wb_orepdbs
*
)
m_orep
->
m_vrep
->
first
(
sts
,
m_orep
);
wb_orepdbs
*
old
;
while
(
ODD
(
*
sts
))
{
if
(
orep
->
cid
()
==
pwr_eClass_ObjBodyDef
&&
cdh_oixToBix
(
orep
->
oid
().
oix
)
==
(
unsigned
int
)
bix
)
{
cdh_oixToBix
(
orep
->
oid
().
oix
)
==
bix
)
{
wb_bdrep
*
bdrep
=
new
wb_bdrep
(
*
orep
);
return
bdrep
;
}
...
...
@@ -152,13 +152,13 @@ pwr_tCid wb_cdrep::cid()
return
cdh_ClassObjidToId
(
m_orep
->
oid
());
}
void
wb_cdrep
::
templateBody
(
pwr_tStatus
*
sts
,
cdh
_eBix
bix
,
void
*
p
)
void
wb_cdrep
::
templateBody
(
pwr_tStatus
*
sts
,
pwr
_eBix
bix
,
void
*
p
)
{
// Get objid for template object
pwr_tOid
oid
;
int
cix
=
cdh_oixToCix
(
m_orep
->
oid
().
oix
);
oid
.
vid
=
m_orep
->
oid
().
vid
;
oid
.
oix
=
cdh_cixToOix
(
cix
,
cdh
_eBix_template
,
0
);
oid
.
oix
=
cdh_cixToOix
(
cix
,
pwr
_eBix_template
,
0
);
wb_orepdbs
*
orep
=
(
wb_orepdbs
*
)
m_orep
->
m_vrep
->
object
(
sts
,
oid
);
if
(
EVEN
(
*
sts
))
return
;
...
...
wb/lib/wb/src/wb_cdrep.h
View file @
d346aed5
...
...
@@ -4,14 +4,13 @@
#include "pwr.h"
#include "pwr_class.h"
#include "wb_name.h"
#include "wb_orep.h"
class
wb_adef
;
class
wb_orep
;
class
wb_mvrep
;
class
wb_adrep
;
class
wb_bdrep
;
class
wb_mvrep
;
class
wb_orep
;
class
wb_orepdbs
;
class
wb_adrep
;
class
wb_cdrep
{
...
...
@@ -41,12 +40,12 @@ class wb_cdrep
void
name
(
const
char
*
name
);
void
name
(
wb_name
*
name
);
wb_bdrep
*
bdrep
(
pwr_tStatus
*
sts
,
int
bix
);
wb_bdrep
*
bdrep
(
pwr_tStatus
*
sts
,
pwr_eBix
bix
);
wb_bdrep
*
bdrep
(
pwr_tStatus
*
sts
,
const
char
*
bname
);
wb_adrep
*
adrep
(
pwr_tStatus
*
sts
,
const
char
*
aname
);
wb_orep
*
classBody
(
pwr_tStatus
*
sts
,
const
char
*
bname
);
void
templateBody
(
pwr_tStatus
*
sts
,
cdh
_eBix
bix
,
void
*
p
);
void
templateBody
(
pwr_tStatus
*
sts
,
pwr
_eBix
bix
,
void
*
p
);
pwr_tStatus
sts
()
{
return
m_sts
;}
};
...
...
wb/lib/wb/src/wb_destination.h
View file @
d346aed5
...
...
@@ -2,8 +2,6 @@
#define wb_destination_h
#include "pwr.h"
#include "wb_object.h"
#include "wb_orep.h"
#include "wb_ldh.h"
class
wb_orep
;
...
...
wb/lib/wb/src/wb_merep.cpp
View file @
d346aed5
...
...
@@ -2,6 +2,7 @@
#include "wb_merep.h"
#include "wb_erep.h"
#include "wb_tdrep.h"
#include "wb_attrname.h"
#include "wb_ldh_msg.h"
...
...
@@ -156,14 +157,14 @@ wb_tdrep *wb_merep::tdrep( pwr_tStatus *sts, wb_name name)
return
0
;
}
int
wb_merep
::
getAttrInfoRec
(
wb_attrname
*
attr
,
cdh
_eBix
bix
,
pwr_tCid
cid
,
int
*
size
,
int
wb_merep
::
getAttrInfoRec
(
wb_attrname
*
attr
,
pwr
_eBix
bix
,
pwr_tCid
cid
,
int
*
size
,
int
*
offset
,
pwr_tTid
*
tid
,
int
*
elements
,
pwr_eType
*
type
,
int
*
flags
,
int
level
)
{
pwr_tStatus
sts
;
if
(
level
>
0
)
bix
=
cdh
_eBix_rt
;
bix
=
pwr
_eBix_rt
;
wb_cdrep
*
cd
=
cdrep
(
&
sts
,
cid
);
if
(
EVEN
(
sts
))
return
0
;
...
...
wb/lib/wb/src/wb_merep.h
View file @
d346aed5
...
...
@@ -34,7 +34,7 @@ class wb_merep {
wb_tdrep
*
tdrep
(
pwr_tStatus
*
sts
,
pwr_tTid
tid
);
wb_tdrep
*
tdrep
(
pwr_tStatus
*
sts
,
wb_name
name
);
int
getAttrInfoRec
(
wb_attrname
*
attr
,
cdh
_eBix
bix
,
pwr_tCid
cid
,
int
*
size
,
int
getAttrInfoRec
(
wb_attrname
*
attr
,
pwr
_eBix
bix
,
pwr_tCid
cid
,
int
*
size
,
int
*
offset
,
pwr_tTid
*
tid
,
int
*
elements
,
pwr_eType
*
type
,
int
*
flags
,
int
level
);
...
...
wb/lib/wb/src/wb_mvrep.cpp
View file @
d346aed5
#include "wb_mvrep.h"
#include "wb_tdrep.h"
wb_cdrep
*
wb_mvrep
::
cdrep
(
pwr_tCid
cid
)
{
...
...
wb/lib/wb/src/wb_mvrep.h
View file @
d346aed5
...
...
@@ -2,10 +2,12 @@
#define wb_mvrep_h
#include "wb_vrep.h"
#include "wb_cdrep.h"
#include "wb_tdrep.h"
#include "wb_bdrep.h"
#include "wb_adrep.h"
class
wb_adrep
;
class
wb_cdrep
;
class
wb_orep
;
class
wb_tdrep
;
class
wb_mvrep
:
public
wb_vrep
{
public:
...
...
wb/lib/wb/src/wb_object.cpp
View file @
d346aed5
...
...
@@ -319,7 +319,7 @@ size_t wb_object::rbSize()
check
();
wb_cdef
c
=
wb_cdef
(
*
m_orep
);
wb_bdef
b
=
c
.
bdef
(
cdh
_eBix_rt
);
wb_bdef
b
=
c
.
bdef
(
pwr
_eBix_rt
);
if
(
!
b
)
return
0
;
...
...
@@ -329,7 +329,7 @@ size_t wb_object::rbSize()
size_t
wb_object
::
dbSize
()
{
wb_cdef
c
=
wb_cdef
(
*
m_orep
);
wb_bdef
b
=
c
.
bdef
(
cdh
_eBix_dev
);
wb_bdef
b
=
c
.
bdef
(
pwr
_eBix_dev
);
if
(
!
b
)
return
0
;
...
...
@@ -337,6 +337,22 @@ size_t wb_object::dbSize()
}
wb_bdef
wb_object
::
bdef
(
const
char
*
bname
)
{
check
();
wb_cdef
cdef
(
*
m_orep
);
return
cdef
.
bdef
(
bname
);
}
wb_bdef
wb_object
::
bdef
(
pwr_eBix
bix
)
{
check
();
wb_cdef
cdef
(
*
m_orep
);
return
cdef
.
bdef
(
bix
);
}
/* Object SigChanCon $ObjXRef 2
Body SysBody
...
...
wb/lib/wb/src/wb_object.h
View file @
d346aed5
...
...
@@ -9,6 +9,7 @@
#include "wb_location.h"
#include "wb_attribute.h"
class
wb_bdef
;
class
wb_orep
;
class
wb_location
;
class
wb_attribute
;
...
...
@@ -70,6 +71,9 @@ public:
size_t
rbSize
();
//< size of run time body
size_t
dbSize
();
//< size of development body
wb_bdef
bdef
(
const
char
*
bname
);
wb_bdef
bdef
(
pwr_eBix
bix
);
wb_attribute
attribute
();
wb_attribute
attribute
(
const
char
*
aname
);
wb_attribute
attribute
(
const
char
*
bname
,
const
char
*
aname
);
...
...
wb/lib/wb/src/wb_tdrep.cpp
View file @
d346aed5
...
...
@@ -86,7 +86,7 @@ void wb_tdrep::init()
{
pwr_sTypeDef
body
;
m_orep
->
m_vrep
->
readBody
(
&
sts
,
m_orep
,
cdh
_eBix_sys
,
(
void
*
)
&
body
);
m_orep
->
m_vrep
->
readBody
(
&
sts
,
m_orep
,
pwr
_eBix_sys
,
(
void
*
)
&
body
);
if
(
EVEN
(
sts
))
throw
wb_error
(
sts
);
m_size
=
body
.
Size
;
...
...
@@ -99,7 +99,7 @@ void wb_tdrep::init()
{
pwr_sTypeDef
body
;
m_orep
->
m_vrep
->
readBody
(
&
sts
,
m_orep
,
cdh
_eBix_sys
,
(
void
*
)
&
body
);
m_orep
->
m_vrep
->
readBody
(
&
sts
,
m_orep
,
pwr
_eBix_sys
,
(
void
*
)
&
body
);
if
(
EVEN
(
sts
))
throw
wb_error
(
sts
);
m_size
=
body
.
Size
;
...
...
wb/lib/wb/src/wb_volume.cpp
View file @
d346aed5
...
...
@@ -149,18 +149,6 @@ wb_adef wb_volume::adef( pwr_tCid cid, const char *bname, const char *aname)
return
bdef
.
adef
(
aname
);
}
wb_bdef
wb_volume
::
bdef
(
wb_cdef
cdef
,
const
char
*
bname
)
{
return
cdef
.
bdef
(
bname
);
}
wb_bdef
wb_volume
::
bdef
(
wb_object
o
,
const
char
*
bname
)
{
wb_orep
*
orep
=
o
;
wb_cdef
cdef
=
wb_cdef
(
*
orep
);
return
cdef
.
bdef
(
bname
);
}
wb_cdef
wb_volume
::
cdef
(
wb_object
o
)
{
...
...
wb/lib/wb/src/wb_volume.h
View file @
d346aed5
...
...
@@ -61,9 +61,6 @@ public:
wb_adef
adef
(
pwr_sAttrRef
*
arp
)
{
wb_adef
a
;
return
a
;};
// Fix
wb_adef
adef
(
pwr_tCid
cid
,
const
char
*
bname
,
const
char
*
aname
);
wb_bdef
bdef
(
wb_cdef
cdef
,
const
char
*
bname
);
wb_bdef
bdef
(
wb_object
o
,
const
char
*
bname
);
wb_cdef
cdef
(
wb_object
o
);
wb_cdef
cdef
(
pwr_tCid
cid
);
...
...
wb/lib/wb/src/wb_vrep.h
View file @
d346aed5
...
...
@@ -55,13 +55,13 @@ public:
virtual
bool
commit
(
pwr_tStatus
*
sts
)
=
0
;
virtual
bool
abort
(
pwr_tStatus
*
sts
)
=
0
;
virtual
bool
writeAttribute
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
cdh
_eBix
bix
,
unsigned
int
offset
,
unsigned
int
size
,
void
*
p
)
=
0
;
virtual
bool
writeAttribute
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
pwr
_eBix
bix
,
unsigned
int
offset
,
unsigned
int
size
,
void
*
p
)
=
0
;
virtual
void
*
readAttribute
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
cdh
_eBix
bix
,
unsigned
int
offset
,
unsigned
int
size
,
void
*
p
)
=
0
;
virtual
void
*
readAttribute
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
pwr
_eBix
bix
,
unsigned
int
offset
,
unsigned
int
size
,
void
*
p
)
=
0
;
virtual
void
*
readBody
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
cdh
_eBix
bix
,
void
*
p
)
=
0
;
virtual
void
*
readBody
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
pwr
_eBix
bix
,
void
*
p
)
=
0
;
virtual
bool
writeBody
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
cdh
_eBix
bix
,
void
*
p
)
=
0
;
virtual
bool
writeBody
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
pwr
_eBix
bix
,
void
*
p
)
=
0
;
virtual
wb_orep
*
ancestor
(
pwr_tStatus
*
sts
,
wb_orep
*
o
)
=
0
;
...
...
wb/lib/wb/src/wb_vrepdb.cpp
View file @
d346aed5
...
...
@@ -40,7 +40,7 @@ typedef struct {
typedef struct {
struct {
pwr_tOix oix;
pwr_
t
Bix bix;
pwr_
e
Bix bix;
} key;
void *data;
} ldh_sDbBody;
...
...
@@ -105,7 +105,7 @@ wb_vrepdb::oh_d::oh_d(wb_orepdb *o)
wb_vrepdb
::
ob_k
::
ob_k
()
{
m_data
.
oix
=
0
;
m_data
.
bix
=
0
;
m_data
.
bix
=
pwr_eBix__
;
set_data
(
&
m_data
);
set_size
(
sizeof
(
m_data
));
...
...
@@ -114,7 +114,7 @@ wb_vrepdb::ob_k::ob_k()
wb_vrepdb
::
ob_k
::
ob_k
(
pwr_tOix
oix
)
{
m_data
.
oix
=
oix
;
m_data
.
bix
=
0
;
m_data
.
bix
=
pwr_eBix__
;
set_data
(
&
m_data
);
set_size
(
sizeof
(
m_data
));
...
...
@@ -123,13 +123,13 @@ wb_vrepdb::ob_k::ob_k(pwr_tOix oix)
wb_vrepdb
::
ob_k
::
ob_k
(
wb_orepdb
*
o
)
{
m_data
.
oix
=
o
->
oix
();
m_data
.
bix
=
0
;
m_data
.
bix
=
pwr_eBix__
;
set_data
(
&
m_data
);
set_size
(
sizeof
(
m_data
));
}
wb_vrepdb
::
ob_k
::
ob_k
(
wb_orepdb
*
o
,
pwr_
tO
ix
bix
)
wb_vrepdb
::
ob_k
::
ob_k
(
wb_orepdb
*
o
,
pwr_
eB
ix
bix
)
{
m_data
.
oix
=
o
->
oix
();
m_data
.
bix
=
bix
;
...
...
@@ -803,7 +803,7 @@ bool wb_vrepdb::renameObject(pwr_tStatus *sts, wb_orep *o, wb_name name)
return
true
;
}
bool
wb_vrepdb
::
writeAttribute
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
cdh
_eBix
bix
,
unsigned
int
offset
,
unsigned
int
size
,
void
*
p
)
bool
wb_vrepdb
::
writeAttribute
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
pwr
_eBix
bix
,
unsigned
int
offset
,
unsigned
int
size
,
void
*
p
)
{
//body.oix = ?;
//body.bix = ?;
...
...
@@ -820,7 +820,7 @@ bool wb_vrepdb::writeAttribute(pwr_tStatus *sts, wb_orep *o, cdh_eBix bix, unsig
}
void
*
wb_vrepdb
::
readAttribute
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
cdh
_eBix
bix
,
unsigned
int
offset
,
unsigned
int
size
,
void
*
p
)
wb_vrepdb
::
readAttribute
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
pwr
_eBix
bix
,
unsigned
int
offset
,
unsigned
int
size
,
void
*
p
)
{
ob_k
obk
(
o
->
oix
(),
bix
);
//ob_d obd;
...
...
@@ -857,13 +857,13 @@ wb_vrepdb::readAttribute(pwr_tStatus *sts, wb_orep *o, cdh_eBix bix, unsigned in
}
void
*
wb_vrepdb
::
readBody
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
cdh
_eBix
bix
,
void
*
p
)
wb_vrepdb
::
readBody
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
pwr
_eBix
bix
,
void
*
p
)
{
return
0
;
}
bool
wb_vrepdb
::
writeBody
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
cdh
_eBix
bix
,
void
*
p
)
wb_vrepdb
::
writeBody
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
pwr
_eBix
bix
,
void
*
p
)
{
return
true
;
}
...
...
wb/lib/wb/src/wb_vrepdb.h
View file @
d346aed5
...
...
@@ -54,15 +54,15 @@ protected:
struct
{
pwr_tOix
oix
;
pwr_
tO
ix
bix
;
pwr_
eB
ix
bix
;
}
m_data
;
ob_k
();
ob_k
(
wb_orepdb
*
o
);
ob_k
(
wb_orepdb
*
o
,
pwr_
tO
ix
bix
);
ob_k
(
wb_orepdb
*
o
,
pwr_
eB
ix
bix
);
ob_k
(
pwr_tOix
oix
);
ob_k
(
pwr_tOix
oix
,
pwr_
tO
ix
bix
);
ob_k
(
pwr_tOix
oix
,
pwr_
eB
ix
bix
);
};
...
...
@@ -149,13 +149,13 @@ public:
virtual
bool
commit
(
pwr_tStatus
*
sts
);
virtual
bool
abort
(
pwr_tStatus
*
sts
);
virtual
bool
writeAttribute
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
cdh
_eBix
bix
,
unsigned
int
offset
,
unsigned
int
size
,
void
*
p
);
virtual
bool
writeAttribute
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
pwr
_eBix
bix
,
unsigned
int
offset
,
unsigned
int
size
,
void
*
p
);
virtual
void
*
readAttribute
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
cdh
_eBix
bix
,
unsigned
int
offset
,
unsigned
int
size
,
void
*
p
);
virtual
void
*
readAttribute
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
pwr
_eBix
bix
,
unsigned
int
offset
,
unsigned
int
size
,
void
*
p
);
virtual
void
*
readBody
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
cdh
_eBix
bix
,
void
*
p
);
virtual
void
*
readBody
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
pwr
_eBix
bix
,
void
*
p
);
virtual
bool
writeBody
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
cdh
_eBix
bix
,
void
*
p
);
virtual
bool
writeBody
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
pwr
_eBix
bix
,
void
*
p
);
virtual
wb_orep
*
ancestor
(
pwr_tStatus
*
sts
,
wb_orep
*
o
)
const
;
...
...
wb/lib/wb/src/wb_vrepdbs.cpp
View file @
d346aed5
...
...
@@ -182,7 +182,7 @@ wb_vrepdbs::abort(pwr_tStatus *sts)
bool
wb_vrepdbs
::
writeAttribute
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
cdh
_eBix
bix
,
unsigned
int
offset
,
unsigned
int
size
,
void
*
p
)
wb_vrepdbs
::
writeAttribute
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
pwr
_eBix
bix
,
unsigned
int
offset
,
unsigned
int
size
,
void
*
p
)
{
*
sts
=
LDH__NYI
;
return
false
;
...
...
@@ -190,7 +190,7 @@ wb_vrepdbs::writeAttribute(pwr_tStatus *sts, wb_orep *o, cdh_eBix bix, unsigned
void
*
wb_vrepdbs
::
readAttribute
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
cdh
_eBix
bix
,
unsigned
int
offset
,
unsigned
int
size
,
void
*
p
)
wb_vrepdbs
::
readAttribute
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
pwr
_eBix
bix
,
unsigned
int
offset
,
unsigned
int
size
,
void
*
p
)
{
*
sts
=
LDH__SUCCESS
;
...
...
@@ -204,10 +204,10 @@ wb_vrepdbs::readAttribute(pwr_tStatus *sts, wb_orep *o, cdh_eBix bix, unsigned i
if
(
p
)
{
switch
(
bix
)
{
case
cdh
_eBix_rt
:
case
pwr
_eBix_rt
:
memcpy
(
p
,
(
char
*
)
bp
+
offset
,
MIN
(
op
->
rbody
.
size
-
offset
,
size
));
break
;
case
cdh
_eBix_dev
:
case
pwr
_eBix_dev
:
memcpy
(
p
,
(
char
*
)
bp
+
offset
,
MIN
(
op
->
dbody
.
size
-
offset
,
size
));
break
;
default:
...
...
@@ -222,7 +222,7 @@ wb_vrepdbs::readAttribute(pwr_tStatus *sts, wb_orep *o, cdh_eBix bix, unsigned i
void
*
wb_vrepdbs
::
readBody
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
cdh
_eBix
bix
,
void
*
p
)
wb_vrepdbs
::
readBody
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
pwr
_eBix
bix
,
void
*
p
)
{
*
sts
=
LDH__SUCCESS
;
...
...
@@ -236,10 +236,10 @@ wb_vrepdbs::readBody(pwr_tStatus *sts, wb_orep *o, cdh_eBix bix, void *p)
if
(
p
)
{
switch
(
bix
)
{
case
cdh
_eBix_rt
:
case
pwr
_eBix_rt
:
memcpy
(
p
,
bp
,
op
->
rbody
.
size
);
break
;
case
cdh
_eBix_dev
:
case
pwr
_eBix_dev
:
memcpy
(
p
,
bp
,
op
->
dbody
.
size
);
break
;
default:
...
...
@@ -254,7 +254,7 @@ wb_vrepdbs::readBody(pwr_tStatus *sts, wb_orep *o, cdh_eBix bix, void *p)
bool
wb_vrepdbs
::
writeBody
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
cdh
_eBix
bix
,
void
*
p
)
wb_vrepdbs
::
writeBody
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
pwr
_eBix
bix
,
void
*
p
)
{
*
sts
=
LDH__NYI
;
return
false
;
...
...
wb/lib/wb/src/wb_vrepdbs.h
View file @
d346aed5
...
...
@@ -57,13 +57,13 @@ public:
virtual
bool
commit
(
pwr_tStatus
*
sts
);
virtual
bool
abort
(
pwr_tStatus
*
sts
);
virtual
bool
writeAttribute
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
cdh
_eBix
bix
,
unsigned
int
offset
,
unsigned
int
size
,
void
*
p
);
virtual
bool
writeAttribute
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
pwr
_eBix
bix
,
unsigned
int
offset
,
unsigned
int
size
,
void
*
p
);
virtual
void
*
readAttribute
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
cdh
_eBix
bix
,
unsigned
int
offset
,
unsigned
int
size
,
void
*
p
);
virtual
void
*
readAttribute
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
pwr
_eBix
bix
,
unsigned
int
offset
,
unsigned
int
size
,
void
*
p
);
virtual
void
*
readBody
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
cdh
_eBix
bix
,
void
*
p
);
virtual
void
*
readBody
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
pwr
_eBix
bix
,
void
*
p
);
virtual
bool
writeBody
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
cdh
_eBix
bix
,
void
*
p
);
virtual
bool
writeBody
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
pwr
_eBix
bix
,
void
*
p
);
virtual
wb_orep
*
ancestor
(
pwr_tStatus
*
sts
,
wb_orep
*
o
);
...
...
wb/lib/wb/src/wb_vrepwbl.cpp
View file @
d346aed5
...
...
@@ -500,9 +500,9 @@ int wb_vrepwbl::getClassInfo( pwr_tCid cid, int *rsize, int *dsize)
wb_wblnode
*
n_body
=
n
->
o_fch
;
while
(
n_body
)
{
if
(
n_body
->
isObjBodyDef
()
&&
(
n_body
->
b_bix
==
wbl_eBix_SysBody
||
n_body
->
b_bix
==
wbl_eBix_RtBody
))
(
n_body
->
b_bix
==
pwr_eBix_sys
||
n_body
->
b_bix
==
pwr_eBix_rt
))
*
rsize
=
n_body
->
b_size
;
else
if
(
n_body
->
isObjBodyDef
()
&&
n_body
->
b_bix
==
wbl_eBix_DevBody
)
else
if
(
n_body
->
isObjBodyDef
()
&&
n_body
->
b_bix
==
pwr_eBix_dev
)
*
dsize
=
n_body
->
b_size
;
n_body
=
n_body
->
o_fws
;
}
...
...
@@ -515,7 +515,7 @@ int wb_vrepwbl::getClassInfo( pwr_tCid cid, int *rsize, int *dsize)
wb_cdrep
*
cdrep
=
m_merep
->
cdrep
(
&
sts
,
cid
);
if
(
EVEN
(
sts
))
return
0
;
wb_bdrep
*
bdrep
=
cdrep
->
bdrep
(
&
sts
,
cdh
_eBix_rt
);
wb_bdrep
*
bdrep
=
cdrep
->
bdrep
(
&
sts
,
pwr
_eBix_rt
);
if
(
ODD
(
sts
))
{
*
rsize
=
bdrep
->
size
();
delete
bdrep
;
...
...
@@ -523,7 +523,7 @@ int wb_vrepwbl::getClassInfo( pwr_tCid cid, int *rsize, int *dsize)
else
*
rsize
=
0
;
bdrep
=
cdrep
->
bdrep
(
&
sts
,
cdh
_eBix_dev
);
bdrep
=
cdrep
->
bdrep
(
&
sts
,
pwr
_eBix_dev
);
if
(
ODD
(
sts
))
{
*
dsize
=
bdrep
->
size
();
delete
bdrep
;
...
...
@@ -546,7 +546,7 @@ int wb_vrepwbl::getClassInfo( pwr_tCid cid, int *rsize, int *dsize)
*elements = elem; }
int
wb_vrepwbl
::
getAttrInfo
(
const
char
*
attr
,
cdh
_eBix
bix
,
pwr_tCid
cid
,
int
*
size
,
int
wb_vrepwbl
::
getAttrInfo
(
const
char
*
attr
,
pwr
_eBix
bix
,
pwr_tCid
cid
,
int
*
size
,
int
*
offset
,
pwr_tTid
*
tid
,
int
*
elements
,
pwr_eType
*
type
)
{
int
a_size
;
...
...
@@ -571,19 +571,19 @@ int wb_vrepwbl::getAttrInfo( const char *attr, cdh_eBix bix, pwr_tCid cid, int *
return
0
;
}
int
wb_vrepwbl
::
getAttrInfoRec
(
wb_attrname
*
attr
,
cdh
_eBix
bix
,
pwr_tCid
cid
,
int
*
size
,
int
wb_vrepwbl
::
getAttrInfoRec
(
wb_attrname
*
attr
,
pwr
_eBix
bix
,
pwr_tCid
cid
,
int
*
size
,
int
*
offset
,
pwr_tTid
*
tid
,
int
*
elements
,
pwr_eType
*
type
,
int
level
)
{
if
(
level
>
0
)
bix
=
cdh
_eBix_rt
;
bix
=
pwr
_eBix_rt
;
switch
(
cid
)
{
case
pwr_eClass_Type
:
{
pwr_sType
o
;
if
(
bix
!=
cdh
_eBix_sys
)
if
(
bix
!=
pwr
_eBix_sys
)
return
0
;
if
(
attr
->
attributeIsEqual
(
"Type"
,
level
))
{
*
size
=
sizeof
(
o
.
Type
);
...
...
@@ -603,7 +603,7 @@ int wb_vrepwbl::getAttrInfoRec( wb_attrname *attr, cdh_eBix bix, pwr_tCid cid, i
{
pwr_sTypeDef
o
;
if
(
bix
!=
cdh
_eBix_sys
)
if
(
bix
!=
pwr
_eBix_sys
)
return
0
;
IF_ATTR
(
Type
,
pwr_eType_UInt32
,
1
,
level
)
else
IF_ATTR
(
Size
,
pwr_eType_Int32
,
1
,
level
)
...
...
@@ -615,7 +615,7 @@ int wb_vrepwbl::getAttrInfoRec( wb_attrname *attr, cdh_eBix bix, pwr_tCid cid, i
{
pwr_sClassDef
o
;
if
(
bix
!=
cdh
_eBix_sys
)
if
(
bix
!=
pwr
_eBix_sys
)
return
0
;
IF_ATTR
(
Editor
,
pwr_eType_UInt32
,
1
,
level
)
else
IF_ATTR
(
Method
,
pwr_eType_UInt32
,
1
,
level
)
...
...
@@ -628,7 +628,7 @@ int wb_vrepwbl::getAttrInfoRec( wb_attrname *attr, cdh_eBix bix, pwr_tCid cid, i
{
pwr_sClassVolume
o
;
if
(
bix
!=
cdh
_eBix_sys
)
if
(
bix
!=
pwr
_eBix_sys
)
return
0
;
IF_ATTR
(
Description
,
pwr_eType_String
,
1
,
level
)
else
IF_ATTR
(
NextOix
,
pwr_eType_ObjectIx
,
1
,
level
)
...
...
@@ -647,7 +647,7 @@ int wb_vrepwbl::getAttrInfoRec( wb_attrname *attr, cdh_eBix bix, pwr_tCid cid, i
{
pwr_sObjBodyDef
o
;
if
(
bix
!=
cdh
_eBix_sys
)
if
(
bix
!=
pwr
_eBix_sys
)
return
0
;
IF_ATTR
(
StructName
,
pwr_eType_String
,
1
,
level
)
else
IF_ATTR
(
NumOfParams
,
pwr_eType_UInt32
,
1
,
level
)
...
...
@@ -660,7 +660,7 @@ int wb_vrepwbl::getAttrInfoRec( wb_attrname *attr, cdh_eBix bix, pwr_tCid cid, i
{
pwr_sParam
o
;
if
(
bix
!=
cdh
_eBix_sys
)
if
(
bix
!=
pwr
_eBix_sys
)
return
0
;
if
(
attr
->
attributeIsEqual
(
"PgmName"
,
level
))
{
*
size
=
sizeof
(
o
.
Info
.
PgmName
);
...
...
@@ -812,7 +812,7 @@ int wb_vrepwbl::nameToAttrRef( const char *name, pwr_sAttrRef *attrref)
pwr_tTid
a_tid
;
int
a_elements
;
pwr_eType
a_type
;
cdh
_eBix
bix
;
pwr
_eBix
bix
;
pwr_tCid
cid
;
if
(
strncmp
(
name
,
"_A"
,
2
)
==
0
)
{
...
...
@@ -853,7 +853,7 @@ int wb_vrepwbl::nameToAttrRef( const char *name, pwr_sAttrRef *attrref)
wb_cdrep
*
cdrep
=
m_merep
->
cdrep
(
&
sts
,
cid
);
if
(
EVEN
(
sts
))
return
sts
;
wb_bdrep
*
bdrep
=
cdrep
->
bdrep
(
&
sts
,
cdh
_eBix_rt
);
wb_bdrep
*
bdrep
=
cdrep
->
bdrep
(
&
sts
,
pwr
_eBix_rt
);
if
(
EVEN
(
sts
))
return
sts
;
attrref
->
Objid
=
oid
;
...
...
@@ -869,13 +869,13 @@ int wb_vrepwbl::nameToAttrRef( const char *name, pwr_sAttrRef *attrref)
if
(
an
.
evenSts
())
return
an
.
sts
();
// Try rtbody
bix
=
cdh
_eBix_rt
;
bix
=
pwr
_eBix_rt
;
sts
=
getAttrInfo
(
an
.
name
(),
bix
,
cid
,
&
a_size
,
&
a_offset
,
&
a_tid
,
&
a_elements
,
&
a_type
);
if
(
EVEN
(
sts
))
{
// Try devbody
bix
=
cdh
_eBix_dev
;
sts
=
getAttrInfo
(
an
.
name
(),
cdh
_eBix_dev
,
cid
,
&
a_size
,
bix
=
pwr
_eBix_dev
;
sts
=
getAttrInfo
(
an
.
name
(),
pwr
_eBix_dev
,
cid
,
&
a_size
,
&
a_offset
,
&
a_tid
,
&
a_elements
,
&
a_type
);
if
(
EVEN
(
sts
))
return
sts
;
}
...
...
@@ -887,53 +887,53 @@ int wb_vrepwbl::nameToAttrRef( const char *name, pwr_sAttrRef *attrref)
return
LDH__SUCCESS
;
}
int
wb_vrepwbl
::
getTemplateBody
(
pwr_tCid
cid
,
int
bix
,
int
*
size
,
void
**
body
)
int
wb_vrepwbl
::
getTemplateBody
(
pwr_tCid
cid
,
pwr_eBix
bix
,
int
*
size
,
void
**
body
)
{
switch
(
cid
)
{
case
pwr_eClass_Type
:
if
(
bix
!=
cdh
_eBix_sys
)
if
(
bix
!=
pwr
_eBix_sys
)
return
0
;
*
size
=
sizeof
(
pwr_sType
);
*
body
=
calloc
(
1
,
*
size
);
return
1
;
case
pwr_eClass_TypeDef
:
if
(
bix
!=
cdh
_eBix_sys
)
if
(
bix
!=
pwr
_eBix_sys
)
return
0
;
*
size
=
sizeof
(
pwr_sTypeDef
);
*
body
=
calloc
(
1
,
*
size
);
return
1
;
case
pwr_eClass_ClassDef
:
if
(
bix
!=
cdh
_eBix_sys
)
if
(
bix
!=
pwr
_eBix_sys
)
return
0
;
*
size
=
sizeof
(
pwr_sClassDef
);
*
body
=
calloc
(
1
,
*
size
);
return
1
;
case
pwr_eClass_ClassVolume
:
if
(
bix
!=
cdh
_eBix_sys
)
if
(
bix
!=
pwr
_eBix_sys
)
return
0
;
*
size
=
sizeof
(
pwr_sClassVolume
);
*
body
=
calloc
(
1
,
*
size
);
return
1
;
case
pwr_eClass_ClassHier
:
if
(
bix
!=
cdh
_eBix_sys
)
if
(
bix
!=
pwr
_eBix_sys
)
return
0
;
*
size
=
0
;
*
body
=
0
;
return
1
;
case
pwr_eClass_TypeHier
:
if
(
bix
!=
cdh
_eBix_sys
)
if
(
bix
!=
pwr
_eBix_sys
)
return
0
;
*
size
=
0
;
*
body
=
0
;
return
1
;
case
pwr_eClass_ObjBodyDef
:
if
(
bix
!=
cdh
_eBix_sys
)
if
(
bix
!=
pwr
_eBix_sys
)
return
0
;
*
size
=
sizeof
(
pwr_sObjBodyDef
);
*
body
=
calloc
(
1
,
*
size
);
return
1
;
case
pwr_eClass_Param
:
if
(
bix
!=
cdh
_eBix_sys
)
if
(
bix
!=
pwr
_eBix_sys
)
return
0
;
*
size
=
sizeof
(
pwr_sParam
);
*
body
=
calloc
(
1
,
*
size
);
...
...
@@ -949,14 +949,14 @@ int wb_vrepwbl::getTemplateBody( pwr_tCid cid, int bix, int *size, void **body)
if
(
!
n
->
c_template
)
return
0
;
if
(
bix
==
cdh_eBix_sys
||
bix
==
cdh
_eBix_rt
)
{
if
(
bix
==
pwr_eBix_sys
||
bix
==
pwr
_eBix_rt
)
{
*
size
=
n
->
c_template
->
rbody_size
;
if
(
*
size
)
{
*
body
=
calloc
(
1
,
*
size
);
memcpy
(
*
body
,
n
->
c_template
->
rbody
,
*
size
);
}
}
else
if
(
bix
==
cdh
_eBix_dev
)
{
else
if
(
bix
==
pwr
_eBix_dev
)
{
*
size
=
n
->
c_template
->
dbody_size
;
if
(
*
size
)
{
*
body
=
calloc
(
1
,
*
size
);
...
...
@@ -980,7 +980,7 @@ int wb_vrepwbl::getTemplateBody( pwr_tCid cid, int bix, int *size, void **body)
if
(
*
size
)
{
*
body
=
calloc
(
1
,
*
size
);
cdrep
->
templateBody
(
&
sts
,
(
cdh
_eBix
)
bix
,
*
body
);
cdrep
->
templateBody
(
&
sts
,
(
pwr
_eBix
)
bix
,
*
body
);
if
(
EVEN
(
sts
))
{
free
(
body
);
delete
cdrep
;
...
...
@@ -1261,7 +1261,7 @@ void wb_vrepwbl::objectName(wb_orep *o, char *str)
free
(
vect
);
}
void
*
wb_vrepwbl
::
readAttribute
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
cdh
_eBix
bix
,
void
*
wb_vrepwbl
::
readAttribute
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
pwr
_eBix
bix
,
unsigned
int
offset
,
unsigned
int
size
,
void
*
p
)
{
*
sts
=
LDH__SUCCESS
;
...
...
@@ -1269,7 +1269,7 @@ void *wb_vrepwbl::readAttribute(pwr_tStatus *sts, wb_orep *o, cdh_eBix bix,
wb_wblnode
*
n
=
((
wb_orepwbl
*
)
o
)
->
wblNode
();
switch
(
bix
)
{
case
cdh
_eBix_rt
:
case
pwr
_eBix_rt
:
if
(
n
->
rbody_size
==
0
)
{
*
sts
=
LDH__NOSUCHBODY
;
return
0
;
...
...
@@ -1279,7 +1279,7 @@ void *wb_vrepwbl::readAttribute(pwr_tStatus *sts, wb_orep *o, cdh_eBix bix,
return
p
;
}
return
(
void
*
)((
char
*
)
n
->
rbody
+
offset
);
case
cdh
_eBix_dev
:
case
pwr
_eBix_dev
:
if
(
n
->
dbody_size
==
0
)
{
*
sts
=
LDH__NOSUCHBODY
;
return
0
;
...
...
@@ -1295,14 +1295,14 @@ void *wb_vrepwbl::readAttribute(pwr_tStatus *sts, wb_orep *o, cdh_eBix bix,
}
}
void
*
wb_vrepwbl
::
readBody
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
cdh
_eBix
bix
,
void
*
p
)
void
*
wb_vrepwbl
::
readBody
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
pwr
_eBix
bix
,
void
*
p
)
{
*
sts
=
LDH__SUCCESS
;
wb_wblnode
*
n
=
((
wb_orepwbl
*
)
o
)
->
wblNode
();
switch
(
bix
)
{
case
cdh
_eBix_rt
:
case
pwr
_eBix_rt
:
if
(
n
->
rbody_size
==
0
)
{
*
sts
=
LDH__NOSUCHBODY
;
return
0
;
...
...
@@ -1312,7 +1312,7 @@ void *wb_vrepwbl::readBody(pwr_tStatus *sts, wb_orep *o, cdh_eBix bix, void *p)
return
p
;
}
return
n
->
rbody
;
case
cdh
_eBix_dev
:
case
pwr
_eBix_dev
:
if
(
n
->
dbody_size
==
0
)
{
*
sts
=
LDH__NOSUCHBODY
;
return
0
;
...
...
wb/lib/wb/src/wb_vrepwbl.h
View file @
d346aed5
...
...
@@ -14,9 +14,6 @@
#include "wb_attrname.h"
#define WBL_FILEMAX 500
#define wbl_eBix_SysBody 1
#define wbl_eBix_RtBody 1
#define wbl_eBix_DevBody 2
class
wb_orepwbl
;
...
...
@@ -65,11 +62,11 @@ public:
virtual
void
iterDbody
(
wb_dbs
*
);
#if 0
void iterObject( void *udata,
pwr_tStatus (*bc)(void *,pwr_tOid, pwr_tCid, pwr_tOid, pwr_tOid,
pwr_tOid, pwr_tOid, pwr_tOid, const char *,
pwr_tTime, int, int));
pwr_tStatus (*bc)(void *,pwr_tOid, pwr_tCid, pwr_tOid, pwr_tOid,
pwr_tOid, pwr_tOid, pwr_tOid, const char *,
pwr_tTime, int, int));
void iterBody( void *udata,
pwr_tStatus (*bc)(void *,pwr_tOid, void *, void *));
pwr_tStatus (*bc)(void *,pwr_tOid, void *, void *));
#endif
int
load
(
const
char
*
fname
);
int
load_files
(
const
char
*
file_spec
);
...
...
@@ -86,17 +83,17 @@ public:
bool
registerObject
(
pwr_tOix
oix
,
ref_wblnode
node
);
int
nextOix
()
{
return
++
next_oix
;
}
int
classNameToCid
(
const
char
*
name
,
pwr_tCid
*
cid
);
int
getTemplateBody
(
pwr_tCid
cid
,
int
bix
,
int
*
size
,
void
**
body
);
int
getTemplateBody
(
pwr_tCid
cid
,
pwr_eBix
bix
,
int
*
size
,
void
**
body
);
int
getTypeInfo
(
pwr_tTid
tid
,
pwr_eType
*
type
,
int
*
size
,
int
*
elements
);
int
*
elements
);
int
getTypeInfo
(
const
char
*
type
,
pwr_tTid
*
tid
,
pwr_eType
*
type
,
int
*
size
,
int
*
elements
);
int
*
elements
);
int
getClassInfo
(
pwr_tCid
cid
,
int
*
rsize
,
int
*
dsize
);
int
getAttrInfo
(
const
char
*
attr
,
cdh
_eBix
bix
,
pwr_tCid
cid
,
int
*
size
,
int
*
offset
,
pwr_tTid
*
tid
,
int
*
elements
,
pwr_eType
*
type
);
int
getAttrInfoRec
(
wb_attrname
*
attr
,
cdh
_eBix
bix
,
pwr_tCid
cid
,
int
*
size
,
int
*
offset
,
pwr_tTid
*
tid
,
int
*
elements
,
pwr_eType
*
type
,
int
level
);
int
getAttrInfo
(
const
char
*
attr
,
pwr
_eBix
bix
,
pwr_tCid
cid
,
int
*
size
,
int
*
offset
,
pwr_tTid
*
tid
,
int
*
elements
,
pwr_eType
*
type
);
int
getAttrInfoRec
(
wb_attrname
*
attr
,
pwr
_eBix
bix
,
pwr_tCid
cid
,
int
*
size
,
int
*
offset
,
pwr_tTid
*
tid
,
int
*
elements
,
pwr_eType
*
type
,
int
level
);
ref_wblnode
findObject
(
pwr_tOix
oix
);
ref_wblnode
findClass
(
const
char
*
name
);
ref_wblnode
findType
(
const
char
*
name
);
...
...
@@ -145,13 +142,13 @@ public:
bool
commit
(
pwr_tStatus
*
sts
)
{
return
false
;};
bool
abort
(
pwr_tStatus
*
sts
)
{
return
false
;};
virtual
bool
writeAttribute
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
cdh
_eBix
bix
,
unsigned
int
offset
,
unsigned
int
size
,
void
*
p
)
{
return
false
;};
virtual
bool
writeAttribute
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
pwr
_eBix
bix
,
unsigned
int
offset
,
unsigned
int
size
,
void
*
p
)
{
return
false
;};
virtual
void
*
readAttribute
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
cdh
_eBix
bix
,
unsigned
int
offset
,
unsigned
int
size
,
void
*
p
);
virtual
void
*
readAttribute
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
pwr
_eBix
bix
,
unsigned
int
offset
,
unsigned
int
size
,
void
*
p
);
virtual
void
*
readBody
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
cdh
_eBix
bix
,
void
*
p
);
virtual
void
*
readBody
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
pwr
_eBix
bix
,
void
*
p
);
virtual
bool
writeBody
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
cdh
_eBix
bix
,
void
*
p
)
{
return
false
;};
virtual
bool
writeBody
(
pwr_tStatus
*
sts
,
wb_orep
*
o
,
pwr
_eBix
bix
,
void
*
p
)
{
return
false
;};
wb_orep
*
ancestor
(
pwr_tStatus
*
sts
,
wb_orep
*
o
);
...
...
wb/lib/wb/src/wb_wblnode.cpp
View file @
d346aed5
...
...
@@ -384,10 +384,10 @@ void wb_wblnode::build( bool recursive)
m_oid
.
vid
=
m_vrep
->
vid
();
if
(
isClassDef
())
{
m_vrep
->
getTemplateBody
(
m_cid
,
cdh
_eBix_sys
,
&
rbody_size
,
&
rbody
);
m_vrep
->
getTemplateBody
(
m_cid
,
pwr
_eBix_sys
,
&
rbody_size
,
&
rbody
);
}
else
if
(
isType
()
||
isTypeDef
())
{
m_vrep
->
getTemplateBody
(
m_cid
,
cdh
_eBix_sys
,
&
rbody_size
,
&
rbody
);
m_vrep
->
getTemplateBody
(
m_cid
,
pwr
_eBix_sys
,
&
rbody_size
,
&
rbody
);
}
else
if
(
isTemplate
())
{
// Build later by classdef
...
...
@@ -400,8 +400,8 @@ void wb_wblnode::build( bool recursive)
tot_size
+=
rbody_size
+
dbody_size
;
// cout << name() << ": " << tot_size << " " << rbody_size << " " << dbody_size << endl;
m_vrep
->
getTemplateBody
(
m_cid
,
cdh
_eBix_rt
,
&
rbody_size
,
&
rbody
);
m_vrep
->
getTemplateBody
(
m_cid
,
cdh
_eBix_dev
,
&
dbody_size
,
&
dbody
);
m_vrep
->
getTemplateBody
(
m_cid
,
pwr
_eBix_rt
,
&
rbody_size
,
&
rbody
);
m_vrep
->
getTemplateBody
(
m_cid
,
pwr
_eBix_dev
,
&
dbody_size
,
&
dbody
);
}
ref_wblnode
first_child
;
...
...
@@ -434,7 +434,7 @@ void wb_wblnode::build( bool recursive)
child
->
buildObjBodyDef
(
this
);
((
pwr_sClassDef
*
)
rbody
)
->
NumOfObjBodies
++
;
if
(
cdh_oixToBix
(
child
->
m_oid
.
oix
)
==
cdh
_eBix_rt
)
if
(
cdh_oixToBix
(
child
->
m_oid
.
oix
)
==
pwr
_eBix_rt
)
((
pwr_sClassDef
*
)
rbody
)
->
Flags
.
b
.
RtBody
=
1
;
wb_wblnode
*
attr
=
child
->
o_fch
;
...
...
@@ -633,20 +633,20 @@ void wb_wblnode::buildBuffer( ref_wblnode classdef, ref_wblnode objbodydef,
void
wb_wblnode
::
buildTemplate
(
ref_wblnode
classdef
)
{
wb_wblnode
*
objbodydef
=
classdef
->
o_fch
;
m_oid
.
oix
=
cdh_cixToOix
(
classdef
->
c_cix
,
cdh
_eBix_template
,
0
);
m_oid
.
oix
=
cdh_cixToOix
(
classdef
->
c_cix
,
pwr
_eBix_template
,
0
);
if
(
!
m_vrep
->
registerObject
(
m_oid
.
oix
,
this
))
m_vrep
->
error
(
"Duplicate template oix"
,
getFileName
(),
line_number
);
while
(
objbodydef
)
{
if
(
objbodydef
->
isObjBodyDef
())
{
if
(
objbodydef
->
b_bix
==
cdh
_eBix_sys
||
objbodydef
->
b_bix
==
cdh
_eBix_rt
)
{
if
(
objbodydef
->
b_bix
==
pwr
_eBix_sys
||
objbodydef
->
b_bix
==
pwr
_eBix_rt
)
{
rbody_size
=
objbodydef
->
b_size
;
if
(
rbody_size
)
{
rbody
=
calloc
(
1
,
rbody_size
);
}
}
if
(
objbodydef
->
b_bix
==
cdh
_eBix_dev
)
{
if
(
objbodydef
->
b_bix
==
pwr
_eBix_dev
)
{
dbody_size
=
objbodydef
->
b_size
;
if
(
dbody_size
)
dbody
=
calloc
(
1
,
dbody_size
);
...
...
@@ -669,11 +669,11 @@ void wb_wblnode::buildBody( ref_wblnode object)
switch
(
getType
())
{
case
tokens
.
BODY
:
if
(
cdh_NoCaseStrcmp
(
name
(),
"SysBody"
)
==
0
)
bix
=
cdh
_eBix_sys
;
bix
=
pwr
_eBix_sys
;
else
if
(
cdh_NoCaseStrcmp
(
name
(),
"RtBody"
)
==
0
)
bix
=
cdh
_eBix_rt
;
bix
=
pwr
_eBix_rt
;
else
if
(
cdh_NoCaseStrcmp
(
name
(),
"DevBody"
)
==
0
)
bix
=
cdh
_eBix_dev
;
bix
=
pwr
_eBix_dev
;
else
{
// Body exception
m_vrep
->
error
(
"Bad body name"
,
getFileName
(),
line_number
);
...
...
@@ -729,12 +729,12 @@ void wb_wblnode::buildAttr( ref_wblnode object, int bix)
}
if
(
!
m_vrep
->
getAttrInfo
(
name
(),
(
cdh
_eBix
)
bix
,
object
->
m_cid
,
&
size
,
&
offset
,
if
(
!
m_vrep
->
getAttrInfo
(
name
(),
(
pwr
_eBix
)
bix
,
object
->
m_cid
,
&
size
,
&
offset
,
&
tid
,
&
elements
,
&
type
))
{
// This might be string special syntax
wb_attrname
n
=
wb_attrname
(
name
());
if
(
n
.
hasAttrIndex
()
&&
m_vrep
->
getAttrInfo
(
n
.
attribute
(),
(
cdh
_eBix
)
bix
,
object
->
m_cid
,
&
size
,
m_vrep
->
getAttrInfo
(
n
.
attribute
(),
(
pwr
_eBix
)
bix
,
object
->
m_cid
,
&
size
,
&
offset
,
&
tid
,
&
elements
,
&
type
)
&&
elements
==
1
&&
(
type
==
pwr_eType_String
||
type
==
pwr_eType_Text
))
{
...
...
@@ -761,16 +761,16 @@ void wb_wblnode::buildAttr( ref_wblnode object, int bix)
goto
error_continue
;
}
if
(
((
bix
==
cdh_eBix_rt
||
bix
==
cdh
_eBix_sys
)
&&
if
(
((
bix
==
pwr_eBix_rt
||
bix
==
pwr
_eBix_sys
)
&&
object
->
rbody_size
==
0
)
||
(
bix
==
cdh
_eBix_dev
&&
object
->
dbody_size
==
0
))
{
(
bix
==
pwr
_eBix_dev
&&
object
->
dbody_size
==
0
))
{
m_vrep
->
error
(
"Attribute body"
,
getFileName
(),
line_number
);
return
;
}
if
(
((
bix
==
cdh_eBix_rt
||
bix
==
cdh
_eBix_sys
)
&&
if
(
((
bix
==
pwr_eBix_rt
||
bix
==
pwr
_eBix_sys
)
&&
offset
+
size
>
object
->
rbody_size
)
||
(
bix
==
cdh
_eBix_rt
&&
(
bix
==
pwr
_eBix_rt
&&
offset
+
size
>
object
->
rbody_size
))
{
m_vrep
->
error
(
"Mismatch in attribute offset"
,
getFileName
(),
line_number
);
return
;
...
...
@@ -786,21 +786,21 @@ void wb_wblnode::buildAttr( ref_wblnode object, int bix)
// printf( "Attr %s %s %d %d %s\n", object->name, name, size, offset, value);
if
(
size
==
sizeof
(
int_val
)
&&
convconst
(
&
int_val
,
value
))
{
if
(
oper
==
tokens
.
EQ
)
{
if
(
bix
==
cdh_eBix_rt
||
bix
==
cdh
_eBix_sys
)
if
(
bix
==
pwr_eBix_rt
||
bix
==
pwr
_eBix_sys
)
memcpy
(
(
char
*
)((
unsigned
int
)
object
->
rbody
+
offset
),
&
int_val
,
size
);
else
if
(
bix
==
cdh
_eBix_dev
)
else
if
(
bix
==
pwr
_eBix_dev
)
memcpy
(
(
char
*
)((
unsigned
int
)
object
->
dbody
+
offset
),
&
int_val
,
size
);
}
else
if
(
oper
==
tokens
.
OREQ
)
{
if
(
bix
==
cdh_eBix_rt
||
bix
==
cdh
_eBix_sys
)
{
if
(
bix
==
pwr_eBix_rt
||
bix
==
pwr
_eBix_sys
)
{
current_int_val
=
*
(
int
*
)
((
unsigned
int
)
object
->
rbody
+
offset
);
int_val
|=
current_int_val
;
memcpy
(
(
char
*
)((
unsigned
int
)
object
->
rbody
+
offset
),
&
int_val
,
size
);
}
else
if
(
bix
==
cdh
_eBix_dev
)
{
else
if
(
bix
==
pwr
_eBix_dev
)
{
current_int_val
=
*
(
int
*
)
((
unsigned
int
)
object
->
dbody
+
offset
);
int_val
|=
current_int_val
;
memcpy
(
(
char
*
)((
unsigned
int
)
object
->
dbody
+
offset
),
...
...
@@ -809,10 +809,10 @@ void wb_wblnode::buildAttr( ref_wblnode object, int bix)
}
}
else
if
(
attrStringToValue
(
type
,
value
,
buf
,
sizeof
(
buf
),
size
))
{
if
(
bix
==
cdh_eBix_rt
||
bix
==
cdh
_eBix_sys
)
if
(
bix
==
pwr_eBix_rt
||
bix
==
pwr
_eBix_sys
)
memcpy
(
(
char
*
)((
unsigned
int
)
object
->
rbody
+
offset
),
buf
,
size
);
else
if
(
bix
==
cdh
_eBix_dev
)
else
if
(
bix
==
pwr
_eBix_dev
)
memcpy
(
(
char
*
)((
unsigned
int
)
object
->
dbody
+
offset
),
buf
,
size
);
}
...
...
@@ -981,16 +981,16 @@ void wb_wblnode::buildBuffAttr( ref_wblnode object, int bix, pwr_tCid buffer_cid
goto
error_continue
;
}
if
(
((
bix
==
cdh_eBix_rt
||
bix
==
cdh
_eBix_sys
)
&&
if
(
((
bix
==
pwr_eBix_rt
||
bix
==
pwr
_eBix_sys
)
&&
object
->
rbody_size
==
0
)
||
(
bix
==
cdh
_eBix_dev
&&
object
->
dbody_size
==
0
))
{
(
bix
==
pwr
_eBix_dev
&&
object
->
dbody_size
==
0
))
{
m_vrep
->
error
(
"Attribute body"
,
getFileName
(),
line_number
);
return
;
}
if
(
((
bix
==
cdh_eBix_rt
||
bix
==
cdh
_eBix_sys
)
&&
if
(
((
bix
==
pwr_eBix_rt
||
bix
==
pwr
_eBix_sys
)
&&
offset
+
size
/
elements
>
object
->
rbody_size
)
||
(
bix
==
cdh
_eBix_rt
&&
(
bix
==
pwr
_eBix_rt
&&
offset
+
size
/
elements
>
object
->
rbody_size
))
{
m_vrep
->
error
(
"Mismatch in attribute offset"
,
getFileName
(),
line_number
);
return
;
...
...
@@ -1001,21 +1001,21 @@ void wb_wblnode::buildBuffAttr( ref_wblnode object, int bix, pwr_tCid buffer_cid
// printf( "Attr %s %s %d %d %s\n", object->name, name, size, offset, value);
if
(
size
/
elements
==
sizeof
(
int_val
)
&&
convconst
(
&
int_val
,
value
))
{
if
(
oper
==
tokens
.
EQ
)
{
if
(
bix
==
cdh_eBix_rt
||
bix
==
cdh
_eBix_sys
)
if
(
bix
==
pwr_eBix_rt
||
bix
==
pwr
_eBix_sys
)
memcpy
(
(
char
*
)((
unsigned
int
)
object
->
rbody
+
offset
),
&
int_val
,
size
/
elements
);
else
if
(
bix
==
cdh
_eBix_dev
)
else
if
(
bix
==
pwr
_eBix_dev
)
memcpy
(
(
char
*
)((
unsigned
int
)
object
->
dbody
+
offset
),
&
int_val
,
size
/
elements
);
}
else
if
(
oper
==
tokens
.
OREQ
)
{
if
(
bix
==
cdh_eBix_rt
||
bix
==
cdh
_eBix_sys
)
{
if
(
bix
==
pwr_eBix_rt
||
bix
==
pwr
_eBix_sys
)
{
current_int_val
=
*
(
int
*
)
((
unsigned
int
)
object
->
rbody
+
offset
);
int_val
|=
current_int_val
;
memcpy
(
(
char
*
)((
unsigned
int
)
object
->
rbody
+
offset
),
&
int_val
,
size
/
elements
);
}
else
if
(
bix
==
cdh
_eBix_dev
)
{
else
if
(
bix
==
pwr
_eBix_dev
)
{
current_int_val
=
*
(
int
*
)
((
unsigned
int
)
object
->
dbody
+
offset
);
int_val
|=
current_int_val
;
memcpy
(
(
char
*
)((
unsigned
int
)
object
->
dbody
+
offset
),
...
...
@@ -1024,10 +1024,10 @@ void wb_wblnode::buildBuffAttr( ref_wblnode object, int bix, pwr_tCid buffer_cid
}
}
else
if
(
attrStringToValue
(
type
,
value
,
buf
,
sizeof
(
buf
),
size
))
{
if
(
bix
==
cdh_eBix_rt
||
bix
==
cdh
_eBix_sys
)
if
(
bix
==
pwr_eBix_rt
||
bix
==
pwr
_eBix_sys
)
memcpy
(
(
char
*
)((
unsigned
int
)
object
->
rbody
+
offset
),
buf
,
size
/
elements
);
else
if
(
bix
==
cdh
_eBix_dev
)
else
if
(
bix
==
pwr
_eBix_dev
)
memcpy
(
(
char
*
)((
unsigned
int
)
object
->
dbody
+
offset
),
buf
,
size
/
elements
);
}
...
...
@@ -1262,7 +1262,7 @@ void wb_wblnode::registerNode( wb_vrepwbl *vol)
}
else
if
(
isObjBodyDef
())
{
b_bix
=
m_oid
.
oix
;
if
(
!
(
b_bix
==
cdh_eBix_rt
||
b_bix
==
cdh_eBix_sys
||
b_bix
==
cdh
_eBix_dev
))
if
(
!
(
b_bix
==
pwr_eBix_rt
||
b_bix
==
pwr_eBix_sys
||
b_bix
==
pwr
_eBix_dev
))
m_vrep
->
error
(
"Bad body index"
,
getFileName
(),
line_number
);
}
break
;
...
...
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