[aspectc-user] Using Introductions

Daniel Lohmann daniel.lohmann at informatik.uni-erlangen.de
Tue Feb 22 19:20:14 CET 2005


Sergio Queiroz wrote:

>Hi!!
>
>I have a doubt about introductions.
>
>I would like to add some variables to a struct so I created an introcution.
>But I would like my new variables were declared as public variables but using
>AspectC++ the are declared as private.
>
>What should I do to declare new public variables??
>  
>
Put the introductions into a public section of the aspect:

aspect Foo {
  // introduce i into class Bar as private
  advice "Bar" : int i;

public:
  // introduce k into class Bar as public
  advice "Bar": int k;
};

Thats all :-)


Daniel



More information about the aspectc-user mailing list