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
c2327079
Commit
c2327079
authored
Mar 23, 2004
by
lw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented wb_vrepdb::exportTree
parent
639f0163
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
1 deletion
+56
-1
wb/lib/wb/src/wb_vrepdb.cpp
wb/lib/wb/src/wb_vrepdb.cpp
+54
-0
wb/lib/wb/src/wb_vrepdb.h
wb/lib/wb/src/wb_vrepdb.h
+2
-1
No files found.
wb/lib/wb/src/wb_vrepdb.cpp
View file @
c2327079
...
...
@@ -1170,6 +1170,60 @@ bool wb_vrepdb::exportMeta(wb_import &i)
}
bool
wb_vrepdb
::
exportTree
(
wb_treeimport
&
i
,
pwr_tOid
oid
)
{
return
exportTreeHelper
(
i
,
oid
,
true
);
}
bool
wb_vrepdb
::
exportTreeHelper
(
wb_treeimport
&
i
,
pwr_tOid
oid
,
bool
isRoot
)
{
m_ohead
.
get
(
m_db
->
m_txn
,
oid
);
void
*
rbody
=
0
;
void
*
dbody
=
0
;
int
rbSize
=
m_ohead
.
rbSize
();
int
dbSize
=
m_ohead
.
dbSize
();
if
(
rbSize
)
{
rbody
=
(
void
*
)
malloc
(
rbSize
);
wb_db_rbody
rb
(
m_db
,
oid
);
int
rc
=
rb
.
get
(
m_db
->
m_txn
,
0
,
rbSize
,
rbody
);
if
(
rc
)
printf
(
"wb_vrepdbs::exportTreeObject, rb.get: %d
\n
"
,
rc
);
}
if
(
dbSize
)
{
dbody
=
(
void
*
)
malloc
(
dbSize
);
wb_db_dbody
db
(
m_db
,
oid
);
int
rc
=
db
.
get
(
m_db
->
m_txn
,
0
,
dbSize
,
dbody
);
if
(
rc
)
printf
(
"wb_vrepdbs::exportTreeObject, db.get: %d
\n
"
,
rc
);
}
pwr_mClassDef
flags
;
flags
.
m
=
0
;
// Fix !!!
if
(
isRoot
)
{
i
.
importTreeObject
(
m_merep
,
m_ohead
.
oid
(),
m_ohead
.
cid
(),
pwr_cNOid
,
pwr_cNOid
,
m_ohead
.
name
(),
flags
,
m_ohead
.
rbSize
(),
m_ohead
.
dbSize
(),
rbody
,
dbody
);
}
else
{
i
.
importTreeObject
(
m_merep
,
m_ohead
.
oid
(),
m_ohead
.
cid
(),
m_ohead
.
poid
(),
m_ohead
.
boid
(),
m_ohead
.
name
(),
flags
,
m_ohead
.
rbSize
(),
m_ohead
.
dbSize
(),
rbody
,
dbody
);
}
if
(
rbSize
)
free
(
rbody
);
if
(
dbSize
)
free
(
dbody
);
oid
=
m_ohead
.
foid
();
while
(
cdh_ObjidIsNotNull
(
oid
))
{
exportTreeHelper
(
i
,
oid
,
false
);
m_ohead
.
get
(
m_db
->
m_txn
,
oid
);
oid
=
m_ohead
.
aoid
();
}
return
true
;
}
wb_orepdb
*
wb_vrepdb
::
new_wb_orepdb
(
size_t
size
)
{
wb_orepdb
*
o
=
(
wb_orepdb
*
)
calloc
(
1
,
size
);
...
...
wb/lib/wb/src/wb_vrepdb.h
View file @
c2327079
...
...
@@ -169,7 +169,8 @@ public:
virtual
bool
exportMeta
(
wb_import
&
e
);
virtual
bool
exportTree
(
wb_treeimport
&
i
,
pwr_tOid
oid
)
{
return
false
;}
virtual
bool
exportTree
(
wb_treeimport
&
i
,
pwr_tOid
oid
);
bool
exportTreeHelper
(
wb_treeimport
&
i
,
pwr_tOid
oid
,
bool
isRoot
);
virtual
bool
importTree
(
bool
keepref
)
{
return
false
;}
virtual
bool
importTreeObject
(
wb_merep
*
merep
,
pwr_tOid
oid
,
pwr_tCid
cid
,
pwr_tOid
poid
,
pwr_tOid
boid
,
const
char
*
name
,
pwr_mClassDef
flags
,
...
...
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