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
7ee89885
Commit
7ee89885
authored
Jul 08, 2004
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Creation of volume object added
parent
85036f2f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
3 deletions
+43
-3
wb/lib/wb/src/wb_vrepmem.cpp
wb/lib/wb/src/wb_vrepmem.cpp
+42
-2
wb/lib/wb/src/wb_vrepmem.h
wb/lib/wb/src/wb_vrepmem.h
+1
-1
No files found.
wb/lib/wb/src/wb_vrepmem.cpp
View file @
7ee89885
...
...
@@ -103,6 +103,12 @@ wb_orep *wb_vrepmem::object(pwr_tStatus *sts, pwr_tOid oid)
return
0
;
}
if
(
oid
.
oix
==
0
&&
!
volume_object
)
{
// Volume object is not created yet...
createVolumeObject
(
volume_name
);
}
mem_object
*
n
=
findObject
(
oid
.
oix
);
if
(
!
n
)
{
*
sts
=
LDH__NOSUCHOBJ
;
...
...
@@ -758,6 +764,38 @@ wb_orep *wb_vrepmem::createObject(pwr_tStatus *sts, wb_cdef cdef, wb_destination
return
o
;
}
bool
wb_vrepmem
::
createVolumeObject
(
char
*
name
)
{
pwr_tStatus
sts
;
wb_cdrep
*
cdrep
=
m_merep
->
cdrep
(
&
sts
,
m_cid
);
wb_cdef
cdef
=
wb_cdef
(
cdrep
);
mem_object
*
memo
=
new
mem_object
();
strcpy
(
memo
->
m_name
,
name
);
memo
->
m_oid
.
vid
=
m_vid
;
memo
->
m_oid
.
oix
=
0
;
memo
->
m_cid
=
m_cid
;
memo
->
m_flags
=
cdef
.
flags
();
memo
->
rbody_size
=
cdef
.
size
(
pwr_eBix_rt
);
if
(
memo
->
rbody_size
)
{
memo
->
rbody
=
malloc
(
memo
->
rbody_size
);
cdef
.
templateBody
(
&
sts
,
pwr_eBix_rt
,
memo
->
rbody
);
if
(
EVEN
(
sts
))
return
false
;
}
memo
->
dbody_size
=
cdef
.
size
(
pwr_eBix_dev
);
if
(
memo
->
dbody_size
)
{
memo
->
dbody
=
malloc
(
memo
->
dbody_size
);
cdef
.
templateBody
(
&
sts
,
pwr_eBix_dev
,
memo
->
dbody
);
if
(
EVEN
(
sts
))
return
false
;
}
volume_object
=
memo
;
registerObject
(
memo
->
m_oid
.
oix
,
memo
);
return
true
;
}
wb_orep
*
wb_vrepmem
::
copyObject
(
pwr_tStatus
*
sts
,
const
wb_orep
*
orep
,
wb_destination
&
d
,
wb_name
&
name
)
{
mem_object
*
dest
;
...
...
@@ -1734,8 +1772,10 @@ bool wb_vrepmem::commit(pwr_tStatus *sts)
bool
wb_vrepmem
::
abort
(
pwr_tStatus
*
sts
)
{
// Reload
clear
();
loadWbl
(
m_filename
,
sts
);
if
(
m_classeditor
)
{
clear
();
loadWbl
(
m_filename
,
sts
);
}
return
true
;
}
...
...
wb/lib/wb/src/wb_vrepmem.h
View file @
7ee89885
...
...
@@ -215,7 +215,7 @@ public:
bool
unregisterObject
(
pwr_tOix
oix
);
void
registerVolume
(
const
char
*
name
,
pwr_tCid
cid
,
pwr_tVid
vid
,
mem_object
*
node
);
void
info
();
bool
createVolumeObject
(
char
*
name
);
virtual
pwr_tOid
oid
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
)
{
return
pwr_cNOid
;}
...
...
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