[aspectc-user] Small API addition request.

Robert Scott lists at riscott.ukfsn.org
Wed Nov 15 06:34:33 CET 2006

Hello Matthias,

On Tuesday 14 November 2006 16:42, Matthias Urban wrote:
> Semantic objects that represent the same function, class etc. are
> connected to each other. For instance:
>    class X {
>      void foo();      // connected with implementation of foo
>    };
>    void X::foo() {    // connected with declaration of foo
>    }
> You can connect two object infos using the NextObject(info) method of
> CObjectInfo. If two objects are connected, a call to DefObject() always
> returns the object info representing the implementation (if there is
> any). So you can have several declarations of the same entity. Maybe you
> can use this to build your master database.

I'm glad you told me this. I was wondering what the NextObject methods were 
about but hadn't yet read the source of those bits. That solves my member 
function merging quite neatly.

I'm trying my best to unify the header overhead, as it seems a bit of a sin to 
put 100 copies of 300+ header classes & functions into memory. Where - 
although it can't be guaranteed that the objects will be the same from one 
inclusion to the next - it's probably 99% likely that they _are_ identical.

To do this, I need to re-point the BaseClass pointer of a 'target' class (one 
that resides in a header file inside the project path[s]) that inherits from 
a class that already has an entry in the master database to the master 
database's base class.

The same goes for Friends and Derivatives. So it's not that the order 
matters - it's that I have to be able to iterate numerically over the 
BaseClasses and repoint them as I get them. Although I can work around this 
with a little ugliness - treating the BaseClass (|Friend|Deriv) entries as a 

> I don't know if this was very helpful for you. But replacing semantic
> objects is a delicate issue. 

I'm rapidly finding this out. It's just the sheer amount of information that 
you can get from the data structures. A bit overwhelming. And the potential 
to cause a lot of dangling pointers if not done with care.

> Btw, we are currently working exactly on 
> this interface and the data structures behind it to improve the
> performance (memory and runtime).



This could solve _all_ my problems.

Still, I'll keep plugging away for now - the worst that can happen is I'll 
learn a lot more about the internals of PUMA.


More information about the aspectc-user mailing list