[aspectc-user] pointers
Jamal Siadat
siadat at cpsc.ucalgary.ca
Wed Jul 13 05:15:29 CEST 2005
Hi,
I have a question and a possible Bug.
here is the question:
I need to put a loop around one of my methods . I was thinking of using a
before and after advice and a tjp->proceed() in between (as shown). but
this doesnt seem to be working. Does anyone have any suggestions on how to
do this ( I need i producing 0 to 9)?
aspect Act : public A {
advice execution("% A::%(...)") : before() {
for ( int i =0; i <10 ; i++)
{
tjp->proceed();
}
advice execution("% A::%(...)") : after() {
cout <<"at the end"<<i<<endl;
}}
};
And for the Bug:
I may have acciedently discovered a bug! I have attached a couple of files
that you may look at. The interesting thing is that if you change the
before advice to an after advice in the aspect you'll get a segmentation
fault when you run it!!!!!
Oh and can anyone tell me how I can get away with using the after advice
and being able to capture the arguments. As you can see I've tried
*tjp->arg<1>() as well but it doesn't seem to work.
Thanks in advance,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: trace.ah
Type: application/octet-stream
Size: 387 bytes
Desc: not available
URL: <http://www.aspectc.org/pipermail/aspectc-user/attachments/20050712/31e94ab1/attachment.obj>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: A.cc
URL: <http://www.aspectc.org/pipermail/aspectc-user/attachments/20050712/31e94ab1/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: A.h
URL: <http://www.aspectc.org/pipermail/aspectc-user/attachments/20050712/31e94ab1/attachment.h>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: m.cc
URL: <http://www.aspectc.org/pipermail/aspectc-user/attachments/20050712/31e94ab1/attachment-0001.ksh>
More information about the aspectc-user
mailing list