[aspectc-user] non-inline introduction

Francisco Afonso afonsofc at hotmail.com
Tue Mar 25 14:32:37 CET 2008


And if you use named slices?

//------------------------------

slice class mySlice{
public:
   static unsigned int counter;
};

slice unsigned int mySlice::counter = 0;


aspect Counter{
   advice "Device": slice mySlice;
};//--------------------------------------------------

Regards,

Francisco Afonso


> Date: Tue, 25 Mar 2008 10:36:50 +0100
> From: arnd-hendrik.mathias at nefkom.net
> To: aspectc-user at aspectc.org
> Subject: [aspectc-user] non-inline introduction
> 
> Hi,
> I'm tryin' to introduce a new static member to a class including the  
> corresponding non-inline introduction. The code I'm using looks like  
> this:
> 
> /** \code */
> 
> class Device
> {
>     unsigned char devspeed;
>     unsigned char devclass;
>     unsigned char devsubclass;
>     unsigned char devprotocol;
> };
> 
> aspect Counter
> {
>     advice "Device" : slice class
>     {
>        public : static unsigned int counter;
>     };
> };
> 
> slice unsigned int Device::counter = 0;
> 
> /** \endcode */
> 
> Which looks pretty much like the example given in section 5 of the  
> ac-language-reference page 27. Nevertheless ag++ reports an "error:  
> invalid introduction" to me.
> I also tried to put the non-inline introduction into the aspect. Which  
> only makes things different but not better. Can anyone give me some  
> good advice (or at least some better slice than mine ;-)
> Best regards
> 
> Arnd-Hendrik
> 
> 
> _______________________________________________
> aspectc-user mailing list
> aspectc-user at aspectc.org
> http://www.aspectc.org/mailman/listinfo/aspectc-user

_________________________________________________________________
How well do you know your celebrity gossip?
http://originals.msn.com/thebigdebate?ocid=T002MSN03N0707A
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.aspectc.org/pipermail/aspectc-user/attachments/20080325/34f933ee/attachment.html>


More information about the aspectc-user mailing list