![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Selective include statements Topic Summary: Created On: 26-Feb-2005 00:04 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: Oh well it seemed to work. So knowledge spreads and grows. | |
![]() |
|
Has anyone figured out a way to do selective includes with dxl?
I have tried using preprocessor if statements only to get dxl errors (badly formed token #if): #if (condition){ #include } #elif (condition) { #include } |
|
![]() |
|
![]() |
|
Louie put me right on this one a while back.
You cannot have truly conditional includes in DXL. The example seems to work if the *.inc files are self contained, but don't be fooled. Any declarations made inside will not be visible outside of the scope of the if statement. Also both files are actually included, so there is no advantage over including the whole lot and using a normal if statement to select different behaviour. ------------------------- Tony Goodman http://www.smartdxl.com |
|
![]() |
|
![]() |
|
The DOORS Preprocessor will read both includes and show errors if something is amiss in any include file. For example, if one include is looking for DOORS Analyst information but he user does not have Analyst installed, you will get DXL errors. This is a real problem for mixed engineering environments. Not all users will have or need Analyst installed. What is needed is a true preprocessor if (#if in c++). I have not found a way yet in DOORS.
------------------------- Bruce Tuskey Sr. Principle Engineer Tuskey@gmail.com "All that is gold does not glitter, not all those who wander are lost:..." - Gandalf the Grey (JRR Tolkien) Edited: 28-Feb-2005 at 22:01 by Bruce Tuskey |
|
![]() |
|
![]() |
|
You can "build" your DXL dynamically and then run it in a different context.
By this I mean assemble the DXL, during which you can conditionally include files, and then call eval_ on the resulting string. The dxl must be completely self contained as it is run in a separate context. See example one. Similarly, I have used dynamically constructed DXL for layout DXL columns. See example two. ------------------------- Tony Goodman http://www.smartdxl.com |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Selective include statements
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.