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
42796fb9
Commit
42796fb9
authored
Nov 06, 2007
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updateMeta: object aref inserted if size changed
parent
d721c63b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
38 deletions
+35
-38
wb/lib/wb/src/wb_vrepdb.cpp
wb/lib/wb/src/wb_vrepdb.cpp
+35
-38
No files found.
wb/lib/wb/src/wb_vrepdb.cpp
View file @
42796fb9
/*
* Proview $Id: wb_vrepdb.cpp,v 1.5
7 2007-11-06 13:29:38
claes Exp $
* Proview $Id: wb_vrepdb.cpp,v 1.5
8 2007-11-06 16:57:55
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -1868,45 +1868,23 @@ int wb_vrepdb::updateArefs(pwr_tOid oid, pwr_tCid cid)
continue
;
}
if
(
arp
->
Flags
.
b
.
Object
)
{
// Check if rbody size of changed
pwr_tCid
cid
=
aohead
.
cid
();
sClass
*
cp
=
(
sClass
*
)
tree_Find
(
&
sts
,
m_class_th
,
&
cid
);
sAttributeKey
k
;
k
.
cid
=
aohead
.
cid
();
k
.
bix
=
bix
;
k
.
oStart
=
arp
->
Offset
;
k
.
oEnd
=
arp
->
Offset
+
arp
->
Size
-
1
;
sAttribute
*
cap
=
(
sAttribute
*
)
tree_Find
(
&
sts
,
m_attribute_th
,
&
k
);
if
(
cp
&&
cp
->
n_rbsize
!=
cp
->
o_rbsize
)
{
arp
->
Size
=
cp
->
n_rbsize
;
nAref
[
ap
->
key
.
bix
-
1
]
++
;
if
(
cap
!=
0
)
{
nAref
[
ap
->
key
.
bix
-
1
]
++
;
if
(
arp
->
Size
>
cap
->
o
.
aref
.
Size
)
{
arp
->
Offset
=
0
;
arp
->
Size
=
n_bdrep
->
size
();
}
}
else
{
sAttributeKey
k
;
k
.
cid
=
aohead
.
cid
();
k
.
bix
=
bix
;
k
.
oStart
=
arp
->
Offset
;
k
.
oEnd
=
arp
->
Offset
+
arp
->
Size
-
1
;
sAttribute
*
cap
=
(
sAttribute
*
)
tree_Find
(
&
sts
,
m_attribute_th
,
&
k
);
if
(
cap
!=
0
)
{
nAref
[
ap
->
key
.
bix
-
1
]
++
;
if
(
arp
->
Size
>
cap
->
o
.
aref
.
Size
)
{
arp
->
Offset
=
0
;
arp
->
Size
=
n_bdrep
->
size
();
}
else
if
(
arp
->
Offset
==
cap
->
o
.
aref
.
Offset
&&
arp
->
Size
==
cap
->
o
.
aref
.
Size
)
{
arp
->
Offset
=
cap
->
n
.
aref
.
Offset
;
arp
->
Size
=
cap
->
n
.
aref
.
Size
;
}
else
if
(
cap
->
o
.
aref
.
Flags
.
b
.
Array
)
{
pwr_tUInt32
oElementSize
=
cap
->
o
.
aref
.
Size
/
cap
->
o
.
nElement
;
pwr_tUInt32
oOffset
=
arp
->
Offset
-
cap
->
o
.
aref
.
Offset
;
pwr_tUInt32
index
=
oOffset
/
oElementSize
;
pwr_tUInt32
nElementSize
=
cap
->
n
.
aref
.
Size
/
cap
->
n
.
nElement
;
if
(
index
>=
cap
->
n
.
nElement
)
{
index
=
cap
->
n
.
nElement
-
1
;
}
arp
->
Offset
=
cap
->
n
.
aref
.
Offset
+
(
index
*
nElementSize
);
arp
->
Size
=
nElementSize
;
}
else
if
(
arp
->
Offset
==
cap
->
o
.
aref
.
Offset
&&
arp
->
Size
==
cap
->
o
.
aref
.
Size
)
{
arp
->
Offset
=
cap
->
n
.
aref
.
Offset
;
arp
->
Size
=
cap
->
n
.
aref
.
Size
;
}
}
}
catch
(
DbException
&
e
)
{
...
...
@@ -2228,6 +2206,25 @@ void wb_vrepdb::checkAttributes(pwr_tCid cid)
wb_bdrep
*
o_bdrep
=
o_cdrep
->
bdrep
(
&
sts
,
bix
);
if
(
ODD
(
sts
))
{
pwr_tCid
body
=
o_cdrep
->
cid
()
|
o_bdrep
->
bix
();
if
(
o_bdrep
->
size
()
!=
n_bdrep
->
size
())
{
sAttributeKey
ak
;
sAttribute
*
ap
;
ak
.
cid
=
cid
;
ak
.
bix
=
bix
;
ak
.
oStart
=
0
;
ak
.
oEnd
=
o_bdrep
->
size
()
-
1
;
ap
=
(
sAttribute
*
)
tree_Insert
(
&
sts
,
m_attribute_th
,
&
ak
);
ap
->
o
.
aref
.
Size
=
o_bdrep
->
size
();
ap
->
o
.
aref
.
Offset
=
0
;
ap
->
o
.
aref
.
Body
=
bix
;
ap
->
o
.
aref
.
Flags
.
b
.
Object
=
1
;
ap
->
n
.
aref
.
Size
=
n_bdrep
->
size
();
ap
->
n
.
aref
.
Offset
=
0
;
ap
->
n
.
aref
.
Body
=
bix
;
ap
->
n
.
aref
.
Flags
.
b
.
Object
=
1
;
}
wb_adrep
*
o_adrep
=
o_bdrep
->
adrep
(
&
sts
);
while
(
ODD
(
sts
))
{
...
...
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