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
1f26212f
Commit
1f26212f
authored
Apr 25, 2007
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Function ClassList and NextObject added
parent
6b33a5ae
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
101 additions
and
1 deletion
+101
-1
wb/lib/wb/src/wb_wccm.cpp
wb/lib/wb/src/wb_wccm.cpp
+101
-1
No files found.
wb/lib/wb/src/wb_wccm.cpp
View file @
1f26212f
/*
* Proview $Id: wb_wccm.cpp,v 1.
1 2007-01-04 07:29:04
claes Exp $
* Proview $Id: wb_wccm.cpp,v 1.
2 2007-04-25 07:29:36
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -308,6 +308,102 @@ static int wccm_getnextsibling_func(
return
1
;
}
static
int
wccm_getclasslist_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
;
pwr_tOName
name
;
pwr_tCid
cid
;
pwr_tObjid
oid
;
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_GetClassList
(
ldhses
,
cid
,
&
oid
);
if
(
ODD
(
sts
))
sts
=
ldh_ObjidToName
(
ldhses
,
oid
,
ldh_eName_Hierarchy
,
name
,
sizeof
(
name
),
&
size
);
}
if
(
ODD
(
sts
))
strcpy
(
return_string
,
name
);
else
strcpy
(
return_string
,
""
);
*
return_decl
=
CCM_DECL_STRING
;
return
1
;
}
static
int
wccm_getnextobject_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
;
pwr_tOName
name
;
pwr_tObjid
objid
;
pwr_tObjid
next_objid
;
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_NameToObjid
(
ldhses
,
&
objid
,
arg_list
->
value_string
);
if
(
ODD
(
sts
))
{
sts
=
ldh_GetNextObject
(
ldhses
,
objid
,
&
next_objid
);
if
(
ODD
(
sts
))
sts
=
ldh_ObjidToName
(
ldhses
,
next_objid
,
ldh_eName_Hierarchy
,
name
,
sizeof
(
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
,
...
...
@@ -780,6 +876,10 @@ int wccm_register(
if
(
EVEN
(
sts
))
return
sts
;
sts
=
ccm_register_function
(
"GetNextSibling"
,
wccm_getnextsibling_func
);
if
(
EVEN
(
sts
))
return
sts
;
sts
=
ccm_register_function
(
"GetClassList"
,
wccm_getclasslist_func
);
if
(
EVEN
(
sts
))
return
sts
;
sts
=
ccm_register_function
(
"GetNextObject"
,
wccm_getnextobject_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