[aspectc-user] Roadmap: STL and AspectC++ 0.7

Danilo Beuche danilo.beuche at pure-systems.com
Thu Mar 6 10:25:14 CET 2003


Hi Betty,

in theory your idea does work. But it is likely to cause many problems 
if you exclude all types which are based on STL types. AspectC++ needs 
semantically correct C++ to be able to parse it. If you exclude member 
variables ( "a" in your example ) with #ifndef __puma AspectC++ cannot 
see it, and will give an error if "a" is is used e.g. in a method 
implementation.


So, what else can you do? 0.7 will support parsing STL code. We will 
release a 0.7pre2 in the next week, which will mainly fix problems found 
in 0.7pre1. The next item on our list will be STL support.

We expect to have 0.7 ready in this month.

Danilo

Goh, Betty wrote:
> Hi Olaf,
> 
> Thanks for your prompt reply.
> 
> Unfortunately, log4cpp has a lot of strings.
> 
> I understand that you can do a #ifndef __puma and #endif to encapsulate the
> STL codes. But in order to use the STL codes, I will still need to include
> their headers. And including their headers usually create a lot of problems
> while compiling with ac++. Can I also do a #ifndef __puma with #include
> codes too? Would that cause the parser to omit the STL headers during the
> re-building of main.cc, thus causing compilation errors (for g++)?
> 
> An example would be:
> #ifndef __puma
> #include <string>
> #endif
> 
> aspect abc
> {
>    #ifndef __puma
>    string a = "abc";
>    #endif
>    ...
> }
> 
> ac++ compile would be okay, but how about g++ compile later on?
> 
> Thanks again. :)
> 
> regards,
> Betty
> 
> Tel:(65)6828-9561
> Email:betty.goh at glenayre.com
> 
> -----Original Message-----
> From: Olaf Spinczyk [mailto:Olaf.Spinczyk at informatik.uni-erlangen.de]
> Sent: Thursday, March 06, 2003 3:27 PM
> To: Goh, Betty; 'aspectc-user at aspectc.org'
> Subject: Re: [aspectc-user] AspectC++ doesn't support objects?
> 
> 
> Dear Betty,
> 
> On Thursday 06 March 2003 03:52, Goh, Betty wrote:
> 
>>Dear all,
>>
>>I found the answer to my question, seemed like AspectC++ doesn't support
>>STL yet.
>>http://www.aspectc.org/pipermail/aspectc-user/2002-September/000105.html
>>
>>However, that lead to another question:
>>Does AspectC++ support user-defined objects?
>>Say for instance, I'm trying to use AspectC++ to include logging messages
>>(from log4cpp), and this would involve the inclusion of header files from
>>log4cpp and declaring logger objects.
>>Would AspectC++ be able to handle this properly?
> 
> 
> There is no conceptional problem that prevents your AspectC++ code to
> include 
> log4cpp header files and to instantiate logger objects. However, if it works
> 
> depends on the code of the header files. If it uses string or some other STL
> 
> classes you will run into parse problems again. It's easy to test this. Just
> 
> extend one of the example aspects by an include directive. Please tell me,
> if 
> you are successful :-)
> 
> Yours,
> 
> Olaf
> _______________________________________________
> aspectc-user mailing list
> aspectc-user at aspectc.org
> http://www.aspectc.org/mailman/listinfo/aspectc-user
> 


-- 
Danilo Beuche                           Phone: +49-391-54456910
pure-systems GmbH                       Fax:   +49-391-54456990




More information about the aspectc-user mailing list