How does C++ support create class declarations?
Andreas Pakulat
apaku at gmx.de
Mon Feb 18 20:39:23 UTC 2008
On 18.02.08 21:26:44, Andreas Pakulat wrote:
> On 18.02.08 20:57:52, David Nolden wrote:
> > On Monday 18 February 2008 19:47:16 Andreas Pakulat wrote:
> > > I've got the following DUChain:
> > > kdevelop(14055)/kdevelop (python support) Python::DumpChain::dump: "" New
> > > Context "" [ (0, 0) -> (23, 0) ] top-context kdevelop(14055)/kdevelop
> > > (python support) Python::DumpChain::dump: " " New Context "Bar" [ (0, 0)
> > > -> (2, 1) ] kdevelop(14055)/kdevelop (python support)
> > > Python::DumpChain::dump: " " Declaration: "<notype> " [ "Bar::" ]
> > > 0x844ef20 (internal ctx 0x0 ) [ (0, 6) -> (0, 9) ] , defined, 0 use(s)
> > >
> > > i.e. there's a Context with localScopeIdentifier "Bar" and inside that
> > > the class declaration and following that would be the body statements.
> > >
> > > Or should the Declaration be in the top context and there should be a
> > > context just for the body with the localScopeIdentifier "Bar"?
> > >
> > > Andreas
> >
> > I think it should be like this:
> >
> > Context "" [ (0, 0) -> (23, 0) ] top-context
> > Context "Bar" id 0x1 [ (0, 0) -> (2, 1) ]
> > Declaration "Bar" (internal ctx 0x1)
> >
> > So the context "Bar" and declaration "Bar" are connected through
> > the "Context::owner()" and "Declaration::internalContext()" relationship, and
> > they both have the top-context as parent context.
>
> Yeah, that makes more sense. However what I'm really stumbling about is
> that in C++ apparently such code:
>
> class Foo {};
Ok, you can forget everything I just said and I declare myself dumb. I
missed that its not an if - else if - else if - else block, but rather
an if - if - else if - else thing :)
Andreas
--
Do what comes naturally. Seethe and fume and throw a tantrum.
More information about the KDevelop-devel
mailing list