[aspectc-user] slice function definition

Francisco Afonso afonsofc at hotmail.com
Wed Nov 7 11:58:58 CET 2007


Wow. This really works!!!

I didnĀ“t expected that, after weaving, the non-inline functions definitions would be placed in the class implementation file.

Congratulations to the AspectC++ team!

Francisco Afonso

----------------------------------------------------

> Date: Tue, 6 Nov 2007 17:09:49 +0100
> From: matthias.urban at pure-systems.com
> To: afonsofc at hotmail.com
> CC: aspectc-user at aspectc.org
> Subject: Re: [aspectc-user] slice function definition
> 
> Hi Francisco,
> 
> > I am having problems with this simple program for testing non-inline slice functions:
> > 
> > //-------------------------file: exec.ah---------------------------
> > aspect myAspect{
> > 
> >     slice class mySlice{
> >        public:
> >          int counter;
> >          void f();
> >        }
> > 
> >     slice void mySlice::f() { // this is line 14
> > ...
> 
> Simply move your slice declaration out of the aspect declaration:
> 
> //-------------------------file: exec.ah---------------------------
> slice class mySlice{
> public:
>    int counter;
>    void f();
> };
> 
> slice void mySlice::f() {
>    printf("In f()\n");
> }
> 
> aspect myAspect{
>    advice "Myclass": slice mySlice;
> };
> //-------------------------file: exec.ah---------------------------
> 
> Best regards
> 

_________________________________________________________________
Peek-a-boo FREE Tricks & Treats for You!
http://www.reallivemoms.com?ocid=TXT_TAGHM&loc=us
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.aspectc.org/pipermail/aspectc-user/attachments/20071107/e1458c20/attachment.html>


More information about the aspectc-user mailing list