![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Retrieving an Object, regardless of filter Topic Summary: Created On: 11-Jun-2008 17:47 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
One thing I find annoying is that many functions which return an Object, respect the current display set (filter). For example:
Object object(int AbsNo) Object next(Object o) Object previous(Object o) Object first(Object o) Object last(Object o) These functions will return different Objects (and in some cases return null) based on the current display set. So, when I really want the next Object (as it would appear with no filter), I often result to the "for object in entire(Module)" loop, something like: Object getObject(int xDesired,Module xModule) { Object xObject for xObject in entire(xModule) do { xAbsNo = xObject."Absolute Number" if(xAbsNo==xDesired) return xObject } return null } This is less than ideal, becuase every time you want to get an object, you have to loop through the whole module. Now, I could probably use "filtering off" and "filtering on", but I'd rather not have to mess with the user's filter. Is there a better way? |
|
![]() |
|
![]() |
|
I don't believe so. Turning off the filter seems to be the only way. Or looping through the whole module. Unless there's an undocumented perm.
------------------------- David Pechacek AAI Services Textron dpechacek@sc-aaicorp.com David.Pechacek@gmail.com |
|
![]() |
|
![]() |
|
You can create a skip list of all objects then even if filtered you can go directly to your desired object by pulling it out of the skip list.
|
|
![]() |
|
![]() |
|
I've thought of the skip list idea, although I haven't tried it yet. I'm a little bit concerned how much extra memory that might take. If I have a module with 30,000-40,000 objects.... how much memory would get gobbled up?
I've also thought of building a Skip list of DxlObjects, and in each DxlObject, storing all the data for each object, including ID, heading, text, attributes, etc. Then, you could retrieve any bit of info pretty quickly. If you didn't need to write to the module, you could load everything into the skip list, then close the module. But again, it seems to almost defeat the purpose of DOORS.... although maybe that is a good thing ![]() |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Retrieving an Object, regardless of filter
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.