[aspectc-user] conditional compilation / "advicing"

EXTERN Sacher Dominik (Diplomand; FV/SLD) Dominik.Sacher at de.bosch.com
Thu Oct 31 13:07:06 CET 2002


Dear all!

Are there any ideas around, how to specify 
"conditional aspect-izing" with AspectC++. 
I´m using AspectC++ to build different "aspectized" 
versions out of one sourcetree.
I need a kind of 
#IFDEF ... #ELSIF ... #ENDIF 
inside the *.ah-file.


e.g.
pointcut pc_SomePointcut ()= ...

#IFDEF BIG_VERSION
advice pc_SomePointcut() : before() {
  <aspect-code for big version>
}
advice pc_SomePointcut() : after() {
  <aspect-code for big version>
}


#ELSIF
advice pc_SomePointcut() : after() {
  <aspect-code for small version>
}


#ENDIF


These do not work, but are there other elegant ways to achieve this?
I´m thinking about placing the different advice-levels in 
different *.ah-files and renaming the files using the Makefile as needed...

Regards,
Dominik










More information about the aspectc-user mailing list