<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>
Wow. This really works!!!<br><br>I didnīt expected that, after weaving, the non-inline functions definitions would be placed in the class implementation file.<br><br>Congratulations to the AspectC++ team!<br><br>Francisco Afonso<br><br>----------------------------------------------------<br><br>> Date: Tue, 6 Nov 2007 17:09:49 +0100<br>> From: matthias.urban@pure-systems.com<br>> To: afonsofc@hotmail.com<br>> CC: aspectc-user@aspectc.org<br>> Subject: Re: [aspectc-user] slice function definition<br>> <br>> Hi Francisco,<br>> <br>> > I am having problems with this simple program for testing non-inline slice functions:<br>> > <br>> > //-------------------------file: exec.ah---------------------------<br>> > aspect myAspect{<br>> > <br>> >     slice class mySlice{<br>> >        public:<br>> >          int counter;<br>> >          void f();<br>> >        }<br>> > <br>> >     slice void mySlice::f() { // this is line 14<br>> > ...<br>> <br>> Simply move your slice declaration out of the aspect declaration:<br>> <br>> //-------------------------file: exec.ah---------------------------<br>> slice class mySlice{<br>> public:<br>>    int counter;<br>>    void f();<br>> };<br>> <br>> slice void mySlice::f() {<br>>    printf("In f()\n");<br>> }<br>> <br>> aspect myAspect{<br>>    advice "Myclass": slice mySlice;<br>> };<br>> //-------------------------file: exec.ah---------------------------<br>> <br>> Best regards<br>> <br><br /><hr />Peek-a-boo FREE Tricks & Treats for You! <a href='http://www.reallivemoms.com?ocid=TXT_TAGHM&loc=us' target='_new'>Get 'em!</a></body>
</html>