[aspectc-user] Re: Warnings

Olaf Spinczyk Olaf.Spinczyk at informatik.uni-erlangen.de
Tue Nov 29 21:27:23 CET 2005


Hi,

your match expression matches all three functions, but there is no way 
to implement the function call in a generic way. Normally, around advice 
uses tjp->proceed() to run the intercepted function call/execution. 
tjp->proceed()  is generic, because ac++ generates a join point-specific 
proceed function. However, your goal and implementation is different and 
a bit unusual.

How far will you be able to get with these aspects that have to be 
implement of each optimized relation ? Do you think you could live with 
this solution or should we seriously consider some experimental new 
features? Maybe we should discuss this question with Andy. Wouldn't it 
be better to start with some more usual crosscutting concerns?

- Olaf

Dimple wrote:
>Hi Olaf,
>I have a question
>If I have a overloaded method in my parent class
>Like 
>A::abc(int,char*,int);
>A::abc(int);
>A::abc(char*);
>
>And I want to replace it with other child method
>Like
>
>B::abc(int,char*,int);
>B::abc(int);
>B::abc(char*);
>
>So how should be the advice be?? I tried following advice but it is giving
>me some syntax errors. Should I write separate advice for all the three
>methods? But in call if I write A::abc(...) which one will it pick?
>
>advice call ("% A::abc(...)") : around () 
>{
> 
>((B*)tjp->target())->B::abc(*tjp->arg<0>(),*tjp->arg<1>(),*tjp->arg<2>());
>  }
>
>Is there a way to generalize advice for overloaded methods?
>
>Thanks,
>Dimple
>
>
>Thanks,
>Dimple Kaul
>
>  




More information about the aspectc-user mailing list