[aspectc-user] AspectC++ doesn't support objects?

Goh, Betty betty.goh at glenayre.com
Thu Mar 6 09:05:11 CET 2003

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:
> 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
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 :-)



More information about the aspectc-user mailing list