[Ktechlab-devel] Hidden functions.

Alan Grimes agrimes at speakeasy.net
Tue Oct 13 17:38:02 UTC 2009


I had left connector.cpp open while I was doing other things, when I got
back I noticed that I was looking at a function that isn't in the master
list because it is not in any header file,

int getSlope(float x1, float y1, float x2, float y2).

I think ktechlab has a few dozen of these hidden functions that aren't
browseable by kdevelop. =(

Just as Cpp files should implement only one class, cpp files should also
implement either functions or methods, never both!

A great janitor project for a noob is to find all examples of these
hidden functions, and move them to new cpp files and create headers for
them and then add them to the appropriate path... This will allow them
to be browsed by kdevelop and make them much easier to examine and debug.

also, in the connector code, are a lot of methods that never accessed
any class members, and are therefore, for all practical purposes,
independent functions... =P I know OO is all the rage but many things
are not inherently objects and, in the C++ universe should be
stand-alone functions. In a true OO language, they would be grouped as
static methods of an abstract class... they can be called but the class
is never instantiated.

-- 
New president: Here we go again...
Chemistry.com: A total rip-off.
Powers are not rights.





More information about the Ktechlab-devel mailing list