[aspectc-user] Aspects for statements
    Melanie Diepenbeck 
    mdiepenbeck at googlemail.com
       
    Wed Aug 24 10:31:49 CEST 2011
    
    
  
Hi,
I'm new to AspectC++ and I'm trying to  create pointcuts for statements. 
A very simple case would look like this:
int main () {
  int x = 10;
  int y = 20;
  while (x != y) {
    if (x < y) {
      x++;
    } else {
      y--;
    }
  }
  cout << "X is " << x << " and Y is " << y << endl;
  return 0;
}
For every statement I would like to add some maintenance information by means 
of AspectC++, e.g. how often a line (x++; y--) is being executing, or some 
printout of the current status.
Is there some way I can create an advice that describes any statement (or a 
specific one?) in a program? 
Thank in advance.
Best regards,
Melanie
    
    
More information about the aspectc-user
mailing list