kdevelop component factories
Matthias Hölzer-Klüpfel
mhk at kde.org
Wed Apr 10 19:28:04 UTC 2002
On Wednesday 10 April 2002 10:29, Bernd Gehrmann wrote:
> On Tuesday 09 April 2002 21:14, you wrote:
> > On Tuesday 09 April 2002 10:38, Bernd Gehrmann wrote:
> > > Maybe then it would make sense to merge KDevApi and KDevPartController?
> >
> > No, please don't. I rearranged some things in the API, as we had a
> > growing number of unrelated functions in KDevCore. I moved the part
> > related stuff to KDevPartController, and the view related stuff to
> > KDevTopLevel. I believe it is a good idea to have coherent classes that
> > deal with one issue.
>
> That's the point. KDevApi doesn't deal with any issues, it is just a
> container for conveniently passing a couple of pointers to a constructor,
>
> struct KDevApi {
> FooPart *f;
> BlaPart *p;
> };
>
> It's not needed by any part, so there is no need for accessors, d-pointers,
> etc.
Well, then we could eliminate that class and pass all these pointers around in
the constructor.
But that is not true, some elements (like the current project) change, and
globally accessible members are really bad style in that case. And I would
prefer to access the pointers via the api() function than by copying the
pointers to Core, TopLevel et. al. in each plugin.
Bye,
Matthias.
More information about the KDevelop-devel
mailing list