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
ca3eb8a3
Commit
ca3eb8a3
authored
Apr 10, 2003
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Flags in object head (not yet in dbs and db)
parent
b963ac2c
Changes
36
Hide whitespace changes
Inline
Side-by-side
Showing
36 changed files
with
189 additions
and
73 deletions
+189
-73
wb/exe/wb_cmd/src/os_linux/wb_cmd.cpp
wb/exe/wb_cmd/src/os_linux/wb_cmd.cpp
+1
-1
wb/lib/wb/src/wb_cdef.cpp
wb/lib/wb/src/wb_cdef.cpp
+6
-0
wb/lib/wb/src/wb_cdef.h
wb/lib/wb/src/wb_cdef.h
+1
-0
wb/lib/wb/src/wb_db.cpp
wb/lib/wb/src/wb_db.cpp
+1
-1
wb/lib/wb/src/wb_db.h
wb/lib/wb/src/wb_db.h
+1
-1
wb/lib/wb/src/wb_dbs.cpp
wb/lib/wb/src/wb_dbs.cpp
+1
-1
wb/lib/wb/src/wb_dbs.h
wb/lib/wb/src/wb_dbs.h
+1
-1
wb/lib/wb/src/wb_destination.cpp
wb/lib/wb/src/wb_destination.cpp
+0
-10
wb/lib/wb/src/wb_destination.h
wb/lib/wb/src/wb_destination.h
+2
-7
wb/lib/wb/src/wb_import.h
wb/lib/wb/src/wb_import.h
+1
-1
wb/lib/wb/src/wb_ldh.cpp
wb/lib/wb/src/wb_ldh.cpp
+7
-10
wb/lib/wb/src/wb_object.cpp
wb/lib/wb/src/wb_object.cpp
+7
-0
wb/lib/wb/src/wb_object.h
wb/lib/wb/src/wb_object.h
+2
-0
wb/lib/wb/src/wb_orep.h
wb/lib/wb/src/wb_orep.h
+1
-0
wb/lib/wb/src/wb_orepdb.cpp
wb/lib/wb/src/wb_orepdb.cpp
+7
-0
wb/lib/wb/src/wb_orepdb.h
wb/lib/wb/src/wb_orepdb.h
+1
-0
wb/lib/wb/src/wb_orepdbs.cpp
wb/lib/wb/src/wb_orepdbs.cpp
+6
-0
wb/lib/wb/src/wb_orepdbs.h
wb/lib/wb/src/wb_orepdbs.h
+1
-0
wb/lib/wb/src/wb_orepmem.cpp
wb/lib/wb/src/wb_orepmem.cpp
+5
-0
wb/lib/wb/src/wb_orepmem.h
wb/lib/wb/src/wb_orepmem.h
+1
-0
wb/lib/wb/src/wb_orepwbl.cpp
wb/lib/wb/src/wb_orepwbl.cpp
+5
-0
wb/lib/wb/src/wb_orepwbl.h
wb/lib/wb/src/wb_orepwbl.h
+1
-0
wb/lib/wb/src/wb_session.cpp
wb/lib/wb/src/wb_session.cpp
+59
-5
wb/lib/wb/src/wb_session.h
wb/lib/wb/src/wb_session.h
+2
-0
wb/lib/wb/src/wb_treeimport.h
wb/lib/wb/src/wb_treeimport.h
+3
-3
wb/lib/wb/src/wb_vrep.h
wb/lib/wb/src/wb_vrep.h
+1
-0
wb/lib/wb/src/wb_vrepdb.cpp
wb/lib/wb/src/wb_vrepdb.cpp
+6
-0
wb/lib/wb/src/wb_vrepdb.h
wb/lib/wb/src/wb_vrepdb.h
+4
-3
wb/lib/wb/src/wb_vrepdbs.cpp
wb/lib/wb/src/wb_vrepdbs.cpp
+4
-2
wb/lib/wb/src/wb_vrepdbs.h
wb/lib/wb/src/wb_vrepdbs.h
+4
-4
wb/lib/wb/src/wb_vrepmem.cpp
wb/lib/wb/src/wb_vrepmem.cpp
+12
-3
wb/lib/wb/src/wb_vrepmem.h
wb/lib/wb/src/wb_vrepmem.h
+6
-6
wb/lib/wb/src/wb_vrepwbl.cpp
wb/lib/wb/src/wb_vrepwbl.cpp
+3
-2
wb/lib/wb/src/wb_vrepwbl.h
wb/lib/wb/src/wb_vrepwbl.h
+4
-3
wb/lib/wb/src/wb_wblnode.cpp
wb/lib/wb/src/wb_wblnode.cpp
+21
-9
wb/lib/wb/src/wb_wblnode.h
wb/lib/wb/src/wb_wblnode.h
+1
-0
No files found.
wb/exe/wb_cmd/src/os_linux/wb_cmd.cpp
View file @
ca3eb8a3
...
...
@@ -176,7 +176,7 @@ static void cmd_save_cb( void *ctx)
return
;
}
if
(
cmd
->
wb_type
==
wb_eType_
Project
)
if
(
cmd
->
wb_type
==
wb_eType_
Directory
)
{
sts
=
lfu_SaveDirectoryVolume
(
cmd
->
ldhses
,
0
);
if
(
EVEN
(
sts
))
...
...
wb/lib/wb/src/wb_cdef.cpp
View file @
ca3eb8a3
...
...
@@ -88,6 +88,12 @@ pwr_tCid wb_cdef::cid()
return
m_cdrep
->
cid
();
}
pwr_mClassDef
wb_cdef
::
flags
()
{
check
();
return
m_cdrep
->
flags
();
}
const
char
*
wb_cdef
::
name
()
const
{
check
();
...
...
wb/lib/wb/src/wb_cdef.h
View file @
ca3eb8a3
...
...
@@ -39,6 +39,7 @@ public:
const
char
*
name
()
const
;
wb_name
longName
();
pwr_mClassDef
flags
();
wb_bdef
bdef
(
pwr_eBix
bix
);
wb_bdef
bdef
(
const
char
*
bname
);
...
...
wb/lib/wb/src/wb_db.cpp
View file @
ca3eb8a3
...
...
@@ -621,7 +621,7 @@ bool wb_db::importVolume(wb_export &e)
bool
wb_db
::
importHead
(
pwr_tOid
oid
,
pwr_tCid
cid
,
pwr_tOid
poid
,
pwr_tOid
boid
,
pwr_tOid
aoid
,
pwr_tOid
foid
,
pwr_tOid
loid
,
const
char
*
name
,
const
char
*
normname
,
const
char
*
name
,
const
char
*
normname
,
pwr_mClassDef
flags
,
pwr_tTime
ohTime
,
pwr_tTime
rbTime
,
pwr_tTime
dbTime
,
size_t
rbSize
,
size_t
dbSize
)
{
...
...
wb/lib/wb/src/wb_db.h
View file @
ca3eb8a3
...
...
@@ -86,7 +86,7 @@ public:
bool
importVolume
(
wb_export
&
e
);
bool
importHead
(
pwr_tOid
oid
,
pwr_tCid
cid
,
pwr_tOid
poid
,
pwr_tOid
boid
,
pwr_tOid
aoid
,
pwr_tOid
foid
,
pwr_tOid
loid
,
const
char
*
name
,
const
char
*
normname
,
pwr_tTime
ohTime
,
pwr_tOid
loid
,
const
char
*
name
,
const
char
*
normname
,
pwr_
mClassDef
flags
,
pwr_
tTime
ohTime
,
pwr_tTime
rbTime
,
pwr_tTime
dbTime
,
size_t
rbSize
,
size_t
dbSize
);
bool
importRbody
(
pwr_tOid
oid
,
size_t
size
,
void
*
body
);
...
...
wb/lib/wb/src/wb_dbs.cpp
View file @
ca3eb8a3
...
...
@@ -198,7 +198,7 @@ wb_dbs::checkObject(sOentry *oep)
bool
wb_dbs
::
importHead
(
pwr_tOid
oid
,
pwr_tCid
cid
,
pwr_tOid
poid
,
pwr_tOid
boid
,
pwr_tOid
aoid
,
pwr_tOid
foid
,
pwr_tOid
loid
,
const
char
*
name
,
const
char
*
normname
,
const
char
*
name
,
const
char
*
normname
,
pwr_mClassDef
flags
,
pwr_tTime
time
,
pwr_tTime
rbTime
,
pwr_tTime
dbTime
,
size_t
rbSize
,
size_t
dbSize
)
{
...
...
wb/lib/wb/src/wb_dbs.h
View file @
ca3eb8a3
...
...
@@ -135,7 +135,7 @@ public:
virtual
bool
importHead
(
pwr_tOid
oid
,
pwr_tCid
cid
,
pwr_tOid
poid
,
pwr_tOid
boid
,
pwr_tOid
aoid
,
pwr_tOid
foid
,
pwr_tOid
loid
,
const
char
*
name
,
const
char
*
normname
,
const
char
*
name
,
const
char
*
normname
,
pwr_mClassDef
flags
,
pwr_tTime
ohTime
,
pwr_tTime
rbTime
,
pwr_tTime
dbTime
,
size_t
rbSize
,
size_t
dbSize
);
...
...
wb/lib/wb/src/wb_destination.cpp
View file @
ca3eb8a3
...
...
@@ -13,13 +13,3 @@ wb_destination::wb_destination(wb_object &o, ldh_eDest code) :
{
}
bool
wb_destination
::
canAdopt
(
pwr_tCid
cid
)
{
switch
(
cid
)
{
case
pwr_cClass_MountObject
:
case
pwr_cClass_CreateVolume
:
return
false
;
default:
return
true
;
}
}
wb/lib/wb/src/wb_destination.h
View file @
ca3eb8a3
...
...
@@ -8,20 +8,15 @@ class wb_object;
class
wb_destination
{
public:
pwr_tOid
m_oid
;
ldh_eDest
m_code
;
public:
wb_destination
(
wb_object
&
object
,
ldh_eDest
code
);
wb_destination
(
pwr_tOid
oid
,
ldh_eDest
code
);
bool
canAdopt
(
pwr_tCid
cid
);
bool
canAdopt
(
pwr_tOid
oid
)
{
return
true
;}
// Fix
pwr_tOid
oid
()
{
return
m_oid
;}
ldh_eDest
code
()
{
return
m_code
;}
ldh_eDest
code
()
{
return
m_code
;}
};
#endif
...
...
wb/lib/wb/src/wb_import.h
View file @
ca3eb8a3
...
...
@@ -14,7 +14,7 @@ public:
virtual
bool
importHead
(
pwr_tOid
oid
,
pwr_tCid
cid
,
pwr_tOid
poid
,
pwr_tOid
boid
,
pwr_tOid
aoid
,
pwr_tOid
foid
,
pwr_tOid
loid
,
const
char
*
name
,
const
char
*
normname
,
const
char
*
name
,
const
char
*
normname
,
pwr_mClassDef
flags
,
pwr_tTime
ohTime
,
pwr_tTime
rbTime
,
pwr_tTime
dbTime
,
size_t
rbSize
,
size_t
dbSize
)
=
0
;
...
...
wb/lib/wb/src/wb_ldh.cpp
View file @
ca3eb8a3
...
...
@@ -851,10 +851,9 @@ ldh_IsOkCreateObject(ldh_tSession session, pwr_tCid cid, pwr_tOid oid, ldh_eDest
if
(
!
o
)
return
o
.
sts
();
wb_destination
d
=
o
.
destination
(
dest
);
if
(
!
d
.
canAdopt
(
cid
))
{
return
LDH__NOADOPT
;
}
if
(
!
sp
->
validateDestination
(
d
,
cid
))
return
sp
->
sts
();
return
LDH__SUCCESS
;
}
...
...
@@ -868,9 +867,8 @@ ldh_IsOkCopyObject(ldh_tSession session, pwr_tOid oid, pwr_tOid doid, ldh_eDest
if
(
!
o
)
return
o
.
sts
();
wb_destination
d
=
d_o
.
destination
(
dest
);
if
(
!
d
.
canAdopt
(
o
.
cid
()))
{
return
LDH__NOADOPT
;
}
if
(
!
sp
->
validateDestination
(
d
,
o
.
cid
()))
return
sp
->
sts
();
return
LDH__SUCCESS
;
}
...
...
@@ -885,9 +883,8 @@ ldh_IsOkMoveObject(ldh_tSession session, pwr_tOid oid, pwr_tOid doid, ldh_eDest
if
(
!
o
)
return
o
.
sts
();
wb_destination
d
=
d_o
.
destination
(
dest
);
if
(
!
d
.
canAdopt
(
o
))
{
return
LDH__NOADOPT
;
}
if
(
!
sp
->
validateDestination
(
d
,
o
.
cid
()))
return
sp
->
sts
();
return
LDH__SUCCESS
;
}
...
...
wb/lib/wb/src/wb_object.cpp
View file @
ca3eb8a3
...
...
@@ -271,6 +271,13 @@ pwr_tTime wb_object::ohTime()
return
m_orep
->
ohTime
();
}
pwr_mClassDef
wb_object
::
flags
()
{
check
();
return
m_orep
->
flags
();
}
bool
wb_object
::
operator
==
(
wb_object
&
x
)
{
check
();
...
...
wb/lib/wb/src/wb_object.h
View file @
ca3eb8a3
...
...
@@ -67,6 +67,8 @@ public:
pwr_tTime
rbTime
();
//< time when run time body of this object was last changed
pwr_tTime
dbTime
();
//< time when development body of this object was last changed
pwr_mClassDef
flags
();
size_t
rbSize
();
//< size of run time body
size_t
dbSize
();
//< size of development body
...
...
wb/lib/wb/src/wb_orep.h
View file @
ca3eb8a3
...
...
@@ -41,6 +41,7 @@ public:
virtual
const
char
*
name
()
const
=
0
;
virtual
wb_name
longName
()
=
0
;
virtual
pwr_tTime
ohTime
()
const
=
0
;
virtual
pwr_mClassDef
flags
()
const
=
0
;
virtual
bool
isOffspringOf
(
const
wb_orep
*
o
)
const
=
0
;
...
...
wb/lib/wb/src/wb_orepdb.cpp
View file @
ca3eb8a3
...
...
@@ -116,6 +116,13 @@ pwr_tTime wb_orepdb::ohTime() const
return
m_vrep
->
ohTime
(
&
sts
,
(
wb_orep
*
)
this
);
}
pwr_mClassDef
wb_orepdb
::
flags
()
const
{
pwr_tStatus
sts
;
return
m_vrep
->
flags
(
&
sts
,
(
wb_orep
*
)
this
);
}
bool
wb_orepdb
::
isOffspringOf
(
const
wb_orep
*
o
)
const
{
pwr_tStatus
sts
;
...
...
wb/lib/wb/src/wb_orepdb.h
View file @
ca3eb8a3
...
...
@@ -36,6 +36,7 @@ public:
virtual
const
char
*
name
()
const
;
virtual
wb_name
longName
();
virtual
pwr_tTime
ohTime
()
const
;
virtual
pwr_mClassDef
flags
()
const
;
virtual
bool
isOffspringOf
(
const
wb_orep
*
o
)
const
;
...
...
wb/lib/wb/src/wb_orepdbs.cpp
View file @
ca3eb8a3
...
...
@@ -137,6 +137,12 @@ pwr_tTime wb_orepdbs::ohTime() const
return
m_o
->
time
;
}
pwr_mClassDef
wb_orepdbs
::
flags
()
const
{
pwr_mClassDef
flags
;
flags
.
m
=
0
;
// Fix !!!
return
flags
;
}
bool
wb_orepdbs
::
isOffspringOf
(
const
wb_orep
*
o
)
const
{
return
false
;
...
...
wb/lib/wb/src/wb_orepdbs.h
View file @
ca3eb8a3
...
...
@@ -39,6 +39,7 @@ public:
virtual
const
char
*
name
()
const
;
virtual
wb_name
longName
();
virtual
pwr_tTime
ohTime
()
const
;
virtual
pwr_mClassDef
flags
()
const
;
virtual
bool
isOffspringOf
(
const
wb_orep
*
o
)
const
;
...
...
wb/lib/wb/src/wb_orepmem.cpp
View file @
ca3eb8a3
...
...
@@ -88,6 +88,11 @@ pwr_tTime wb_orepmem::ohTime() const
return
t
;
}
pwr_mClassDef
wb_orepmem
::
flags
()
const
{
return
m_memobject
->
m_flags
;
}
bool
wb_orepmem
::
isOffspringOf
(
const
wb_orep
*
o
)
const
{
...
...
wb/lib/wb/src/wb_orepmem.h
View file @
ca3eb8a3
...
...
@@ -35,6 +35,7 @@ public:
virtual
const
char
*
name
()
const
;
virtual
wb_name
longName
();
virtual
pwr_tTime
ohTime
()
const
;
virtual
pwr_mClassDef
flags
()
const
;
virtual
bool
isOffspringOf
(
const
wb_orep
*
o
)
const
;
...
...
wb/lib/wb/src/wb_orepwbl.cpp
View file @
ca3eb8a3
...
...
@@ -88,6 +88,11 @@ pwr_tTime wb_orepwbl::ohTime() const
}
pwr_mClassDef
wb_orepwbl
::
flags
()
const
{
return
m_wblnode
->
o
->
m_flags
;
}
bool
wb_orepwbl
::
isOffspringOf
(
const
wb_orep
*
o
)
const
{
return
true
;
...
...
wb/lib/wb/src/wb_orepwbl.h
View file @
ca3eb8a3
...
...
@@ -35,6 +35,7 @@ public:
virtual
const
char
*
name
()
const
;
virtual
wb_name
longName
();
virtual
pwr_tTime
ohTime
()
const
;
virtual
pwr_mClassDef
flags
()
const
;
virtual
bool
isOffspringOf
(
const
wb_orep
*
o
)
const
;
...
...
wb/lib/wb/src/wb_session.cpp
View file @
ca3eb8a3
...
...
@@ -68,6 +68,9 @@ wb_object wb_session::createObject(wb_cdef cdef, wb_destination d, wb_name name)
if
(
isReadonly
())
throw
wb_error_str
(
"ReadOnlySession"
);
validateDestination
(
d
,
cdef
.
cid
());
if
(
evenSts
())
return
wb_object
();
wb_object
parent
;
switch
(
d
.
code
())
{
case
ldh_eDest_IntoFirst
:
...
...
@@ -105,6 +108,9 @@ wb_object wb_session::copyObject(wb_object o, wb_destination d, wb_name name)
if
(
isReadonly
())
throw
wb_error_str
(
"ReadOnlySession"
);
validateDestination
(
d
,
o
.
cid
());
if
(
evenSts
())
return
wb_object
();
wb_object
parent
;
switch
(
d
.
code
())
{
case
ldh_eDest_IntoFirst
:
...
...
@@ -141,6 +147,9 @@ bool wb_session::moveObject(wb_object o, wb_destination d)
if
(
isReadonly
())
throw
wb_error_str
(
"ReadOnlySession"
);
validateDestination
(
d
,
o
.
cid
());
if
(
evenSts
())
return
false
;
wb_object
parent
;
switch
(
d
.
code
())
{
case
ldh_eDest_IntoFirst
:
...
...
@@ -369,6 +378,7 @@ bool wb_session::pasteOset( pwr_tOid doid, ldh_eDest dest,
throw
wb_error_str
(
"ReadOnlySession"
);
m_sts
=
LDH__SUCCESS
;
wb_destination
d
=
wb_destination
(
doid
,
dest
);
wb_vrepmem
*
mem
;
// Get last buffer
...
...
@@ -394,6 +404,18 @@ bool wb_session::pasteOset( pwr_tOid doid, ldh_eDest dest,
return
false
;
}
// Check that rootobjects are valid for this destination
pwr_tStatus
sts
;
wb_orep
*
orep
=
mem
->
object
(
&
sts
);
while
(
ODD
(
sts
))
{
orep
->
ref
();
validateDestination
(
d
,
orep
->
cid
());
if
(
evenSts
())
return
false
;
wb_orep
*
prev
=
orep
;
orep
=
orep
->
after
(
&
sts
);
prev
->
unref
();
}
// Trigg ante adopt
wb_object
parent
;
switch
(
dest
)
{
...
...
@@ -410,7 +432,6 @@ bool wb_session::pasteOset( pwr_tOid doid, ldh_eDest dest,
}
if
(
parent
)
{
pwr_tStatus
sts
;
wb_orep
*
orep
=
mem
->
object
(
&
sts
);
while
(
ODD
(
sts
))
{
orep
->
ref
();
...
...
@@ -421,6 +442,7 @@ bool wb_session::pasteOset( pwr_tOid doid, ldh_eDest dest,
prev
->
unref
();
}
}
pwr_tOid
*
olist
;
mem
->
exportPaste
(
*
m_vrep
,
doid
,
dest
,
keepoid
,
&
olist
);
...
...
@@ -678,19 +700,51 @@ pwr_tStatus wb_session::callMenuMethod( ldh_sMenuCall *mcp, int Index)
{
pwr_tStatus
sts
=
LDH__SUCCESS
;
wb_tMethodMenu
method
=
(
wb_tMethodMenu
)
mcp
->
ItemList
[
Index
].
Method
;
// ldh_sEvent *ep;
// ep = eventStart(sp, pwr_cNObj
id, ldh_eEvent_MenuMethodCalled);
ldh_sEvent
*
ep
=
m_srep
->
eventStart
(
pwr_cNO
id
,
ldh_eEvent_MenuMethodCalled
);
if
(
method
!=
NULL
)
sts
=
(
*
method
)(
mcp
);
// eventSend(sp,
ep);
m_srep
->
eventSend
(
ep
);
return
sts
;
}
bool
wb_session
::
validateDestination
(
wb_destination
d
,
pwr_tCid
cid
)
{
wb_object
o
=
object
(
d
.
oid
());
// Get parent
wb_object
parent
=
wb_object
();
if
(
o
)
{
switch
(
d
.
code
())
{
case
ldh_eDest_After
:
case
ldh_eDest_Before
:
parent
=
o
.
parent
();
break
;
default:
parent
=
o
;
}
}
if
(
!
parent
)
{
// No parent, check if valid top object (for vrepmem all objects are valid topobjects)
wb_cdef
c
=
cdef
(
cid
);
if
(
!
c
.
flags
().
b
.
TopObject
&&
type
()
!=
ldh_eVolRep_Mem
)
{
m_sts
=
LDH__NOTOP
;
return
false
;
}
}
else
{
// Check if adoption is legal
if
(
parent
.
flags
().
b
.
NoAdopt
)
{
m_sts
=
LDH__NOADOPT
;
return
false
;
}
}
m_sts
=
LDH__SUCCESS
;
return
true
;
}
...
...
wb/lib/wb/src/wb_session.h
View file @
ca3eb8a3
...
...
@@ -89,6 +89,8 @@ public:
void
editorContext
(
void
*
ctx
)
{
m_srep
->
editorContext
(
ctx
);}
void
sendThisSession
(
ldh_tSessionCb
thisSessionCb
)
{
m_srep
->
sendThisSession
(
thisSessionCb
);}
void
sendOtherSession
(
ldh_tSessionCb
otherSessionCb
)
{
m_srep
->
sendOtherSession
(
otherSessionCb
);}
bool
wb_session
::
validateDestination
(
wb_destination
d
,
pwr_tCid
cid
);
};
...
...
wb/lib/wb/src/wb_treeimport.h
View file @
ca3eb8a3
...
...
@@ -28,12 +28,12 @@ public:
virtual
~
wb_treeimport
()
{}
virtual
bool
importTree
(
bool
keepref
)
=
0
;
virtual
bool
importTreeObject
(
wb_merep
*
merep
,
pwr_tOid
oid
,
pwr_tCid
cid
,
pwr_tOid
poid
,
pwr_tOid
boid
,
const
char
*
name
,
size_t
rbSize
,
size_t
dbSize
,
void
*
rbody
,
void
*
dbody
)
=
0
;
pwr_tOid
boid
,
const
char
*
name
,
pwr_mClassDef
flags
,
size_t
rbSize
,
size_t
dbSize
,
void
*
rbody
,
void
*
dbody
)
=
0
;
virtual
bool
importPaste
()
=
0
;
virtual
bool
importPasteObject
(
pwr_tOid
destination
,
ldh_eDest
destcode
,
bool
keepoid
,
pwr_tOid
oid
,
pwr_tCid
cid
,
pwr_tOid
poid
,
pwr_tOid
boid
,
const
char
*
name
,
pwr_tOid
boid
,
const
char
*
name
,
pwr_mClassDef
flags
,
size_t
rbSize
,
size_t
dbSize
,
void
*
rbody
,
void
*
dbody
,
pwr_tOid
*
roid
)
=
0
;
bool
importTranslationTableInsert
(
pwr_tOix
from
,
pwr_tOix
to
);
...
...
wb/lib/wb/src/wb_vrep.h
View file @
ca3eb8a3
...
...
@@ -62,6 +62,7 @@ public:
virtual
const
char
*
objectName
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
)
=
0
;
virtual
wb_name
longName
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
)
=
0
;
virtual
pwr_tTime
ohTime
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
)
=
0
;
virtual
pwr_mClassDef
flags
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
)
=
0
;
virtual
bool
isOffspringOf
(
pwr_tStatus
*
sts
,
const
wb_orep
*
child
,
const
wb_orep
*
parent
)
=
0
;
...
...
wb/lib/wb/src/wb_vrepdb.cpp
View file @
ca3eb8a3
...
...
@@ -506,6 +506,12 @@ pwr_tTime wb_vrepdb::ohTime(pwr_tStatus *sts, const wb_orep *orp)
}
}
pwr_mClassDef
wb_vrepdb
::
flags
(
pwr_tStatus
*
sts
,
const
wb_orep
*
orp
)
{
pwr_mClassDef
flags
;
flags
.
m
=
0
;
// Fix !!
return
flags
;
}
pwr_tVid
wb_vrepdb
::
vid
(
pwr_tStatus
*
sts
,
const
wb_orep
*
orp
)
{
*
sts
=
LDH__SUCCESS
;
...
...
wb/lib/wb/src/wb_vrepdb.h
View file @
ca3eb8a3
...
...
@@ -35,6 +35,7 @@ public:
virtual
wb_vrep
*
next
();
virtual
pwr_tTime
ohTime
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
);
virtual
pwr_mClassDef
flags
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
);
virtual
pwr_tOid
oid
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
);
virtual
pwr_tVid
vid
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
);
virtual
pwr_tOix
oix
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
);
...
...
@@ -125,14 +126,14 @@ public:
virtual
bool
exportTree
(
wb_treeimport
&
i
,
pwr_tOid
oid
)
{
return
false
;}
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
,
size_t
rbSize
,
size_t
dbSize
,
void
*
rbody
,
void
*
dbody
)
pwr_tOid
boid
,
const
char
*
name
,
pwr_mClassDef
flags
,
size_t
rbSize
,
size_t
dbSize
,
void
*
rbody
,
void
*
dbody
)
{
return
false
;}
virtual
bool
importPaste
()
{
return
false
;}
virtual
bool
importPasteObject
(
pwr_tOid
destination
,
ldh_eDest
destcode
,
bool
keepoid
,
pwr_tOid
oid
,
pwr_tCid
cid
,
pwr_tOid
poid
,
pwr_tOid
boid
,
const
char
*
name
,
pwr_tOid
boid
,
const
char
*
name
,
pwr_mClassDef
flags
,
size_t
rbSize
,
size_t
dbSize
,
void
*
rbody
,
void
*
dbody
,
pwr_tOid
*
roid
)
{
return
false
;}
...
...
wb/lib/wb/src/wb_vrepdbs.cpp
View file @
ca3eb8a3
...
...
@@ -445,10 +445,11 @@ bool wb_vrepdbs::exportHead(wb_import &i)
{
dbs_sObject
*
op
=
0
;
pwr_tStatus
sts
;
pwr_mClassDef
flags
;
flags
.
m
=
0
;
// Fix !!!
while
((
op
=
dbs_NextHead
(
&
sts
,
dbsenv
(),
op
)))
{
i
.
importHead
(
op
->
oid
,
op
->
cid
,
op
->
poid
,
op
->
boid
,
op
->
aoid
,
op
->
foid
,
op
->
loid
,
op
->
name
,
op
->
normname
,
op
->
time
,
op
->
rbody
.
time
,
op
->
dbody
.
time
,
op
->
rbody
.
size
,
op
->
dbody
.
size
);
flags
,
op
->
time
,
op
->
rbody
.
time
,
op
->
dbody
.
time
,
op
->
rbody
.
size
,
op
->
dbody
.
size
);
}
return
true
;
...
...
@@ -516,7 +517,8 @@ bool wb_vrepdbs::exportTreeObject(wb_treeimport &i, dbs_sObject *op, bool isRoot
if
(
op
->
dbody
.
size
)
dbody
=
dbs_Body
(
&
sts
,
dbsenv
(),
op
,
pwr_eBix_dev
);
i
.
importTreeObject
(
m_merep
,
op
->
oid
,
op
->
cid
,
parentoid
,
beforeoid
,
op
->
name
,
pwr_mClassDef
flags
;
flags
.
m
=
0
;
// Fix !!!
i
.
importTreeObject
(
m_merep
,
op
->
oid
,
op
->
cid
,
parentoid
,
beforeoid
,
op
->
name
,
flags
,
op
->
rbody
.
size
,
op
->
dbody
.
size
,
rbody
,
dbody
);
if
(
first
)
...
...
wb/lib/wb/src/wb_vrepdbs.h
View file @
ca3eb8a3
...
...
@@ -53,7 +53,7 @@ public:
virtual
wb_name
longName
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
)
{
return
wb_name
();}
virtual
pwr_tTime
ohTime
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
)
{
pwr_tTime
t
=
{
0
,
0
};
return
t
;}
virtual
pwr_mClassDef
flags
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
)
{
pwr_mClassDef
f
;
f
.
m
=
0
;
return
f
;}
virtual
bool
isOffspringOf
(
pwr_tStatus
*
sts
,
const
wb_orep
*
child
,
const
wb_orep
*
parent
)
{
return
false
;}
...
...
@@ -135,14 +135,14 @@ public:
bool
wb_vrepdbs
::
exportTreeObject
(
wb_treeimport
&
i
,
dbs_sObject
*
op
,
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
,
size_t
rbSize
,
size_t
dbSize
,
void
*
rbody
,
void
*
dbody
)
pwr_tOid
boid
,
const
char
*
name
,
pwr_mClassDef
flags
,
size_t
rbSize
,
size_t
dbSize
,
void
*
rbody
,
void
*
dbody
)
{
return
false
;}
virtual
bool
importPaste
()
{
return
false
;}
virtual
bool
importPasteObject
(
pwr_tOid
destination
,
ldh_eDest
destcode
,
bool
keepoid
,
pwr_tOid
oid
,
pwr_tCid
cid
,
pwr_tOid
poid
,
pwr_tOid
boid
,
const
char
*
name
,
pwr_tOid
boid
,
const
char
*
name
,
pwr_mClassDef
flags
,
size_t
rbSize
,
size_t
dbSize
,
void
*
rbody
,
void
*
dbody
,
pwr_tOid
*
roid
)
{
return
false
;}
...
...
wb/lib/wb/src/wb_vrepmem.cpp
View file @
ca3eb8a3
...
...
@@ -594,6 +594,7 @@ wb_orep *wb_vrepmem::createObject(pwr_tStatus *sts, wb_cdef cdef, wb_destination
memo
->
m_oid
.
oix
=
oix
;
memo
->
m_oid
.
vid
=
m_vid
;
memo
->
m_cid
=
cdef
.
cid
();
memo
->
m_flags
=
cdef
.
flags
();
memo
->
rbody_size
=
cdef
.
size
(
pwr_eBix_rt
);
if
(
memo
->
rbody_size
)
{
memo
->
rbody
=
malloc
(
memo
->
rbody_size
);
...
...
@@ -648,6 +649,8 @@ wb_orep *wb_vrepmem::createObject(pwr_tStatus *sts, wb_cdef cdef, wb_destination
else
if
(
dest
->
fth
)
dest
->
fth
->
fch
=
memo
;
dest
->
bws
=
memo
;
if
(
dest
==
root_object
)
root_object
=
memo
;
break
;
default:
*
sts
=
LDH__NODEST
;
...
...
@@ -753,6 +756,8 @@ wb_orep *wb_vrepmem::copyObject(pwr_tStatus *sts, const wb_orep *orep, wb_destin
else
if
(
dest
->
fth
)
dest
->
fth
->
fch
=
memo
;
dest
->
bws
=
memo
;
if
(
dest
==
root_object
)
root_object
=
memo
;
break
;
default:
*
sts
=
LDH__NODEST
;
...
...
@@ -836,6 +841,8 @@ bool wb_vrepmem::moveObject(pwr_tStatus *sts, wb_orep *orep, wb_destination &d)
memo
->
fth
=
dest
->
fth
;
break
;
case
ldh_eDest_Before
:
if
(
dest
==
root_object
)
root_object
=
memo
;
memo
->
bws
=
dest
->
bws
;
memo
->
fws
=
dest
;
memo
->
fth
=
dest
->
fth
;
...
...
@@ -1092,8 +1099,8 @@ bool wb_vrepmem::updateObject( wb_orep *o, bool keepref)
}
bool
wb_vrepmem
::
importTreeObject
(
wb_merep
*
merep
,
pwr_tOid
oid
,
pwr_tCid
cid
,
pwr_tOid
poid
,
pwr_tOid
boid
,
const
char
*
name
,
size_t
rbSize
,
size_t
dbSize
,
void
*
rbody
,
void
*
dbody
)
pwr_tOid
boid
,
const
char
*
name
,
pwr_mClassDef
flags
,
size_t
rbSize
,
size_t
dbSize
,
void
*
rbody
,
void
*
dbody
)
{
pwr_tStatus
sts
;
mem_object
*
memo
=
new
mem_object
();
...
...
@@ -1101,6 +1108,7 @@ bool wb_vrepmem::importTreeObject(wb_merep *merep, pwr_tOid oid, pwr_tCid cid, p
memo
->
m_oid
.
oix
=
oid
.
oix
;
memo
->
m_oid
.
vid
=
m_vid
;
memo
->
m_cid
=
cid
;
memo
->
m_flags
=
flags
;
bool
convert
=
false
;
if
(
merep
&&
merep
!=
m_merep
)
{
...
...
@@ -1191,7 +1199,7 @@ bool wb_vrepmem::importTreeObject(wb_merep *merep, pwr_tOid oid, pwr_tCid cid, p
bool
wb_vrepmem
::
importPasteObject
(
pwr_tOid
destination
,
ldh_eDest
destcode
,
bool
keepoid
,
pwr_tOid
oid
,
pwr_tCid
cid
,
pwr_tOid
poid
,
pwr_tOid
boid
,
const
char
*
name
,
pwr_tOid
boid
,
const
char
*
name
,
pwr_mClassDef
flags
,
size_t
rbSize
,
size_t
dbSize
,
void
*
rbody
,
void
*
dbody
,
pwr_tOid
*
roid
)
{
...
...
@@ -1219,6 +1227,7 @@ bool wb_vrepmem::importPasteObject(pwr_tOid destination, ldh_eDest destcode,
memo
->
m_oid
.
vid
=
m_vid
;
memo
->
m_cid
=
cid
;
memo
->
m_flags
=
flags
;
memo
->
rbody_size
=
rbSize
;
if
(
memo
->
rbody_size
)
{
memo
->
rbody
=
malloc
(
memo
->
rbody_size
);
...
...
wb/lib/wb/src/wb_vrepmem.h
View file @
ca3eb8a3
...
...
@@ -45,7 +45,7 @@ class mem_object
pwr_tOid
fthoid
=
(
fth
&&
!
isRoot
)
?
fth
->
m_oid
:
pwr_cNOid
;
pwr_tOid
bwsoid
=
(
bws
&&
!
isRoot
)
?
bws
->
m_oid
:
pwr_cNOid
;
i
.
importTreeObject
(
0
,
m_oid
,
m_cid
,
fthoid
,
bwsoid
,
name
(),
i
.
importTreeObject
(
0
,
m_oid
,
m_cid
,
fthoid
,
bwsoid
,
name
(),
m_flags
,
rbody_size
,
dbody_size
,
rbody
,
dbody
);
if
(
fch
)
...
...
@@ -63,7 +63,7 @@ class mem_object
pwr_tOid
oid
;
i
.
importPasteObject
(
destination
,
destcode
,
keepoid
,
m_oid
,
m_cid
,
fthoid
,
bwsoid
,
name
(),
rbody_size
,
dbody_size
,
rbody
,
dbody
,
&
oid
);
name
(),
m_flags
,
rbody_size
,
dbody_size
,
rbody
,
dbody
,
&
oid
);
if
(
rootlist
)
*
rootlist
++
=
oid
;
...
...
@@ -190,7 +190,7 @@ public:
virtual
wb_name
longName
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
)
{
return
wb_name
();}
virtual
pwr_tTime
ohTime
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
)
{
pwr_tTime
t
=
{
0
,
0
};
return
t
;}
virtual
pwr_mClassDef
flags
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
)
{
pwr_mClassDef
f
;
f
.
m
=
0
;
return
f
;}
virtual
bool
isOffspringOf
(
pwr_tStatus
*
sts
,
const
wb_orep
*
child
,
const
wb_orep
*
parent
)
{
return
false
;}
...
...
@@ -260,13 +260,13 @@ public:
bool
exportPaste
(
wb_treeimport
&
i
,
pwr_tOid
destination
,
ldh_eDest
destcode
,
bool
keepoid
,
pwr_tOid
**
rootlist
);
virtual
bool
importTreeObject
(
wb_merep
*
merep
,
pwr_tOid
oid
,
pwr_tCid
cid
,
pwr_tOid
poid
,
pwr_tOid
boid
,
const
char
*
name
,
size_t
rbSize
,
size_t
dbSize
,
void
*
rbody
,
void
*
dbody
);
pwr_tOid
boid
,
const
char
*
name
,
pwr_mClassDef
flags
,
size_t
rbSize
,
size_t
dbSize
,
void
*
rbody
,
void
*
dbody
);
virtual
bool
importTree
(
bool
keepref
);
virtual
bool
importPasteObject
(
pwr_tOid
destination
,
ldh_eDest
destcode
,
bool
keepoid
,
pwr_tOid
oid
,
pwr_tCid
cid
,
pwr_tOid
poid
,
pwr_tOid
boid
,
const
char
*
name
,
pwr_tOid
boid
,
const
char
*
name
,
pwr_mClassDef
flags
,
size_t
rbSize
,
size_t
dbSize
,
void
*
rbody
,
void
*
dbody
,
pwr_tOid
*
roid
);
virtual
bool
importPaste
();
...
...
wb/lib/wb/src/wb_vrepwbl.cpp
View file @
ca3eb8a3
...
...
@@ -259,9 +259,10 @@ int wb_vrepwbl::load( const char *fname)
// root_object->info_link( 0);
cout
<<
"
\n
-- Building volume "
<<
volume_name
<<
endl
;
if
(
root_object
)
if
(
root_object
)
{
root_object
->
build
(
1
);
root_object
->
postBuild
();
}
// info();
if
(
error_cnt
)
cout
<<
"** Errors when loading volume: "
<<
error_cnt
<<
" errors found"
<<
endl
;
...
...
wb/lib/wb/src/wb_vrepwbl.h
View file @
ca3eb8a3
...
...
@@ -119,6 +119,7 @@ public:
virtual
wb_name
longName
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
)
{
return
wb_name
();}
virtual
pwr_tTime
ohTime
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
)
{
pwr_tTime
t
=
{
0
,
0
};
return
t
;}
virtual
pwr_mClassDef
flags
(
pwr_tStatus
*
sts
,
const
wb_orep
*
o
)
{
pwr_mClassDef
f
;
f
.
m
=
0
;
return
f
;}
virtual
bool
isOffspringOf
(
pwr_tStatus
*
sts
,
const
wb_orep
*
child
,
const
wb_orep
*
parent
)
{
return
false
;}
...
...
@@ -188,14 +189,14 @@ public:
virtual
bool
exportTree
(
wb_treeimport
&
i
,
pwr_tOid
oid
);
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
,
size_t
rbSize
,
size_t
dbSize
,
void
*
rbody
,
void
*
dbody
)
pwr_tOid
boid
,
const
char
*
name
,
pwr_mClassDef
flags
,
size_t
rbSize
,
size_t
dbSize
,
void
*
rbody
,
void
*
dbody
)
{
return
false
;}
virtual
bool
importPaste
()
{
return
false
;}
virtual
bool
importPasteObject
(
pwr_tOid
destination
,
ldh_eDest
destcode
,
bool
keepoid
,
pwr_tOid
oid
,
pwr_tCid
cid
,
pwr_tOid
poid
,
pwr_tOid
boid
,
const
char
*
name
,
pwr_tOid
boid
,
const
char
*
name
,
pwr_mClassDef
flags
,
size_t
rbSize
,
size_t
dbSize
,
void
*
rbody
,
void
*
dbody
,
pwr_tOid
*
roid
)
{
return
false
;}
...
...
wb/lib/wb/src/wb_wblnode.cpp
View file @
ca3eb8a3
...
...
@@ -536,9 +536,9 @@ void wb_wblnode::build( bool recursive)
else
{
if
(
!
m_vrep
->
registerObject
(
o
->
m_oid
.
oix
,
this
))
{
// Print error message
pwr_tStatus
sts
;
char
name
[
120
];
char
msg
[
180
];
pwr_tStatus
sts
;
wb_orep
*
orep
=
m_vrep
->
object
(
&
sts
,
o
->
m_oid
);
m_vrep
->
objectName
(
orep
,
name
);
...
...
@@ -563,6 +563,23 @@ void wb_wblnode::build( bool recursive)
// o->fws->build( recursive);
}
void
wb_wblnode
::
postBuild
()
{
pwr_tStatus
sts
;
pwr_mClassDef
flags
;
m_vrep
->
getClassFlags
(
&
sts
,
o
->
m_cid
,
&
flags
);
o
->
m_flags
.
m
|=
flags
.
m
;
if
(
EVEN
(
sts
))
m_vrep
->
error
(
"Can't find class flags"
,
getFileName
(),
line_number
);
wb_wblnode
*
ch
=
o
->
fch
;
while
(
ch
)
{
ch
->
postBuild
();
ch
=
ch
->
o
->
fws
;
}
}
void
wb_wblnode
::
buildObjBodyDef
(
ref_wblnode
classdef
)
{
o
->
m_oid
.
oix
=
cdh_cixToOix
(
classdef
->
o
->
c
.
cix
,
o
->
m_oid
.
oix
,
0
);
...
...
@@ -1490,13 +1507,7 @@ void wb_wblnode::iterO->Rbody( wb_dbs *dbs)
bool
wb_wblnode
::
exportHead
(
wb_import
&
i
)
{
pwr_tStatus
sts
;
pwr_mClassDef
flags
;
m_vrep
->
getClassFlags
(
&
sts
,
o
->
m_cid
,
&
flags
);
if
(
EVEN
(
sts
))
throw
wb_error
(
sts
);
o
->
m_flags
.
m
|=
flags
.
m
;
ref_wblnode
o_lch
=
get_o_lch
();
pwr_tOid
fthoid
=
o
->
fth
?
o
->
fth
->
o
->
m_oid
:
pwr_cNOid
;
pwr_tOid
fwsoid
=
o
->
fws
?
o
->
fws
->
o
->
m_oid
:
pwr_cNOid
;
...
...
@@ -1505,7 +1516,8 @@ bool wb_wblnode::exportHead(wb_import &i)
pwr_tOid
lchoid
=
o_lch
?
o_lch
->
o
->
m_oid
:
pwr_cNOid
;
wb_name
n
=
wb_name
(
name
());
i
.
importHead
(
o
->
m_oid
,
o
->
m_cid
,
fthoid
,
bwsoid
,
fwsoid
,
fchoid
,
lchoid
,
name
(),
n
.
normName
(
cdh_mName_object
),
i
.
importHead
(
o
->
m_oid
,
o
->
m_cid
,
fthoid
,
bwsoid
,
fwsoid
,
fchoid
,
lchoid
,
name
(),
n
.
normName
(
cdh_mName_object
),
o
->
m_flags
,
getFileTime
(),
getFileTime
(),
getFileTime
(),
o
->
rbody_size
,
o
->
dbody_size
);
if
(
o
->
fch
)
...
...
@@ -1548,7 +1560,7 @@ bool wb_wblnode::exportTree( wb_treeimport &i, bool isRoot)
pwr_tOid
fthoid
=
(
o
->
fth
&&
!
isRoot
)
?
o
->
fth
->
o
->
m_oid
:
pwr_cNOid
;
pwr_tOid
bwsoid
=
(
o
->
bws
&&
!
isRoot
)
?
o
->
bws
->
o
->
m_oid
:
pwr_cNOid
;
i
.
importTreeObject
(
m_vrep
->
merep
(),
o
->
m_oid
,
o
->
m_cid
,
fthoid
,
bwsoid
,
name
(),
i
.
importTreeObject
(
m_vrep
->
merep
(),
o
->
m_oid
,
o
->
m_cid
,
fthoid
,
bwsoid
,
name
(),
o
->
m_flags
,
o
->
rbody_size
,
o
->
dbody_size
,
o
->
rbody
,
o
->
dbody
);
if
(
o
->
fch
)
...
...
wb/lib/wb/src/wb_wblnode.h
View file @
ca3eb8a3
...
...
@@ -219,6 +219,7 @@ public:
}
void
registerNode
(
wb_vrepwbl
*
vol
);
void
build
(
bool
recursive
);
void
postBuild
();
void
buildObjBodyDef
(
ref_wblnode
classdef
);
void
buildAttribute
(
ref_wblnode
classdef
,
ref_wblnode
objbodydef
,
int
*
bindex
,
size_t
*
boffset
);
...
...
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