[aspectc-user] How can I used the designator "that"

Olaf Spinczyk Olaf.Spinczyk at informatik.uni-erlangen.de
Mon Feb 12 09:28:18 CET 2007


Hi Wagner,

you can also use 'that' in the following way:

that("MainProgram") or that(someNamePointcut())

Two additional remarks:

* remove the brackets at the end of 'execution("% %::%(...)")()'

* the pointcut expression 'execution("% %::%(...)") &&
  that("MainProgram")' will lead to a massive amount of code
  instrumentation. -> all member functions of classes that are
  neither "MainProgram" nor derived from "MainProgram".
  I would recommend to add some additional filter, e.g.:
  execution("% TheRelevantClass::%(...)") && that...

- Olaf

Wagner Salazar wrote:
> Hi,
> 
> I would like to how if I can do this, but without that bounding ...
> 
> advice execution("% %::%(...)")() && that(agent) : before(MainProgram*
> agent) {
>       cout<<"\n Something ...";        
> }
> 
> 
> Something like this:
> 
> advice execution("% %::%(...)")() && that(MainProgram) : before() {
>      cout<<"\n Something ...";        
> }
> 
> I treid this and got this erro.
> 
> ag++ MainProgram.cc -c
> aspecto.ah:32: error: 'MainProgram' is not in argument list
> error: Execution failed: "ac++" --config "puma.config"  -p. -c
> "MainProgram.cc" -o " MainProgram.acc"
> make: *** [a] Error 1
> 
> 
> How I can do this? thxs for any help!
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> aspectc-user mailing list
> aspectc-user at aspectc.org
> http://www.aspectc.org/mailman/listinfo/aspectc-user




More information about the aspectc-user mailing list