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
8d1948ce
Commit
8d1948ce
authored
Sep 26, 2007
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
utl list attribute objects added to search
parent
2d21ee55
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
92 additions
and
5 deletions
+92
-5
wb/lib/wb/src/wb_trv.cpp
wb/lib/wb/src/wb_trv.cpp
+79
-1
wb/lib/wb/src/wb_trv.h
wb/lib/wb/src/wb_trv.h
+10
-1
wb/lib/wb/src/wb_utl.cpp
wb/lib/wb/src/wb_utl.cpp
+3
-3
No files found.
wb/lib/wb/src/wb_trv.cpp
View file @
8d1948ce
/*
* Proview $Id: wb_trv.cpp,v 1.
2 2007-09-17 07:08:59
claes Exp $
* Proview $Id: wb_trv.cpp,v 1.
3 2007-09-26 11:53:15
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -2200,6 +2200,84 @@ int trv_object_search(
return
GSX__SUCCESS
;
}
// Get all objects and attribute objects matching the search criteria.
// Call the backcall function for found objects and attribute objects.
int
trv_aobject_search
(
trv_tCtx
trvctx
,
trv_tBcFunc
backcall
,
void
*
arg1
,
void
*
arg2
,
void
*
arg3
,
void
*
arg4
,
void
*
arg5
)
{
int
sts
;
pwr_tObjid
objdid
;
pwr_tClassId
obj_class
;
pwr_tVolumeId
*
volume_ptr
;
if
(
cdh_ObjidIsNotNull
(
trvctx
->
hierobjid
))
{
sts
=
ldh_GetObjectClass
(
trvctx
->
ldhses
,
trvctx
->
hierobjid
,
&
obj_class
);
if
(
EVEN
(
sts
))
return
sts
;
if
(
!
(
obj_class
==
pwr_eClass_ClassHier
||
obj_class
==
pwr_eClass_TypeHier
||
obj_class
==
pwr_eClass_MountObject
||
obj_class
==
pwr_eClass_LibHier
))
{
/* Hierarchy object is supplied. Check if the children */
sts
=
trv_get_attrobjects
(
trvctx
->
ldhses
,
trvctx
->
hierobjid
,
trvctx
->
classid
,
trvctx
->
name
,
trv_eDepth_Deep
,
backcall
,
arg1
,
arg2
,
arg3
,
arg4
,
arg5
);
if
(
EVEN
(
sts
))
return
sts
;
}
}
else
if
(
trvctx
->
volume
)
{
volume_ptr
=
trvctx
->
volume
;
while
(
*
volume_ptr
)
{
sts
=
ldh_GetVolumeRootList
(
trvctx
->
ldhses
,
*
volume_ptr
,
&
objdid
);
while
(
ODD
(
sts
))
{
sts
=
ldh_GetObjectClass
(
trvctx
->
ldhses
,
objdid
,
&
obj_class
);
if
(
EVEN
(
sts
))
return
sts
;
/* Check that the class of the object is correct */
if
(
!
(
obj_class
==
pwr_eClass_ClassHier
||
obj_class
==
pwr_eClass_TypeHier
||
obj_class
==
pwr_eClass_MountObject
||
obj_class
==
pwr_eClass_LibHier
))
{
/* Check if the children */
sts
=
trv_get_attrobjects
(
trvctx
->
ldhses
,
objdid
,
trvctx
->
classid
,
trvctx
->
name
,
trv_eDepth_Deep
,
backcall
,
arg1
,
arg2
,
arg3
,
arg4
,
arg5
);
if
(
EVEN
(
sts
))
return
sts
;
}
sts
=
ldh_GetNextSibling
(
trvctx
->
ldhses
,
objdid
,
&
objdid
);
}
volume_ptr
++
;
}
}
else
{
sts
=
ldh_GetRootList
(
trvctx
->
ldhses
,
&
objdid
);
while
(
ODD
(
sts
))
{
sts
=
ldh_GetObjectClass
(
trvctx
->
ldhses
,
objdid
,
&
obj_class
);
if
(
EVEN
(
sts
))
return
sts
;
/* Check that the class of the node object is correct */
if
(
!
(
obj_class
==
pwr_eClass_ClassHier
||
obj_class
==
pwr_eClass_TypeHier
))
{
/* Check if the children */
sts
=
trv_get_attrobjects
(
trvctx
->
ldhses
,
objdid
,
trvctx
->
classid
,
trvctx
->
name
,
trv_eDepth_Deep
,
backcall
,
arg1
,
arg2
,
arg3
,
arg4
,
arg5
);
if
(
EVEN
(
sts
))
return
sts
;
}
sts
=
ldh_GetNextSibling
(
trvctx
->
ldhses
,
objdid
,
&
objdid
);
}
}
return
GSX__SUCCESS
;
}
...
...
wb/lib/wb/src/wb_trv.h
View file @
8d1948ce
/*
* Proview $Id: wb_trv.h,v 1.
7 2007-01-04 07:29:04
claes Exp $
* Proview $Id: wb_trv.h,v 1.
8 2007-09-26 11:53:15
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -204,5 +204,14 @@ int trv_get_attrobjects (
void
*
arg5
);
int
trv_aobject_search
(
trv_tCtx
trvctx
,
trv_tBcFunc
backcall
,
void
*
arg1
,
void
*
arg2
,
void
*
arg3
,
void
*
arg4
,
void
*
arg5
);
#endif
wb/lib/wb/src/wb_utl.cpp
View file @
8d1948ce
/*
* Proview $Id: wb_utl.cpp,v 1.
4 2007-09-05 08:22:18
claes Exp $
* Proview $Id: wb_utl.cpp,v 1.
5 2007-09-26 11:53:15
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -7557,7 +7557,7 @@ int utl_list (
volume_p
);
if
(
EVEN
(
sts
))
return
sts
;
sts
=
trv_object_search
(
trvctx
,
sts
=
trv_
a
object_search
(
trvctx
,
(
trv_tBcFunc
)
utl_ctxlist_insert
,
&
(
utlctx
->
list
[
0
]),
&
(
utlctx
->
listcount
[
0
]),
0
,
0
,
0
);
if
(
EVEN
(
sts
))
return
sts
;
...
...
@@ -11579,7 +11579,7 @@ static int cross_crosslist_load( ldh_tSesContext ldhses)
volume_p
);
if
(
EVEN
(
sts
))
return
sts
;
sts
=
trv_object_search
(
trvctx
,
sts
=
trv_
a
object_search
(
trvctx
,
(
trv_tBcFunc
)
cross_crosslist_object_insert
,
ldhses
,
0
,
0
,
0
,
0
);
if
(
EVEN
(
sts
))
return
sts
;
...
...
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