Debian Codegraph @

AspectC++/tests/PragmaAcxxAffect/tracePrintf.ah

raw
1 #ifndef __tracePrintf_ah__
2 #define __tracePrintf_ah__
3
4 #pragma acxx affect "class?.*"
5
6 #include <stdio.h>
7
8 aspect TracePrintf {
9
10 #pragma acxx filter "class?.*"
11 advice call("% printf(...)") : before() {
12 printf("Some class print (%d): ", tjp->that()->_TracerValue++);
13 }
14
15 #pragma acxx filter "classA.h"
16 #pragma acxx filter "classB.h"
17 advice "%" : slice struct { int _TracerValue = 0; };
18 };
19
20 #endif /* __tracePrintf_ah__ */