[aspectc-user] Intercepting execution of nested class

Bartosz Blimke masb at chorwacja.com
Mon Jun 7 14:50:03 CEST 2004

Another problem :)

During experiments on previosu problem I have found another one:

lets take a code like this:

#include <stdio.h>

void func () {

   printf ("func\n");

class Class1
	class Class2
	  void func1()
	} class2Instance;

int main (int argc, char * argv[]) {
   func ();
   Class1 class1;
   return 0;
//end of main.cpp

#ifndef __Aspect_ah__
#define __Aspect_ah__

#include <stdio.h>

aspect Aspect {

	pointcut methods() = execution("% ...::func1(...)");

	advice methods() : before()
            printf("before %s\n", thisJoinPoint->signature());

#endif // __Aspect_ah__
//endo of Aspect.ah

This code doesnt work becouse pointcut doesn't seem to
be correct.
How can I define pointcut to intercept method of nested class:

"% Class1::Class2::func1(...)" doesnt work too.


Bartosz Blimke
masb at chorwacja.com

More information about the aspectc-user mailing list