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
79169fca
Commit
79169fca
authored
Feb 26, 2009
by
Claes pwr46/data0/x4-6-0
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Script functions GetClassListAttrRef() and GetNextAttrRef() added
parent
d8a3b129
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
105 additions
and
0 deletions
+105
-0
wb/lib/wb/src/wb_wccm.cpp
wb/lib/wb/src/wb_wccm.cpp
+105
-0
No files found.
wb/lib/wb/src/wb_wccm.cpp
View file @
79169fca
...
...
@@ -405,6 +405,107 @@ static int wccm_getnextobject_func(
return
1
;
}
static
int
wccm_getclasslistattrref_func
(
void
*
filectx
,
ccm_s_arg
*
arg_list
,
int
arg_count
,
int
*
return_decl
,
float
*
return_float
,
int
*
return_int
,
char
*
return_string
)
{
int
sts
;
char
*
name
;
pwr_tCid
cid
;
pwr_tAttrRef
aref
;
int
size
;
ldh_tSesContext
ldhses
;
sts
=
wccm_get_ldhses
(
&
ldhses
);
if
(
EVEN
(
sts
))
{
strcpy
(
return_string
,
""
);
*
return_decl
=
CCM_DECL_STRING
;
return
CMD__NOVOLATTACHED
;
}
if
(
arg_count
!=
1
)
return
CCM__ARGMISM
;
if
(
arg_list
->
value_decl
!=
CCM_DECL_STRING
)
return
CCM__ARGMISM
;
sts
=
ldh_ClassNameToId
(
ldhses
,
&
cid
,
arg_list
->
value_string
);
if
(
ODD
(
sts
))
{
sts
=
ldh_GetClassListAttrRef
(
ldhses
,
cid
,
&
aref
);
if
(
ODD
(
sts
))
sts
=
ldh_AttrRefToName
(
ldhses
,
&
aref
,
ldh_eName_Hierarchy
,
&
name
,
&
size
);
}
if
(
ODD
(
sts
))
strcpy
(
return_string
,
name
);
else
strcpy
(
return_string
,
""
);
*
return_decl
=
CCM_DECL_STRING
;
return
1
;
}
static
int
wccm_getnextattrref_func
(
void
*
filectx
,
ccm_s_arg
*
arg_list
,
int
arg_count
,
int
*
return_decl
,
float
*
return_float
,
int
*
return_int
,
char
*
return_string
)
{
int
sts
;
char
*
name
;
pwr_tAttrRef
aref
;
pwr_tAttrRef
next_aref
;
int
size
;
ldh_tSesContext
ldhses
;
pwr_tCid
cid
;
ccm_s_arg
*
arg_p2
;
sts
=
wccm_get_ldhses
(
&
ldhses
);
if
(
EVEN
(
sts
))
{
strcpy
(
return_string
,
""
);
*
return_decl
=
CCM_DECL_STRING
;
return
CMD__NOVOLATTACHED
;
}
if
(
arg_count
!=
2
)
return
CCM__ARGMISM
;
arg_p2
=
arg_list
->
next
;
if
(
arg_list
->
value_decl
!=
CCM_DECL_STRING
)
return
CCM__ARGMISM
;
if
(
arg_p2
->
value_decl
!=
CCM_DECL_STRING
)
return
CCM__ARGMISM
;
sts
=
ldh_ClassNameToId
(
ldhses
,
&
cid
,
arg_list
->
value_string
);
if
(
ODD
(
sts
))
{
sts
=
ldh_NameToAttrRef
(
ldhses
,
arg_p2
->
value_string
,
&
aref
);
if
(
ODD
(
sts
))
{
sts
=
ldh_GetNextAttrRef
(
ldhses
,
cid
,
&
aref
,
&
next_aref
);
if
(
ODD
(
sts
))
sts
=
ldh_AttrRefToName
(
ldhses
,
&
next_aref
,
ldh_eName_Hierarchy
,
&
name
,
&
size
);
}
}
if
(
ODD
(
sts
))
strcpy
(
return_string
,
name
);
else
strcpy
(
return_string
,
""
);
*
return_decl
=
CCM_DECL_STRING
;
return
1
;
}
static
int
wccm_getrootlist_func
(
void
*
filectx
,
ccm_s_arg
*
arg_list
,
...
...
@@ -1019,6 +1120,10 @@ int wccm_register(
if
(
EVEN
(
sts
))
return
sts
;
sts
=
ccm_register_function
(
"GetNextObject"
,
wccm_getnextobject_func
);
if
(
EVEN
(
sts
))
return
sts
;
sts
=
ccm_register_function
(
"GetClassListAttrRef"
,
wccm_getclasslistattrref_func
);
if
(
EVEN
(
sts
))
return
sts
;
sts
=
ccm_register_function
(
"GetNextAttrRef"
,
wccm_getnextattrref_func
);
if
(
EVEN
(
sts
))
return
sts
;
sts
=
ccm_register_function
(
"GetRootList"
,
wccm_getrootlist_func
);
if
(
EVEN
(
sts
))
return
sts
;
sts
=
ccm_register_function
(
"GetObjectClass"
,
wccm_getobjectclass_func
);
...
...
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