[aspectc-user] Roadmap: STL and AspectC++ 0.7
danilo.beuche at pure-systems.com
Thu Mar 6 10:19:55 CET 2003
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
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.
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>
> aspect abc
> #ifndef __puma
> string a = "abc";
> ac++ compile would be okay, but how about g++ compile later on?
> Thanks again. :)
> 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:
>>I found the answer to my question, seemed like AspectC++ doesn't support
>>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
> 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,
> you are successful :-)
> aspectc-user mailing list
> aspectc-user at aspectc.org
Danilo Beuche Phone: +49-391-54456910
pure-systems GmbH Fax: +49-391-54456990
More information about the aspectc-user