[aspectc-user] global definitions
pdm-steve
pdm-steve at gmx.de
Wed Jun 16 10:33:56 CEST 2004
Seems, I found it by myself.... it was much easier than exepcted:
aspect myAspect{
TDataContainer* DataContainer;
advice execution("% main(...)") : around() {
DataContainer = new TDataContainer();
tjp->proceed();
delete DataContainer;
}
}
greets,
Steffen Käthner
----- Original Message -----
From: pdm-steve
To: aspectc-user at aspectc.org
Sent: Wednesday, June 16, 2004 12:40 AM
Subject: [aspectc-user] global definitions
Hi,
how to add a global object definition with aspectc?
I have this:
int main() { ... }
and want to have something like this:
TDataContainer* DataContainer;
int main() { ... }
Like in the AOSD-Tutorial is shown, I can add members to classes:
advice "anyClass" : int counter;
... but I want to add a global object/variable to the main function
greetings,
Steffen Käthner
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.aspectc.org/pipermail/aspectc-user/attachments/20040616/936bb3a5/attachment.html>
More information about the aspectc-user
mailing list