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
d436e67e
Commit
d436e67e
authored
Dec 21, 2009
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Problem with incrementation of next cix and next oix for classvolumes in database fixed
parent
3573321f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
13 deletions
+53
-13
wb/lib/wb/src/wb_vrep.h
wb/lib/wb/src/wb_vrep.h
+5
-3
wb/lib/wb/src/wb_vrepced.cpp
wb/lib/wb/src/wb_vrepced.cpp
+18
-4
wb/lib/wb/src/wb_vrepdb.cpp
wb/lib/wb/src/wb_vrepdb.cpp
+18
-3
wb/lib/wb/src/wb_vrepdbms.cpp
wb/lib/wb/src/wb_vrepdbms.cpp
+12
-3
No files found.
wb/lib/wb/src/wb_vrep.h
View file @
d436e67e
...
...
@@ -50,14 +50,15 @@ protected:
pwr_tVid
m_vid
;
pwr_tCid
m_cid
;
vector
<
wb_srep
*>
m_srep
;
int
m_no_nix_incr
;
public:
virtual
~
wb_vrep
()
{};
wb_vrep
()
:
m_vid
(
pwr_cNVid
),
m_cid
(
pwr_cNCid
)
{}
wb_vrep
(
pwr_tVid
vid
)
:
m_vid
(
vid
),
m_cid
(
pwr_cNCid
)
{}
wb_vrep
(
pwr_tVid
vid
,
pwr_tCid
cid
)
:
m_vid
(
vid
),
m_cid
(
cid
)
{}
wb_vrep
()
:
m_vid
(
pwr_cNVid
),
m_cid
(
pwr_cNCid
)
,
m_no_nix_incr
(
0
)
{}
wb_vrep
(
pwr_tVid
vid
)
:
m_vid
(
vid
),
m_cid
(
pwr_cNCid
)
,
m_no_nix_incr
(
0
)
{}
wb_vrep
(
pwr_tVid
vid
,
pwr_tCid
cid
)
:
m_vid
(
vid
),
m_cid
(
cid
)
,
m_no_nix_incr
(
0
)
{}
virtual
void
unref
()
=
0
;
virtual
wb_vrep
*
ref
()
=
0
;
...
...
@@ -167,6 +168,7 @@ public:
void
removeSrep
(
wb_srep
*
srep
);
wb_srep
*
srep
(
pwr_tStatus
*
sts
);
wb_srep
*
nextSrep
(
pwr_tStatus
*
sts
,
wb_srep
*
srep
);
void
noNixIncr
(
int
incr
)
{
m_no_nix_incr
=
incr
;}
virtual
const
char
*
fileName
()
=
0
;
virtual
bool
time
(
pwr_tTime
*
t
)
{
return
false
;}
...
...
wb/lib/wb/src/wb_vrepced.cpp
View file @
d436e67e
...
...
@@ -106,7 +106,11 @@ wb_orep *wb_vrepced::createObject(pwr_tStatus *sts, wb_cdef cdef, wb_destination
strcpy
(
name_str
,
name
.
object
());
wb_name
n
(
name_str
);
if
(
soix
)
m_vrep
->
noNixIncr
(
1
);
wb_orep
*
o
=
m_vrep
->
createObject
(
sts
,
cdef
,
d
,
n
,
soix
);
if
(
soix
)
m_vrep
->
noNixIncr
(
0
);
if
(
ODD
(
*
sts
))
setFlagsNewAttribute
(
sts
,
o
);
...
...
@@ -141,7 +145,11 @@ wb_orep *wb_vrepced::copyObject(pwr_tStatus *sts, const wb_orep *orep, wb_destin
wb_name
n
(
name_str
);
if
(
soix
)
m_vrep
->
noNixIncr
(
1
);
wb_orep
*
o
=
m_vrep
->
copyObject
(
sts
,
orep
,
d
,
n
,
soix
);
if
(
soix
)
m_vrep
->
noNixIncr
(
0
);
if
(
ODD
(
*
sts
))
setFlagsNewAttribute
(
sts
,
o
);
...
...
@@ -652,8 +660,14 @@ bool wb_vrepced::importPasteObject(pwr_tOid destination, ldh_eDest destcode,
if
(
po
)
po
->
unref
();
return
m_vrep
->
importPasteObject
(
destination
,
destcode
,
keepoid
,
oid
,
cid
,
poid
,
boid
,
if
(
woidl
.
oix
!=
oid
.
oix
)
m_vrep
->
noNixIncr
(
1
);
bool
rsts
=
m_vrep
->
importPasteObject
(
destination
,
destcode
,
keepoid
,
oid
,
cid
,
poid
,
boid
,
name
,
flags
,
rbSize
,
dbSize
,
rbody
,
dbody
,
woidl
,
roid
);
if
(
woidl
.
oix
!=
oid
.
oix
)
m_vrep
->
noNixIncr
(
0
);
return
rsts
;
}
bool
wb_vrepced
::
classeditorCheck
(
ldh_eDest
dest_code
,
wb_orep
*
dest
,
pwr_tCid
cid
,
...
...
@@ -782,7 +796,7 @@ bool wb_vrepced::classeditorCheck( ldh_eDest dest_code, wb_orep *dest, pwr_tCid
}
case
pwr_eClass_ClassDef
:
{
// Child to ClassHier, oix from cix
pwr_tOix
cix
;
pwr_tOix
cix
=
0
;
if
(
!
fth
||
fth
->
cid
()
!=
pwr_eClass_ClassHier
)
{
if
(
fth
)
fth
->
unref
();
...
...
@@ -819,7 +833,7 @@ bool wb_vrepced::classeditorCheck( ldh_eDest dest_code, wb_orep *dest, pwr_tCid
case
pwr_eClass_TypeDef
:
{
// Child to TypeHier, oix from tix
pwr_tOix
tix
;
pwr_tOix
tix
=
0
;
if
(
!
fth
||
fth
->
cid
()
!=
pwr_eClass_TypeHier
)
{
if
(
fth
)
fth
->
unref
();
...
...
@@ -951,7 +965,7 @@ bool wb_vrepced::classeditorCheck( ldh_eDest dest_code, wb_orep *dest, pwr_tCid
return
false
;
}
pwr_tOix
aix
;
pwr_tOix
aix
=
0
;
nextAix
(
sts
,
fth
,
&
aix
);
if
(
EVEN
(
*
sts
))
return
false
;
...
...
wb/lib/wb/src/wb_vrepdb.cpp
View file @
d436e67e
...
...
@@ -357,7 +357,10 @@ wb_orep *wb_vrepdb::copyObject(pwr_tStatus *sts, const wb_orep *orep, wb_destina
pwr_tOid
woid
;
woid
.
oix
=
oix
;
woid
.
vid
=
m_vid
;
oid
=
m_db
->
new_oid
(
txn
,
woid
);
if
(
!
m_no_nix_incr
)
oid
=
m_db
->
new_oid
(
txn
,
woid
);
else
oid
=
woid
;
if
(
!
oid
.
oix
)
{
*
sts
=
LDH__BADOBJID
;
return
0
;
...
...
@@ -462,7 +465,10 @@ wb_orep* wb_vrepdb::createObject(pwr_tStatus *sts, wb_cdef cdef, wb_destination
pwr_tOid
woid
;
woid
.
oix
=
oix
;
woid
.
vid
=
m_vid
;
oid
=
m_db
->
new_oid
(
txn
,
woid
);
if
(
!
m_no_nix_incr
)
oid
=
m_db
->
new_oid
(
txn
,
woid
);
else
oid
=
woid
;
if
(
!
oid
.
oix
)
{
*
sts
=
LDH__BADOBJID
;
return
0
;
...
...
@@ -1138,6 +1144,12 @@ wb_orep *wb_vrepdb::child(pwr_tStatus *sts, const wb_orep *orp, wb_name &name)
try
{
wb_db_name
n
(
m_db
,
m_db
->
m_txn
,
orp
->
oid
(),
name
);
int
rc
=
n
.
get
(
m_db
->
m_txn
);
if
(
rc
)
{
*
sts
=
LDH__NOSUCHOBJ
;
return
0
;
}
m_ohead
.
get
(
m_db
->
m_txn
,
n
.
oid
());
return
new
(
this
)
wb_orepdb
(
&
m_ohead
.
m_o
);
}
...
...
@@ -1564,7 +1576,10 @@ bool wb_vrepdb::importPasteObject(pwr_tOid doid, ldh_eDest destcode,
}
if
(
cdh_ObjidIsNotNull
(
woid
))
{
oep
->
n_oid
=
m_db
->
new_oid
(
m_db
->
m_txn
,
woid
);
if
(
!
m_no_nix_incr
)
oep
->
n_oid
=
m_db
->
new_oid
(
m_db
->
m_txn
,
woid
);
else
oep
->
n_oid
=
woid
;
if
(
!
oep
->
n_oid
.
oix
)
oep
->
n_oid
=
m_db
->
new_oid
(
m_db
->
m_txn
);
}
...
...
wb/lib/wb/src/wb_vrepdbms.cpp
View file @
d436e67e
...
...
@@ -364,7 +364,10 @@ wb_orep *wb_vrepdbms::copyObject(pwr_tStatus *sts, const wb_orep *orep, wb_desti
pwr_tOid
woid
;
woid
.
oix
=
oix
;
woid
.
vid
=
m_vid
;
oid
=
m_db
->
new_oid
(
txn
,
woid
);
if
(
!
m_no_nix_incr
)
oid
=
m_db
->
new_oid
(
txn
,
woid
);
else
oid
=
woid
;
if
(
!
oid
.
oix
)
{
*
sts
=
LDH__BADOBJID
;
return
0
;
...
...
@@ -469,7 +472,10 @@ wb_orep* wb_vrepdbms::createObject(pwr_tStatus *sts, wb_cdef cdef, wb_destinatio
pwr_tOid
woid
;
woid
.
oix
=
oix
;
woid
.
vid
=
m_vid
;
oid
=
m_db
->
new_oid
(
txn
,
woid
);
if
(
!
m_no_nix_incr
)
oid
=
m_db
->
new_oid
(
txn
,
woid
);
else
oid
=
woid
;
if
(
!
oid
.
oix
)
{
*
sts
=
LDH__BADOBJID
;
return
0
;
...
...
@@ -1569,7 +1575,10 @@ bool wb_vrepdbms::importPasteObject(pwr_tOid doid, ldh_eDest destcode,
}
if
(
cdh_ObjidIsNotNull
(
woid
))
{
oep
->
n_oid
=
m_db
->
new_oid
(
m_db
->
m_txn
,
woid
);
if
(
!
m_no_nix_incr
)
oep
->
n_oid
=
m_db
->
new_oid
(
m_db
->
m_txn
,
woid
);
else
oep
->
n_oid
=
woid
;
if
(
!
oep
->
n_oid
.
oix
)
oep
->
n_oid
=
m_db
->
new_oid
(
m_db
->
m_txn
);
}
...
...
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