[aspectc-user] First post

Olaf Spinczyk Olaf.Spinczyk at informatik.uni-erlangen.de
Thu Jul 20 09:50:37 CEST 2006


Hi,

the real whole truth is the following ;-):

You don't have to write a constructor or destructor for construction or 
destruction advice. If it is necessary, constructors/destructors are 
generated that behave exactly like the implicitely defined 
constructors/destructors. Then the transformation is applied to these 
generated constructors/destructors in order to invoke the advice code.

The code generation takes place in the definitions of the affected 
classes, because generated constrcutors/destructors become inline members.

Of course, you can only define construction/destruction advice for 
classes that belong to your project (see -p option). External classes 
are never matched.

Fabian, I don't understand under which circumstances undefined symbols 
do occur. In my opinion this should and does never happen.

If ac++ does not behave as described above, please send me a very small 
and simple example that I can use to reproduce the problem.

With best regards,

Olaf


Fabian Scheler wrote:
> Hello,
> 
>>  you must also write a constructor and destructor. Aspects do not affect
>> functions that are not present in
>>  your code (default constructor etc).
> 
> that's not the whole truth - in fact, AspectC++ even generates a copy
> constructor when construction advice is given - but AspectC++ needs to
> know where it should place the generated code for the copy constructor
> (if the code is put to the wrong place this might cause undefined
> symbols when linking all the stuff). Therefore at least one
> translation unit must exist that contains the definition of a method
> of the particular class.
> 
> Ciao, Fabian
> _______________________________________________
> aspectc-user mailing list
> aspectc-user at aspectc.org
> http://www.aspectc.org/mailman/listinfo/aspectc-user




More information about the aspectc-user mailing list