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
ec8f4569
Commit
ec8f4569
authored
Feb 28, 2003
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
parent
38cdffbc
Changes
16
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
847 additions
and
35 deletions
+847
-35
src/exp/inc/src/pwr_class.h
src/exp/inc/src/pwr_class.h
+3
-1
src/msg/wb/src/wb_ldh_msg.msg
src/msg/wb/src/wb_ldh_msg.msg
+1
-1
wb/lib/wb/src/wb_cdrep.cpp
wb/lib/wb/src/wb_cdrep.cpp
+161
-0
wb/lib/wb/src/wb_cdrep.h
wb/lib/wb/src/wb_cdrep.h
+7
-0
wb/lib/wb/src/wb_erep.cpp
wb/lib/wb/src/wb_erep.cpp
+64
-1
wb/lib/wb/src/wb_erep.h
wb/lib/wb/src/wb_erep.h
+7
-2
wb/lib/wb/src/wb_ldh.cpp
wb/lib/wb/src/wb_ldh.cpp
+18
-28
wb/lib/wb/src/wb_ldh.h
wb/lib/wb/src/wb_ldh.h
+21
-0
wb/lib/wb/src/wb_pwrs.h
wb/lib/wb/src/wb_pwrs.h
+14
-0
wb/lib/wb/src/wb_session.cpp
wb/lib/wb/src/wb_session.cpp
+274
-0
wb/lib/wb/src/wb_session.h
wb/lib/wb/src/wb_session.h
+5
-1
wb/lib/wb/src/wb_volume.cpp
wb/lib/wb/src/wb_volume.cpp
+251
-0
wb/lib/wb/src/wb_volume.h
wb/lib/wb/src/wb_volume.h
+12
-0
wb/lib/wb/src/wb_wblnode.cpp
wb/lib/wb/src/wb_wblnode.cpp
+5
-0
wb/lib/wb/src/wb_wnav_menu.cpp
wb/lib/wb/src/wb_wnav_menu.cpp
+1
-1
wb/lib/wb/src/wb_wtt.cpp
wb/lib/wb/src/wb_wtt.cpp
+3
-0
No files found.
src/exp/inc/src/pwr_class.h
View file @
ec8f4569
...
...
@@ -474,7 +474,8 @@ union pwr_m_ClassDef {
pwr_Bits
(
NoAdopt
,
1
),
/* object can not have children */
pwr_Bits
(
Template
,
1
),
/* object is a template object */
pwr_Bits
(
IO
,
1
),
/* object is an IO object */
pwr_Bits
(
fill_0
,
4
),,,,
pwr_Bits
(
HasCallBack
,
1
),
/* object has DbCallBack */
pwr_Bits
(
fill_0
,
3
),,,
pwr_Bits
(
fill_1
,
8
),,,,,,,,
pwr_Bits
(
fill_2
,
8
),,,,,,,
)
b
;
...
...
@@ -491,6 +492,7 @@ union pwr_m_ClassDef {
#define pwr_mClassDef_NoAdopt pwr_Bit(9)
#define pwr_mClassDef_Template pwr_Bit(10)
#define pwr_mClassDef_IO pwr_Bit(11)
#define pwr_mClassDef_HasCallBack pwr_Bit(12)
#define pwr_mClassDef_HasRef (pwr_mClassDef_ObjXRef|pwr_mClassDef_AttrXRef|\
pwr_mClassDef_ObjRef|pwr_mClassDef_AttrRef)
...
...
src/msg/wb/src/wb_ldh_msg.msg
View file @
ec8f4569
...
...
@@ -93,7 +93,7 @@ notype <no type exist> /error
nobase <no base system> /error
projconfig <project is not configured> /info
wblparse <error when parsing wb_load file> /error
nomethod <no such method> /error
...
...
wb/lib/wb/src/wb_cdrep.cpp
View file @
ec8f4569
...
...
@@ -7,6 +7,26 @@
#include "wb_bdrep.h"
#include "wb_adrep.h"
static
pwr_tString32
callBackName
[]
=
{
"__"
,
// ldh_eDbCallBack__
"AnteCreate"
,
// ldh_eDbCallBack_AnteCreate
"PostCreate"
,
// ldh_eDbCallBack_PostCreate
"AnteDelete"
,
// ldh_eDbCallBack_AnteDelete
"PostDelete"
,
// ldh_eDbCallBack_PostDelete
"AnteMove"
,
// ldh_eDbCallBack_AnteMove
"PostMove"
,
// ldh_eDbCallBack_PostMove
"AnteRename"
,
// ldh_eDbCallBack_AnteRename
"PostRename"
,
// ldh_eDbCallBack_PostRename
"AnteAdopt"
,
// ldh_eDbCallBack_AnteAdopt
"PostAdopt"
,
// ldh_eDbCallBack_PostAdopt
"AnteUnadopt"
,
// ldh_eDbCallBack_AnteUnadopt
"PostUnadopt"
,
// ldh_eDbCallBack_PostUnadopt
"AnteUpdate"
,
// ldh_eDbCallBack_AnteUpdate
"PostUpdate"
,
// ldh_eDbCallBack_PostUpdate
"SyntaxCheck"
,
// ldh_eDbCallBack_SyntaxCheck
"-"
// ldh_eDbCallBack_
};
void
wb_cdrep
::
unref
()
{
if
(
--
m_nRef
==
0
)
...
...
@@ -191,3 +211,144 @@ wb_name wb_cdrep::longName()
{
return
m_orep
->
longName
();
}
void
wb_cdrep
::
dbCallBack
(
pwr_tStatus
*
sts
,
ldh_eDbCallBack
cb
,
char
**
methodName
,
pwr_sDbCallBack
**
o
)
{
wb_name
cb_name
=
wb_name
(
callBackName
[
cb
]);
wb_orepdbs
*
orep
=
(
wb_orepdbs
*
)
m_orep
->
m_vrep
->
child
(
sts
,
m_orep
,
cb_name
);
if
(
EVEN
(
*
sts
))
return
;
orep
->
ref
();
if
(
orep
->
cid
()
!=
pwr_eClass_DbCallBack
)
{
*
sts
=
LDH__NOSUCHOBJ
;
orep
->
unref
();
return
;
}
pwr_sDbCallBack
*
dbcallback
;
dbcallback
=
(
pwr_sDbCallBack
*
)
m_orep
->
m_vrep
->
readBody
(
sts
,
orep
,
pwr_eBix_sys
,
0
);
if
(
EVEN
(
*
sts
))
{
orep
->
unref
();
return
;
}
*
methodName
=
dbcallback
->
MethodName
;
if
(
o
)
*
o
=
dbcallback
;
}
// Get first menu object
wb_orep
*
wb_cdrep
::
menu
(
pwr_tStatus
*
sts
,
void
**
o
)
{
wb_orepdbs
*
prev
;
wb_orepdbs
*
orep
=
(
wb_orepdbs
*
)
m_orep
->
m_vrep
->
first
(
sts
,
m_orep
);
while
(
ODD
(
*
sts
))
{
switch
(
orep
->
cid
())
{
case
pwr_eClass_Menu
:
case
pwr_eClass_MenuButton
:
case
pwr_eClass_MenuCascade
:
case
pwr_eClass_MenuSeparator
:
break
;
default:
;
}
prev
=
orep
;
orep
=
(
wb_orepdbs
*
)
orep
->
after
(
sts
);
prev
->
ref
();
prev
->
unref
();
}
if
(
EVEN
(
*
sts
))
{
*
sts
=
LDH__NOSUCHOBJ
;
return
0
;
}
void
*
menubody
;
menubody
=
m_orep
->
m_vrep
->
readBody
(
sts
,
orep
,
pwr_eBix_sys
,
0
);
if
(
EVEN
(
*
sts
))
{
orep
->
ref
();
orep
->
unref
();
return
0
;
}
if
(
o
)
*
o
=
menubody
;
return
orep
;
}
// Get next menu sibling
wb_orep
*
wb_cdrep
::
menuAfter
(
pwr_tStatus
*
sts
,
wb_orep
*
orep
,
void
**
o
)
{
wb_orepdbs
*
prev
;
wb_orepdbs
*
after
=
(
wb_orepdbs
*
)
orep
->
after
(
sts
);
if
(
EVEN
(
*
sts
))
return
0
;
while
(
ODD
(
*
sts
))
{
switch
(
after
->
cid
())
{
case
pwr_eClass_Menu
:
case
pwr_eClass_MenuButton
:
case
pwr_eClass_MenuCascade
:
case
pwr_eClass_MenuSeparator
:
break
;
default:
;
}
prev
=
after
;
after
=
(
wb_orepdbs
*
)
orep
->
after
(
sts
);
prev
->
ref
();
prev
->
unref
();
}
if
(
EVEN
(
*
sts
))
{
*
sts
=
LDH__NOSUCHOBJ
;
return
0
;
}
void
*
menubody
;
menubody
=
m_orep
->
m_vrep
->
readBody
(
sts
,
after
,
pwr_eBix_sys
,
0
);
if
(
EVEN
(
*
sts
))
{
after
->
ref
();
after
->
unref
();
return
0
;
}
if
(
o
)
*
o
=
menubody
;
return
after
;
}
// Get first menu child of a menu object
wb_orep
*
wb_cdrep
::
menuFirst
(
pwr_tStatus
*
sts
,
wb_orep
*
orep
,
void
**
o
)
{
wb_orepdbs
*
first
=
(
wb_orepdbs
*
)
orep
->
first
(
sts
);
if
(
EVEN
(
*
sts
))
return
0
;
switch
(
first
->
cid
())
{
case
pwr_eClass_Menu
:
case
pwr_eClass_MenuButton
:
case
pwr_eClass_MenuCascade
:
case
pwr_eClass_MenuSeparator
:
break
;
default:
*
sts
=
LDH__NOSUCHOBJ
;
return
0
;
}
void
*
menubody
;
menubody
=
m_orep
->
m_vrep
->
readBody
(
sts
,
first
,
pwr_eBix_sys
,
0
);
if
(
EVEN
(
*
sts
))
{
first
->
ref
();
first
->
unref
();
return
0
;
}
if
(
o
)
*
o
=
menubody
;
return
first
;
}
wb/lib/wb/src/wb_cdrep.h
View file @
ec8f4569
...
...
@@ -4,6 +4,7 @@
#include "pwr.h"
#include "pwr_class.h"
#include "wb_name.h"
#include "wb_ldh.h"
class
wb_adrep
;
class
wb_bdrep
;
...
...
@@ -47,6 +48,12 @@ public:
wb_orep
*
classBody
(
pwr_tStatus
*
sts
,
const
char
*
bname
);
void
templateBody
(
pwr_tStatus
*
sts
,
pwr_eBix
bix
,
void
*
p
);
void
dbCallBack
(
pwr_tStatus
*
sts
,
ldh_eDbCallBack
cb
,
char
**
methodName
,
pwr_sDbCallBack
**
o
);
wb_orep
*
menu
(
pwr_tStatus
*
sts
,
void
**
o
);
wb_orep
*
menuAfter
(
pwr_tStatus
*
sts
,
wb_orep
*
orep
,
void
**
o
);
wb_orep
*
menuFirst
(
pwr_tStatus
*
sts
,
wb_orep
*
orep
,
void
**
o
);
pwr_tStatus
sts
()
{
return
m_sts
;}
};
...
...
wb/lib/wb/src/wb_erep.cpp
View file @
ec8f4569
...
...
@@ -18,8 +18,12 @@ extern "C" {
#include "co_dcli.h"
#include "co_cdh.h"
#include "rt_load.h"
#include "wb_pwrs.h"
}
pwr_dImport
pwr_BindClasses
(
System
);
pwr_dImport
pwr_BindClasses
(
Base
);
wb_erep
::
wb_erep
()
:
m_dir_cnt
(
0
)
{
m_merep
=
new
wb_merep
(
0
);
...
...
@@ -222,14 +226,18 @@ void wb_erep::load( pwr_tStatus *sts)
else
if
(
*
sts
==
LDH__PROJCONFIG
)
{
pwr_tStatus
status
;
loadCommonMeta
(
&
status
);
if
(
EVEN
(
status
))
if
(
EVEN
(
status
))
{
*
sts
=
status
;
return
;
}
bindMethods
();
return
;
}
loadCommonMeta
(
sts
);
if
(
EVEN
(
*
sts
))
return
;
loadMeta
(
sts
);
bindMethods
();
loadLocalWb
(
sts
);
}
...
...
@@ -516,7 +524,62 @@ wb_orep *wb_erep::object(pwr_tStatus *sts, wb_name &name)
}
void
wb_erep
::
method
(
pwr_tStatus
*
sts
,
char
*
methodName
,
wb_tMethod
*
method
)
{
string
key
=
string
(
methodName
);
methods_iterator
it
=
m_methods
.
find
(
key
);
if
(
it
==
m_methods
.
end
())
{
*
sts
=
LDH__NOMETHOD
;
return
;
}
*
sts
=
LDH__SUCCESS
;
*
method
=
it
->
second
;
}
void
wb_erep
::
bindMethods
()
{
int
i
,
j
;
pwr_tStatus
sts
;
char
str
[
200
];
for
(
i
=
0
;;
i
++
)
{
if
(
pwr_gSystem_ClassMethods
[
i
].
ClassName
[
0
]
==
'\0'
)
break
;
for
(
j
=
0
;;
j
++
)
{
if
((
*
pwr_gSystem_ClassMethods
[
i
].
Methods
)[
j
].
MethodName
[
0
]
==
'\0'
)
break
;
strcpy
(
str
,
pwr_gSystem_ClassMethods
[
i
].
ClassName
);
strcat
(
str
,
"-"
);
strcat
(
str
,
(
*
pwr_gSystem_ClassMethods
[
i
].
Methods
)[
j
].
MethodName
);
string
key
=
string
(
str
);
m_methods
[
key
]
=
(
*
pwr_gSystem_ClassMethods
[
i
].
Methods
)[
j
].
Method
;
}
}
for
(
i
=
0
;;
i
++
)
{
if
(
pwr_gBase_ClassMethods
[
i
].
ClassName
[
0
]
==
'\0'
)
break
;
wb_name
cname
=
wb_name
(
pwr_gBase_ClassMethods
[
i
].
ClassName
);
wb_cdrep
*
cdrep
=
m_merep
->
cdrep
(
&
sts
,
cname
);
if
(
EVEN
(
sts
))
continue
;
for
(
j
=
0
;;
j
++
)
{
if
((
*
pwr_gBase_ClassMethods
[
i
].
Methods
)[
j
].
MethodName
[
0
]
==
'\0'
)
break
;
strcpy
(
str
,
pwr_gBase_ClassMethods
[
i
].
ClassName
);
strcat
(
str
,
"-"
);
strcat
(
str
,
(
*
pwr_gBase_ClassMethods
[
i
].
Methods
)[
j
].
MethodName
);
string
key
=
string
(
str
);
m_methods
[
key
]
=
(
*
pwr_gBase_ClassMethods
[
i
].
Methods
)[
j
].
Method
;
}
delete
cdrep
;
}
for
(
methods_iterator
it
=
m_methods
.
begin
();
it
!=
m_methods
.
end
();
it
++
)
{
cout
<<
" Method: "
<<
it
->
first
<<
endl
;
}
}
...
...
wb/lib/wb/src/wb_erep.h
View file @
ec8f4569
...
...
@@ -2,6 +2,7 @@
#define wb_erep_h
#include <map>
#include "wb_pwrs.h"
using
namespace
std
;
...
...
@@ -15,17 +16,19 @@ class wb_name;
class
wb_erep
{
typedef
map
<
pwr_tVid
,
wb_vrep
*>::
iterator
vrep_iterator
;
typedef
map
<
string
,
wb_tMethod
>::
iterator
methods_iterator
;
unsigned
int
m_nRef
;
wb_merep
*
m_merep
;
map
<
pwr_tVid
,
wb_vrep
*>
m_vrepdb
;
map
<
pwr_tVid
,
wb_vrep
*>
m_vrepdbs
;
map
<
pwr_tVid
,
wb_vrep
*>
m_vrepextern
;
map
<
string
,
wb_tMethod
>
m_methods
;
char
m_dir_list
[
10
][
200
];
int
m_dir_cnt
;
typedef
map
<
pwr_tVid
,
wb_vrep
*>::
iterator
vrep_iterator
;
public:
wb_erep
();
~
wb_erep
();
...
...
@@ -53,12 +56,14 @@ public:
wb_cdrep
*
cdrep
(
pwr_tStatus
*
sts
,
const
wb_orep
&
o
);
wb_tdrep
*
tdrep
(
pwr_tStatus
*
sts
,
const
wb_adrep
&
a
);
void
method
(
pwr_tStatus
*
sts
,
char
*
methodName
,
wb_tMethod
*
method
);
private:
void
loadDirList
(
pwr_tStatus
*
status
);
void
loadCommonMeta
(
pwr_tStatus
*
status
);
void
loadMeta
(
pwr_tStatus
*
status
);
void
loadLocalWb
(
pwr_tStatus
*
sts
);
void
bindMethods
();
};
#endif
...
...
wb/lib/wb/src/wb_ldh.cpp
View file @
ec8f4569
...
...
@@ -218,18 +218,9 @@ ldh_OpenVolume(ldh_tWorkbench workbench, ldh_tSession *session, pwr_tVid vid)
pwr_tStatus
ldh_CallMenuMethod
(
ldh_sMenuCall
*
mcp
,
int
index
)
{
pwr_tStatus
sts
=
LDH__SUCCESS
;
// pwr_tStatus (*method)(ldh_sMenuCall*) = mcp->ItemList[index].Method;
//ldhi_sSession *sp = mcp->PointedSession;
wb_session
*
sp
=
(
wb_session
*
)
mcp
->
PointedSession
;
//wb_event e = sp->event(pwr_cNOid, ldh_eEvent_MenuMethodCalled);
//if (method != NULL)
//sts = (*method)(mcp);
//e.send();
return
sts
;
return
sp
->
callMenuMethod
(
mcp
,
index
);
}
pwr_tStatus
...
...
@@ -519,9 +510,11 @@ ldh_GetNextObject(ldh_tSession session, pwr_tOid oid, pwr_tOid *new_oid)
}
pwr_tStatus
ldh_GetMenu
(
ldh_sMenuCall
*
ip
)
ldh_GetMenu
(
ldh_
tSession
session
,
ldh_
sMenuCall
*
ip
)
{
return
LDH__NYI
;
wb_session
*
sp
=
(
wb_session
*
)
session
;
return
sp
->
getMenu
(
ip
);
}
pwr_tStatus
...
...
@@ -1160,20 +1153,15 @@ ldh_ReadAttribute(ldh_tSession session, pwr_sAttrRef *arp, void *value, int size
/* Reads a named body of an object into a buffer supplied in the call. */
pwr_tStatus
ldh_ReadObjectBody
(
ldh_tSession
*
session
,
pwr_tObjid
oid
,
char
*
bname
,
void
*
value
,
int
size
)
ldh_ReadObjectBody
(
ldh_tSession
session
,
pwr_tObjid
oid
,
char
*
bname
,
void
*
value
,
int
size
)
{
#if NOT_YET_IMPLEMENTED
wb_session
*
sp
=
(
wb_session
*
)
session
;
wb_body
b
=
sp
->
body
(
oid
,
bname
);
if
(
!
b
)
return
b
.
sts
();
wb_value
v
(
value
,
size
);
if
(
!
v
)
return
v
.
sts
();
wb_session
*
sp
=
(
wb_session
*
)
session
;
wb_object
o
=
sp
->
object
(
oid
);
wb_attribute
a
=
sp
->
attribute
(
o
,
bname
);
v
=
b
.
value
();
return
v
.
sts
();
#else
return
LDH__NYI
;
#endif
a
.
value
(
value
);
return
LDH__SUCCESS
;
}
pwr_tStatus
...
...
@@ -1339,9 +1327,11 @@ ldh_LocalObject(ldh_tSession session, pwr_tOid oid)
pwr_tStatus
ldh_SyntaxCheck
(
ldh_tSession
session
,
int
*
errorcount
,
int
*
warningcount
)
{
//wb_session *sp = (wb_session*)session;
wb_session
*
sp
=
(
wb_session
*
)
session
;
pwr_tStatus
sts
;
return
LDH__NYI
;
sts
=
sp
->
syntaxCheck
(
errorcount
,
warningcount
);
return
sts
;
}
pwr_tStatus
...
...
wb/lib/wb/src/wb_ldh.h
View file @
ec8f4569
...
...
@@ -122,6 +122,26 @@ typedef enum {
ldh_eMenuSet_
}
ldh_eMenuSet
;
typedef
enum
{
ldh_eDbCallBack__
=
0
,
ldh_eDbCallBack_AnteCreate
,
ldh_eDbCallBack_PostCreate
,
ldh_eDbCallBack_AnteDelete
,
ldh_eDbCallBack_PostDelete
,
ldh_eDbCallBack_AnteMove
,
ldh_eDbCallBack_PostMove
,
ldh_eDbCallBack_AnteRename
,
ldh_eDbCallBack_PostRename
,
ldh_eDbCallBack_AnteAdopt
,
ldh_eDbCallBack_PostAdopt
,
ldh_eDbCallBack_AnteUnadopt
,
ldh_eDbCallBack_PostUnadopt
,
ldh_eDbCallBack_AnteUpdate
,
ldh_eDbCallBack_PostUpdate
,
ldh_eDbCallBack_SyntaxCheck
,
ldh_eDbCallBack_
}
ldh_eDbCallBack
;
typedef
enum
{
ldh_eName_Object
=
cdh_mName_object
,
ldh_eName_Default
=
cdh_mName_object
,
...
...
@@ -534,6 +554,7 @@ pwr_tStatus ldh_GetClassList (
pwr_tObjid
*
objid
);
pwr_tStatus
ldh_GetMenu
(
ldh_tSession
Session
,
ldh_sMenuCall
*
CallStruct
);
pwr_tStatus
ldh_GetNextObject
(
...
...
wb/lib/wb/src/wb_pwrs.h
View file @
ec8f4569
...
...
@@ -57,6 +57,20 @@ typedef struct {
Prototypes for DbCallbacks
\*----------------------------------------------------------------------------*/
typedef
pwr_tStatus
(
*
wb_tMethod
)();
typedef
pwr_tStatus
(
*
wb_tMethodMenu
)(
ldh_sMenuCall
*
);
typedef
pwr_tStatus
(
*
wb_tMethodMenuFilter
)(
ldh_sMenuCall
*
,
pwr_sMenuButton
*
);
typedef
pwr_tStatus
(
*
wb_tMethodAnteCreate
)
(
ldh_tSesContext
,
pwr_tOid
,
pwr_tCid
);
typedef
pwr_tStatus
(
*
wb_tMethodPostCreate
)
(
ldh_tSesContext
,
pwr_tOid
,
pwr_tOid
,
pwr_tCid
);
typedef
pwr_tStatus
(
*
wb_tMethodAnteMove
)
(
ldh_tSesContext
,
pwr_tOid
,
pwr_tOid
,
pwr_tCid
);
typedef
pwr_tStatus
(
*
wb_tMethodPostMove
)
(
ldh_tSesContext
,
pwr_tOid
,
pwr_tOid
,
pwr_tCid
);
typedef
pwr_tStatus
(
*
wb_tMethodAnteAdopt
)
(
ldh_tSesContext
,
pwr_tOid
,
pwr_tCid
);
typedef
pwr_tStatus
(
*
wb_tMethodPostAdopt
)
(
ldh_tSesContext
,
pwr_tOid
,
pwr_tOid
,
pwr_tCid
);
typedef
pwr_tStatus
(
*
wb_tMethodAnteUnadopt
)(
ldh_tSesContext
,
pwr_tOid
,
pwr_tOid
,
pwr_tCid
);
typedef
pwr_tStatus
(
*
wb_tMethodPostUnadopt
)(
ldh_tSesContext
,
pwr_tOid
,
pwr_tOid
,
pwr_tCid
);
typedef
pwr_tStatus
(
*
wb_tMethodSyntaxCheck
)(
ldh_tSesContext
,
pwr_tOid
,
int
*
,
int
*
);
#if defined OS_VMS
static
pwr_tStatus
AnteAdopt
(
ldh_tSesContext
Session
,
...
...
wb/lib/wb/src/wb_session.cpp
View file @
ec8f4569
#include "wb_session.h"
#include "wb_error.h"
#include "wb_ldh_msg.h"
#include "wb_cdrep.h"
#include "wb_merep.h"
#include "wb_ldh.h"
static
ldh_sMenuItem
ldh_lMenuItem
[
100
];
static
struct
{
pwr_tString32
Name
;
ldh_eUtility
Value
;
}
ldh_lUtility
[]
=
{
{
"__"
,
ldh_eUtility__
},
{
"Navigator"
,
ldh_eUtility_Navigator
},
{
"Configurator"
,
ldh_eUtility_Configurator
},
{
"-"
,
ldh_eUtility_
}
};
static
struct
{
pwr_tString32
Name
;
pwr_tChar
Char
;
ldh_eMenuSet
Value
;
}
ldh_lMenuSet
[]
=
{
{
"__"
,
'\0'
,
ldh_eMenuSet__
},
{
"Attribute"
,
'a'
,
ldh_eMenuSet_Attribute
},
{
"Class"
,
'c'
,
ldh_eMenuSet_Class
},
{
"Many"
,
'm'
,
ldh_eMenuSet_Many
},
{
"None"
,
'n'
,
ldh_eMenuSet_None
},
{
"Object"
,
'o'
,
ldh_eMenuSet_Object
},
{
"-"
,
'\0'
,
ldh_eMenuSet_
}
};
wb_session
::
wb_session
(
wb_volume
&
v
)
:
wb_volume
(
v
)
{
...
...
@@ -94,7 +123,252 @@ bool wb_session::deleteFamily(wb_object o)
return
m_vrep
->
deleteFamily
(
&
m_sts
,
(
wb_orep
*
)
o
);
}
pwr_tStatus
wb_session
::
getMenu
(
ldh_sMenuCall
*
ip
)
{
pwr_tStatus
sts
;
ldh_sMenuItem
*
Item
=
(
ldh_sMenuItem
*
)
&
ldh_lMenuItem
;
pwr_tUInt32
i
;
pwr_tObjName
MenuFolder
;
pwr_tString80
Menu
;
pwr_tBoolean
isSame
=
FALSE
;
pwr_tClassId
Class
;
pwr_tObjid
Object
;
int
nItems
=
0
;
wb_name
cn
;
for
(
i
=
0
;
i
<
ip
->
SelectCount
;
i
++
)
{
if
(
cdh_ObjidIsEqual
(
ip
->
Pointed
.
Objid
,
ip
->
Selected
[
i
].
Objid
))
{
isSame
=
TRUE
;
break
;
}
}
sprintf
(
MenuFolder
,
"%sP%cs%c%c"
,
ldh_lUtility
[((
wb_session
*
)
ip
->
PointedSession
)
->
utility
()].
Name
,
ldh_lMenuSet
[
ip
->
PointedSet
].
Char
,
ldh_lMenuSet
[
ip
->
SelectedSet
].
Char
,
(
isSame
?
's'
:
'n'
)
);
/* Find generic menues of pointed object */
sprintf
(
Menu
,
"pwrs:Class-$Object-%s-Pointed"
,
MenuFolder
);
wb_cdrep
*
cdrep
=
m_vrep
->
merep
()
->
cdrep
(
&
sts
,
pwr_eClass_Object
);
if
(
EVEN
(
sts
))
return
sts
;
wb_orep
*
o
=
m_vrep
->
erep
()
->
object
(
&
sts
,
Menu
);
if
(
EVEN
(
sts
))
return
sts
;
o
->
ref
();
Object
=
o
->
oid
();
void
*
o_menu_body
;
wb_orep
*
o_menu
=
cdrep
->
menuFirst
(
&
sts
,
o
,
&
o_menu_body
);
if
(
ODD
(
sts
))
{
o_menu
->
ref
();
getAllMenuItems
(
ip
,
&
Item
,
cdrep
,
o_menu
,
o_menu_body
,
0
,
&
nItems
,
0
);
o_menu
->
unref
();
}
delete
cdrep
;
o
->
unref
();
/* Find specific menues of pointed object */
if
(
ip
->
PointedSet
==
ldh_eMenuSet_Class
)
{
Class
=
cdh_ClassObjidToId
(
ip
->
Pointed
.
Objid
);
}
else
{
o
=
m_vrep
->
erep
()
->
object
(
&
sts
,
ip
->
Pointed
.
Objid
);
if
(
EVEN
(
sts
))
return
sts
;
o
->
ref
();
Class
=
o
->
cid
();
o
->
unref
();
}
cdrep
=
m_vrep
->
merep
()
->
cdrep
(
&
sts
,
Class
);
if
(
EVEN
(
sts
))
return
sts
;
cn
=
cdrep
->
longName
();
sprintf
(
Menu
,
"%s-%s-Pointed"
,
cn
.
name
(),
MenuFolder
);
o
=
m_vrep
->
erep
()
->
object
(
&
sts
,
Menu
);
if
(
ODD
(
sts
))
{
o
->
ref
();
Object
=
o
->
oid
();
o_menu
=
cdrep
->
menuFirst
(
&
sts
,
o
,
&
o_menu_body
);
if
(
ODD
(
sts
))
{
o_menu
->
ref
();
getAllMenuItems
(
ip
,
&
Item
,
cdrep
,
o_menu
,
o_menu_body
,
0
,
&
nItems
,
0
);
o_menu
->
unref
();
}
delete
cdrep
;
o
->
unref
();
}
switch
(
ip
->
SelectedSet
)
{
case
ldh_eMenuSet_Attribute
:
case
ldh_eMenuSet_Class
:
case
ldh_eMenuSet_Many
:
case
ldh_eMenuSet_Object
:
/* Find generic menues for selected object(s) */
sprintf
(
Menu
,
"pwrs:Class-$Object-%s-Selected"
,
MenuFolder
);
cdrep
=
m_vrep
->
merep
()
->
cdrep
(
&
sts
,
pwr_eClass_Object
);
if
(
EVEN
(
sts
))
return
sts
;
o
=
m_vrep
->
erep
()
->
object
(
&
sts
,
Menu
);
if
(
ODD
(
sts
))
{
o
->
ref
();
Object
=
o
->
oid
();
o_menu
=
cdrep
->
menuFirst
(
&
sts
,
o
,
&
o_menu_body
);
if
(
ODD
(
sts
))
{
o_menu
->
ref
();
getAllMenuItems
(
ip
,
&
Item
,
cdrep
,
o_menu
,
o_menu_body
,
0
,
&
nItems
,
0
);
o_menu
->
unref
();
}
delete
cdrep
;
o
->
unref
();
}
/* Find specific menues for selected object(s) */
if
(
ip
->
PointedSet
==
ldh_eMenuSet_Class
)
{
Class
=
cdh_ClassObjidToId
(
ip
->
Pointed
.
Objid
);
}
else
{
o
=
m_vrep
->
erep
()
->
object
(
&
sts
,
ip
->
Pointed
.
Objid
);
if
(
EVEN
(
sts
))
return
sts
;
o
->
ref
();
Class
=
o
->
cid
();
o
->
unref
();
}
cdrep
=
m_vrep
->
merep
()
->
cdrep
(
&
sts
,
Class
);
if
(
EVEN
(
sts
))
return
sts
;
cn
=
cdrep
->
longName
();
sprintf
(
Menu
,
"%s-%s-Selected"
,
cn
.
name
(),
MenuFolder
);
o
=
m_vrep
->
erep
()
->
object
(
&
sts
,
Menu
);
if
(
ODD
(
sts
))
{
o
->
ref
();
Object
=
o
->
oid
();
o_menu
=
cdrep
->
menuFirst
(
&
sts
,
o
,
&
o_menu_body
);
if
(
ODD
(
sts
))
{
o_menu
->
ref
();
getAllMenuItems
(
ip
,
&
Item
,
cdrep
,
o_menu
,
o_menu_body
,
0
,
&
nItems
,
0
);
o_menu
->
unref
();
}
delete
cdrep
;
o
->
unref
();
}
break
;
default:
break
;
}
Item
->
Level
=
0
;
ip
->
ItemList
=
ldh_lMenuItem
;
ip
->
ItemCount
=
nItems
-
1
;
return
LDH__SUCCESS
;
}
void
wb_session
::
getAllMenuItems
(
ldh_sMenuCall
*
ip
,
ldh_sMenuItem
**
Item
,
wb_cdrep
*
cdrep
,
wb_orep
*
o
,
void
*
o_body
,
pwr_tUInt32
Level
,
int
*
nItems
,
int
AddSeparator
)
{
pwr_sMenuButton
*
mbp
;
pwr_sMenuCascade
*
mcp
;
wb_tMethod
method
;
wb_tMethod
filter
;
pwr_tStatus
sts
;
Level
++
;
memset
(
*
Item
,
0
,
sizeof
(
**
Item
));
if
(
AddSeparator
)
{
(
*
Item
)
->
Level
=
Level
;
(
*
Item
)
->
Item
=
ldh_eMenuItem_Separator
;
(
*
Item
)
->
MenuObject
=
pwr_cNObjid
;
(
*
Item
)
++
;
(
*
nItems
)
++
;
}
else
if
(
o
->
cid
()
==
pwr_eClass_MenuButton
)
{
mbp
=
(
pwr_sMenuButton
*
)
o_body
;
(
*
Item
)
->
Level
=
Level
;
(
*
Item
)
->
Item
=
ldh_eMenuItem_Button
;
(
*
Item
)
->
MenuObject
=
o
->
oid
();
(
*
Item
)
->
Flags
.
f
.
Sensitive
=
0
;
if
(
mbp
->
MethodName
[
0
]
!=
0
)
{
m_vrep
->
erep
()
->
method
(
&
sts
,
mbp
->
MethodName
,
&
method
);
if
(
ODD
(
sts
))
(
*
Item
)
->
Flags
.
f
.
Sensitive
=
1
;
}
if
(
(
*
Item
)
->
Flags
.
f
.
Sensitive
==
1
)
{
m_vrep
->
erep
()
->
method
(
&
sts
,
mbp
->
FilterName
,
&
filter
);
if
(
ODD
(
sts
))
(
*
Item
)
->
Flags
.
f
.
Sensitive
=
((
wb_tMethodMenuFilter
)
filter
)(
ip
,
mbp
);
}
strcpy
((
*
Item
)
->
Name
,
mbp
->
ButtonName
);
(
*
Item
)
->
Method
=
method
;
(
*
Item
)
++
;
(
*
nItems
)
++
;
}
else
if
(
o
->
cid
()
==
pwr_eClass_MenuSeparator
)
{
(
*
Item
)
->
Level
=
Level
;
(
*
Item
)
->
Item
=
ldh_eMenuItem_Separator
;
(
*
Item
)
->
MenuObject
=
o
->
oid
();
(
*
Item
)
++
;
(
*
nItems
)
++
;
}
else
if
(
o
->
cid
()
==
pwr_eClass_MenuCascade
)
{
mcp
=
(
pwr_sMenuCascade
*
)
o_body
;
(
*
Item
)
->
Level
=
Level
;
(
*
Item
)
->
Item
=
ldh_eMenuItem_Cascade
;
(
*
Item
)
->
Flags
.
f
.
Sensitive
=
1
;
strcpy
((
*
Item
)
->
Name
,
mcp
->
ButtonName
);
(
*
Item
)
->
MenuObject
=
o
->
oid
();
(
*
Item
)
++
;
(
*
nItems
)
++
;
void
*
child_body
;
wb_orep
*
child
=
cdrep
->
menuFirst
(
&
sts
,
o
,
&
child_body
);
if
(
ODD
(
sts
))
{
child
->
ref
();
getAllMenuItems
(
ip
,
Item
,
cdrep
,
child
,
child_body
,
Level
,
nItems
,
0
);
child
->
unref
();
}
void
*
next_body
;
wb_orep
*
next
=
cdrep
->
menuAfter
(
&
sts
,
o
,
&
next_body
);
if
(
ODD
(
sts
))
{
next
->
ref
();
getAllMenuItems
(
ip
,
Item
,
cdrep
,
next
,
next_body
,
Level
,
nItems
,
0
);
next
->
unref
();
}
}
}
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_cNObjid, ldh_eEvent_MenuMethodCalled);
if
(
method
!=
NULL
)
sts
=
(
*
method
)(
mcp
);
// eventSend(sp, ep);
return
sts
;
}
wb/lib/wb/src/wb_session.h
View file @
ec8f4569
...
...
@@ -71,8 +71,12 @@ public:
bool
writeAttribute
()
{
return
false
;}
// Fix
bool
writeBody
()
{
return
false
;}
// Fix
//
void
getAllMenuItems
(
ldh_sMenuCall
*
ip
,
ldh_sMenuItem
**
Item
,
wb_cdrep
*
cdrep
,
wb_orep
*
o
,
void
*
o_body
,
pwr_tUInt32
Level
,
int
*
nItems
,
int
AddSeparator
);
pwr_tStatus
getMenu
(
ldh_sMenuCall
*
ip
);
pwr_tStatus
callMenuMethod
(
ldh_sMenuCall
*
mcp
,
int
Index
);
};
...
...
wb/lib/wb/src/wb_volume.cpp
View file @
ec8f4569
...
...
@@ -295,7 +295,258 @@ wb_attribute wb_volume::attribute(const pwr_sAttrRef* arp) const
return
wb_attribute
();
}
pwr_tStatus
wb_volume
::
syntaxCheck
(
int
*
errorcount
,
int
*
warningcount
)
{
pwr_tStatus
sts
;
wb_orep
*
orep
=
m_vrep
->
object
(
&
sts
);
if
(
ODD
(
sts
))
{
orep
->
ref
();
sts
=
syntaxCheckObject
(
orep
,
errorcount
,
warningcount
);
orep
->
unref
();
return
sts
;
}
return
LDH__SUCCESS
;
}
pwr_tStatus
wb_volume
::
syntaxCheckObject
(
wb_orep
*
orep
,
int
*
errorcount
,
int
*
warningcount
)
{
pwr_tStatus
sts
;
wb_orep
*
first
,
*
after
;
sts
=
triggSyntaxCheck
(
orep
,
errorcount
,
warningcount
);
if
(
EVEN
(
sts
))
return
sts
;
switch
(
orep
->
cid
())
{
case
pwr_eClass_LibHier
:
break
;
default:
first
=
orep
->
first
(
&
sts
);
if
(
ODD
(
sts
))
{
first
->
ref
();
sts
=
syntaxCheckObject
(
first
,
errorcount
,
warningcount
);
first
->
unref
();
if
(
EVEN
(
sts
))
return
sts
;
}
after
=
orep
->
after
(
&
sts
);
if
(
ODD
(
sts
))
{
after
->
ref
();
sts
=
syntaxCheckObject
(
after
,
errorcount
,
warningcount
);
after
->
unref
();
if
(
EVEN
(
sts
))
return
sts
;
}
}
return
LDH__SUCCESS
;
}
pwr_tStatus
wb_volume
::
triggSyntaxCheck
(
wb_orep
*
orep
,
int
*
errorcount
,
int
*
warningcount
)
{
pwr_tStatus
sts
;
char
methodName
[]
=
"SyntaxCheck"
;
wb_tMethod
method
;
// wb_cdrep *cdrep = m_vrep->merep()->cdrep( &sts, orep->cid());
// if ( EVEN(sts)) return sts;
// cdrep->dbCallBack( &sts, ldh_eDbCallBack_SyntaxCheck, &methodName, 0);
// delete cdrep;
// if ( EVEN(sts)) return LDH__SUCCESS;
m_vrep
->
erep
()
->
method
(
&
sts
,
methodName
,
&
method
);
if
(
EVEN
(
sts
))
return
LDH__SUCCESS
;
sts
=
((
wb_tMethodSyntaxCheck
)
(
method
))(
(
ldh_tSesContext
)
this
,
orep
->
oid
(),
errorcount
,
warningcount
);
return
sts
;
}
pwr_tStatus
wb_volume
::
triggAnteAdopt
(
wb_orep
*
father
,
pwr_tCid
cid
)
{
pwr_tStatus
sts
;
char
*
methodName
;
wb_tMethod
method
;
wb_cdrep
*
cdrep
=
m_vrep
->
merep
()
->
cdrep
(
&
sts
,
father
->
cid
());
if
(
EVEN
(
sts
))
return
sts
;
cdrep
->
dbCallBack
(
&
sts
,
ldh_eDbCallBack_AnteAdopt
,
&
methodName
,
0
);
delete
cdrep
;
if
(
EVEN
(
sts
))
return
LDH__SUCCESS
;
m_vrep
->
erep
()
->
method
(
&
sts
,
methodName
,
&
method
);
if
(
EVEN
(
sts
))
return
LDH__SUCCESS
;
sts
=
((
wb_tMethodAnteAdopt
)
(
method
))(
(
ldh_tSesContext
)
this
,
father
->
oid
(),
cid
);
return
sts
;
}
pwr_tStatus
wb_volume
::
triggAnteCreate
(
wb_orep
*
father
,
pwr_tCid
cid
)
{
pwr_tStatus
sts
;
char
*
methodName
;
wb_tMethod
method
;
wb_cdrep
*
cdrep
=
m_vrep
->
merep
()
->
cdrep
(
&
sts
,
cid
);
if
(
EVEN
(
sts
))
return
sts
;
cdrep
->
dbCallBack
(
&
sts
,
ldh_eDbCallBack_AnteCreate
,
&
methodName
,
0
);
delete
cdrep
;
if
(
EVEN
(
sts
))
return
LDH__SUCCESS
;
m_vrep
->
erep
()
->
method
(
&
sts
,
methodName
,
&
method
);
if
(
EVEN
(
sts
))
return
LDH__SUCCESS
;
sts
=
((
wb_tMethodAnteCreate
)
(
method
))(
(
ldh_tSesContext
)
this
,
father
->
oid
(),
cid
);
return
sts
;
}
pwr_tStatus
wb_volume
::
triggAnteMove
(
wb_orep
*
orep
,
wb_orep
*
father
)
{
pwr_tStatus
sts
;
char
*
methodName
;
wb_tMethod
method
;
wb_cdrep
*
cdrep
=
m_vrep
->
merep
()
->
cdrep
(
&
sts
,
orep
->
cid
());
if
(
EVEN
(
sts
))
return
sts
;
cdrep
->
dbCallBack
(
&
sts
,
ldh_eDbCallBack_AnteCreate
,
&
methodName
,
0
);
delete
cdrep
;
if
(
EVEN
(
sts
))
return
LDH__SUCCESS
;
m_vrep
->
erep
()
->
method
(
&
sts
,
methodName
,
&
method
);
if
(
EVEN
(
sts
))
return
LDH__SUCCESS
;
if
(
father
)
sts
=
((
wb_tMethodAnteMove
)
(
method
))(
(
ldh_tSesContext
)
this
,
orep
->
oid
(),
father
->
oid
(),
father
->
cid
());
else
sts
=
((
wb_tMethodAnteMove
)
(
method
))(
(
ldh_tSesContext
)
this
,
orep
->
oid
(),
pwr_cNObjid
,
pwr_cNClassId
);
return
sts
;
}
pwr_tStatus
wb_volume
::
triggAnteUnadopt
(
wb_orep
*
father
,
wb_orep
*
orep
)
{
pwr_tStatus
sts
;
char
*
methodName
;
wb_tMethod
method
;
wb_cdrep
*
cdrep
=
m_vrep
->
merep
()
->
cdrep
(
&
sts
,
father
->
cid
());
if
(
EVEN
(
sts
))
return
sts
;
cdrep
->
dbCallBack
(
&
sts
,
ldh_eDbCallBack_AnteCreate
,
&
methodName
,
0
);
delete
cdrep
;
if
(
EVEN
(
sts
))
return
LDH__SUCCESS
;
m_vrep
->
erep
()
->
method
(
&
sts
,
methodName
,
&
method
);
if
(
EVEN
(
sts
))
return
LDH__SUCCESS
;
sts
=
((
wb_tMethodAnteUnadopt
)
(
method
))(
(
ldh_tSesContext
)
this
,
father
->
oid
(),
orep
->
oid
(),
orep
->
cid
());
return
sts
;
}
pwr_tStatus
wb_volume
::
triggPostAdopt
(
wb_orep
*
father
,
wb_orep
*
orep
)
{
pwr_tStatus
sts
;
char
*
methodName
;
wb_tMethod
method
;
wb_cdrep
*
cdrep
=
m_vrep
->
merep
()
->
cdrep
(
&
sts
,
father
->
cid
());
if
(
EVEN
(
sts
))
return
sts
;
cdrep
->
dbCallBack
(
&
sts
,
ldh_eDbCallBack_PostAdopt
,
&
methodName
,
0
);
delete
cdrep
;
if
(
EVEN
(
sts
))
return
LDH__SUCCESS
;
m_vrep
->
erep
()
->
method
(
&
sts
,
methodName
,
&
method
);
if
(
EVEN
(
sts
))
return
LDH__SUCCESS
;
sts
=
((
wb_tMethodPostAdopt
)
(
method
))(
(
ldh_tSesContext
)
this
,
father
->
oid
(),
orep
->
oid
(),
orep
->
cid
());
return
sts
;
}
pwr_tStatus
wb_volume
::
triggPostCreate
(
wb_orep
*
orep
)
{
pwr_tStatus
sts
;
char
*
methodName
;
wb_tMethod
method
;
wb_cdrep
*
cdrep
=
m_vrep
->
merep
()
->
cdrep
(
&
sts
,
orep
->
cid
());
if
(
EVEN
(
sts
))
return
sts
;
cdrep
->
dbCallBack
(
&
sts
,
ldh_eDbCallBack_PostCreate
,
&
methodName
,
0
);
delete
cdrep
;
if
(
EVEN
(
sts
))
return
LDH__SUCCESS
;
m_vrep
->
erep
()
->
method
(
&
sts
,
methodName
,
&
method
);
if
(
EVEN
(
sts
))
return
LDH__SUCCESS
;
wb_orep
*
father
=
orep
->
parent
(
&
sts
);
if
(
ODD
(
sts
))
{
father
->
ref
();
sts
=
((
wb_tMethodPostCreate
)
(
method
))(
(
ldh_tSesContext
)
this
,
orep
->
oid
(),
father
->
oid
(),
father
->
cid
());
father
->
unref
();
}
else
sts
=
((
wb_tMethodPostCreate
)
(
method
))(
(
ldh_tSesContext
)
this
,
orep
->
oid
(),
pwr_cNObjid
,
pwr_cNClassId
);
return
sts
;
}
pwr_tStatus
wb_volume
::
triggPostMove
(
wb_orep
*
orep
)
{
pwr_tStatus
sts
;
char
*
methodName
;
wb_tMethod
method
;
wb_cdrep
*
cdrep
=
m_vrep
->
merep
()
->
cdrep
(
&
sts
,
orep
->
cid
());
if
(
EVEN
(
sts
))
return
sts
;
cdrep
->
dbCallBack
(
&
sts
,
ldh_eDbCallBack_PostMove
,
&
methodName
,
0
);
delete
cdrep
;
if
(
EVEN
(
sts
))
return
LDH__SUCCESS
;
m_vrep
->
erep
()
->
method
(
&
sts
,
methodName
,
&
method
);
if
(
EVEN
(
sts
))
return
LDH__SUCCESS
;
wb_orep
*
father
=
orep
->
parent
(
&
sts
);
if
(
ODD
(
sts
))
{
father
->
ref
();
sts
=
((
wb_tMethodPostMove
)
(
method
))(
(
ldh_tSesContext
)
this
,
orep
->
oid
(),
father
->
oid
(),
father
->
cid
());
father
->
unref
();
}
else
sts
=
((
wb_tMethodPostMove
)
(
method
))(
(
ldh_tSesContext
)
this
,
orep
->
oid
(),
pwr_cNObjid
,
pwr_cNClassId
);
return
sts
;
}
pwr_tStatus
wb_volume
::
triggPostUnadopt
(
wb_orep
*
father
,
wb_orep
*
orep
)
{
pwr_tStatus
sts
;
char
*
methodName
;
wb_tMethod
method
;
wb_cdrep
*
cdrep
=
m_vrep
->
merep
()
->
cdrep
(
&
sts
,
father
->
cid
());
if
(
EVEN
(
sts
))
return
sts
;
cdrep
->
dbCallBack
(
&
sts
,
ldh_eDbCallBack_PostUnadopt
,
&
methodName
,
0
);
delete
cdrep
;
if
(
EVEN
(
sts
))
return
LDH__SUCCESS
;
m_vrep
->
erep
()
->
method
(
&
sts
,
methodName
,
&
method
);
if
(
EVEN
(
sts
))
return
LDH__SUCCESS
;
sts
=
((
wb_tMethodPostUnadopt
)
(
method
))(
(
ldh_tSesContext
)
this
,
father
->
oid
(),
orep
->
oid
(),
orep
->
cid
());
return
sts
;
}
...
...
wb/lib/wb/src/wb_volume.h
View file @
ec8f4569
...
...
@@ -79,6 +79,18 @@ public:
bool
createSnapshot
(
const
char
*
fileName
)
{
return
m_vrep
->
createSnapshot
(
fileName
);}
pwr_tStatus
syntaxCheck
(
int
*
errorcount
,
int
*
warningcount
);
pwr_tStatus
syntaxCheckObject
(
wb_orep
*
orep
,
int
*
errorcount
,
int
*
warningcount
);
pwr_tStatus
triggSyntaxCheck
(
wb_orep
*
orep
,
int
*
errorcount
,
int
*
warningcount
);
pwr_tStatus
triggAnteAdopt
(
wb_orep
*
orep
,
pwr_tCid
cid
);
pwr_tStatus
triggAnteCreate
(
wb_orep
*
father
,
pwr_tCid
cid
);
pwr_tStatus
triggAnteMove
(
wb_orep
*
orep
,
wb_orep
*
father
);
pwr_tStatus
triggAnteUnadopt
(
wb_orep
*
father
,
wb_orep
*
orep
);
pwr_tStatus
triggPostAdopt
(
wb_orep
*
father
,
wb_orep
*
orep
);
pwr_tStatus
triggPostCreate
(
wb_orep
*
orep
);
pwr_tStatus
triggPostMove
(
wb_orep
*
orep
);
pwr_tStatus
triggPostUnadopt
(
wb_orep
*
father
,
wb_orep
*
orep
);
};
#endif
wb/lib/wb/src/wb_wblnode.cpp
View file @
ec8f4569
...
...
@@ -469,6 +469,11 @@ void wb_wblnode::build( bool recursive)
attr
=
attr
->
o_fws
;
}
}
else
if
(
cdh_NoCaseStrcmp
(
child
->
cname
,
"$DbCallBack"
)
==
0
&&
!
child
->
isTemplate
()
)
{
((
pwr_sClassDef
*
)
rbody
)
->
Flags
.
b
.
HasCallBack
=
1
;
}
child
=
child
->
o_fws
;
m_flags
=
((
pwr_sClassDef
*
)
rbody
)
->
Flags
;
...
...
wb/lib/wb/src/wb_wnav_menu.cpp
View file @
ec8f4569
...
...
@@ -238,7 +238,7 @@ Widget wtt_create_popup_menu( Wtt *wtt, pwr_tObjid objid)
mcp
->
Selected
[
sel1_cnt
+
sel2_cnt
].
Objid
=
pwr_cNObjid
;
mcp
->
SelectCount
=
sel1_cnt
+
sel2_cnt
;
sts
=
ldh_GetMenu
(
mcp
);
sts
=
ldh_GetMenu
(
wtt
->
ldhses
,
mcp
);
if
(
EVEN
(
sts
)
||
mcp
->
ItemList
[
0
].
Level
==
0
)
{
return
NULL
;
}
...
...
wb/lib/wb/src/wb_wtt.cpp
View file @
ec8f4569
...
...
@@ -493,6 +493,9 @@ static void wtt_create_popup_menu_cb( void *ctx, pwr_tObjid objid,
XtGetValues
(
wtt
->
toplevel
,
args
,
2
);
popup
=
wtt_create_popup_menu
(
wtt
,
objid
);
if
(
!
popup
)
return
;
i
=
0
;
XtSetArg
(
args
[
i
],
XmNx
,
x
+
x1
+
x2
+
x3
+
8
);
i
++
;
XtSetArg
(
args
[
i
],
XmNy
,
y
+
y1
+
y2
+
y3
);
i
++
;
...
...
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