[aspectc-user] Advice for constructors/destructors with any name

Dima S spiridenok at tut.by
Fri Feb 15 16:45:51 CET 2008


Hello,
  
I'm pretty new to AspectC++. I want to define an aspect that can be used for 
any constructor/destructor in my code base. With "any" i mean that class 
name can begin with any letter and is not limited to a predefined letter 
combination.
  
So i try something like that, but the resulting executable crashes:
advice construction ("%") : before () { printf( "constructor\n" ); }
  
Doing something like following works fine (it's also in exmaples), but 
limits me to specific letter combinations (in this case starting with "C"):
advice construction ("C%") : before () { printf( "constructor\n" ); }
  
How can i define a constructor/destructor that can be used with any class 
name?

Thanks in advance! DimaS.
                  

----------
Все блоги - тут: http://blogs.tut.by






More information about the aspectc-user mailing list