Driver class

Andras Mantia amantia at kde.org
Fri Dec 1 19:44:09 UTC 2006


Hi,

 I'm starting to get confused. There seem to be quite a mess in the way 
these *Driver classes are used. We have one Driver class in the 
lib/cppparser, which for whatever reason is installed thus public, so 
BC should be kept.

But in languages/cpp there is another Driver class using the very same 
driver.h name for the interface file. The other *Driver classes and 
some other (including all 3 that use the QProcess) in cpp part are 
deriving from the Driver class. Now these classes either use
#include <driver.h>
or
#include "driver.h"

AFAIK <*> headers are first searched in the include path and only if its 
not found there are used from the current directory. The Makefile.am 
lists the srcdir/lib/cppparser as well (before $(all_includes)), so 
some of the classes that derive from the Driver class will use the 
version from lib/cppparser, the others will use the version from 
languages/cpp. If its not confusing for you, I think you can accept 
anything. ;-)

Here are the ones using the lib version:

cppevaluation.h (but no class derives from Driver)
store_walker.h (same)
kdevdriver.h (thus KDevDriver and all its derivates are using the lib 
version)
cppcodecompletion.cpp (does not define a class but used internally a 
Driver object from the lib)
simpletypefunction.h (not used?)
cppsuportpart.h (CppSupportPart has a member of the lib version)


The ones using the local version:
main.cpp (RppDriver)
typedesc.cpp (local variable)
backgroundparser.h/cpp (not used)
createpcsdialog.h (CreatePCSDialog::RppDriver)
cppsupport_events.h (not used)
codemodel.h (not used with a stange comment: Not a nice solution)
tree_parser.cpp (not used)
lexer.h (now this includes a member variable of the local version, but 
Lexer is initialized with an object of the global one from the upper 
group)
parser.cpp (used as a method parameter)
lexercahe.cpp (used as a parameter)

I'd suggest:
1) get rid of the local version
2) if not possible, inherit from the lib version and rename it to 
DriverCpp or something like that
3) if not possible just rename it to DriverCpp to avoid confusion
4) if only the local one should be used everywhere rename to DriverCpp 
and be sure that only that one is used.

Andras


-- 
Quanta Plus developer - http://quanta.kdewebdev.org
K Desktop Environment - http://www.kde.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20061201/023b3cf8/attachment.sig>


More information about the KDevelop-devel mailing list