[aspectc-user] implementation of baseclass()

Olaf Spinczyk Olaf.Spinczyk at informatik.uni-erlangen.de
Tue Jun 29 14:46:05 CEST 2004


Hi Steffen,

Steffen Käthner wrote:
> Hello,
>  
> currently the aspectc++ code:
>     advice targetClasses() : baseclass(CBase);
> generates this c++ code:
>     class aClass : private CBase
>  
> Unfortunately, my code needs the public derivation:
>     class aClass : public CBase
> Are you planning to implement choosing between public, private and 
> protected?
>  
> Otherwise, I need to change my implementation...
>  
>  
> greets,
> Steffen Käthner

In AspectC++ the access rights on introduced base classes (as well as 
members, etc.) are determined by the access specifier in the aspect. For 
example ..

aspect MakePublicBase {
public: // <-- this determines the access right in the target classes
   advice targetClasses() : baseclass (CBase);
};

introduces a public base class.

Yours,

Olaf



More information about the aspectc-user mailing list