How to define multiple parameters on a single line to switch class diagram draw context

0 votes
asked May 15 in Question / help by KJW

Hi 

I am building up a complex class diagram using !define param to control what is shown by commenting/uncommenting out the line. 

'!define PART1
'!define PART2
'!define PART3
'!define PART4
'!define PART5 !define PART20  !define PART30 
'!define PART6 !define PART20 !define PART30

'!define PART7 !define PART21  !define PART30 
'!define PART8 !define PART21 !define PART31

EG Titles etc 

!ifdef PART1
title Business  Control Basic WSDL  Part1
!endif
!ifdef PART2
title  Business  Control (getControls(options)) WSDL  Part2
!endif
!ifdef PART3
title  Business Control (setControls(options)) WSDL  Part3
!endif
!ifdef PART4
title  Business  Control (Only Control Setails) WSDL  Part4
!endif

Many components are shared within diagram

!ifdef PART1 || PART2 || PART3 || PART5 || PART6 

namespace {

:

:

}

!endif

But I am looking to have other parts switch in/out depending on multiple param's on a line.

Simple in principle but not something seems to be supported.

Is there a trick I'm missing?

1 Answer

0 votes
answered May 21 by anonymous

No real magic - just some lateral thinking

!define DRAW(x) !define x
!definelong DRAW(x,y,z)
!define x
!define y
!define z
!enddefinelong

'====DRAW Specific Diagrams by Comment/Uncommenting Line===
'====Only uncomment one line at a Time======================
'DRAW(PART1)
DRAW(PART2)
'DRAW(PART3)
'DRAW(PART4)
'DRAW(PART5, PART20, PART30)
'DRAW(PART6, PART20, PART30)
'DRAW(PART7, PART22, PART30)
'DRAW(PART8, PART22, PART30)
'DRAW(PART9, PART22, PART30)
'DRAW(PART10, PART22, PART30)

...