project tree watcher interface plan

Andreas Pakulat apaku at gmx.de
Tue Jun 5 18:49:13 UTC 2007


On 05.06.07 12:31:01, dukju ahn wrote:
> 2007/6/5, Matt Rogers <mattr at kde.org>:
> > On Tuesday 05 June 2007 00:24, dukju ahn wrote:
> > > > Why does each build manager need its own file system watcher?
> > >
> > > Because when filesystem are changed, appropriate actions should
> > > be taken by project manager again. For ex, if new directory which
> > > contains Makefile is copied, the manager should parse() it again.
> > > So each manager just reimplement the virtual method.
> > >
> >
> > You misunderstand. I ask why each manager requires it's own file watcher
> > class, when it's not needed. Handling these FS notifications can be done in a
> > build manager specific way with just signals and slots , or by having the
> > build manager implement an interface. Or even better, just have the build
> > manager do its own thing with regard to file system watching.
> 
> What is build manager you mentioned? Is it different from project manager?

Yes.

> I'm confused by the terms.

Then please look at our API's. The Build Manager is the component that
manages the buildsystem files of the projects. The project manager is an
integral part of the shell and manages the various projects (it doesn't
know about buildsystems and so on).

> > And virtuals have high costs associated with them. When necessary, I like to
> > avoid virtuals, and this is one of those cases where I think we can avoid the
> > extra virtuals by having the manager create its own instantiation of
> > QFileSystemWatcher and using that and dealing with it directly.
> 
> Please see my attached file. The file didn't propose that I will add additional
> interface on IProjectFileManager. What I suggested was utility class which
> will be initiated by project manager.

It doesn't have anything to do with where the virtuals are, its just
simply more costly to execute a virtual than emitting a signal and
calling a slot. The latter one includes 2 function calls and a
switch-statement I think.

Andreas

-- 
You're being followed.  Cut out the hanky-panky for a few days.




More information about the KDevelop-devel mailing list