[Ktechlab-devel] Plans for further refactoring

Julian Bäume julian at svg4all.de
Tue Sep 16 12:12:25 UTC 2008


On Tuesday 16 September 2008 13:53:42 P Zoltan wrote:
>   I've just committed the removal of Node::type() member in the svn. (the
> program still works for me) The negative part of this change is that now
> instead of someNode->type() now there are checks like
> "dynamic_cast<JunctionNode*>(someNode) != 0". I've marked these lines with
> //FIXME tag (kdevelop lists these under the Problems tab). The next thing
> I want to do is to move the code containing dynamic_casts to lower levels
> of hierarchy (to the casts won't be needed anymore). A lot of casts are
> done in the Connector's members, as a connector holds pointers only Nodes,
> and it doesn't know about ECNode or FPNode. I want to fix this by creating
> 2 new classes: CircuitConnector and FlowConnector, each of them holding
> ECNodes, repectively FPNodes.
That sounds nice. I tested your patch, it works fine for me. FIXME is the 
right way to go here. This way one can easily find the points in the code, 
that need some work.
Concerning the new classes, I think this would be the right direction to take. 
I also think your naming-scheme is the better one, as it's much more obvious 
then eg. CConnector (like it's done in ECNode) especially to new developers.

>   I was thinking also about the separation of model, view and controller in
> ktechlab. I think it can be done. The models are the Elements, Wires and
> Pins; the Drawparts could be used as view and the controllers could be
> Components, FlowParts, Node, Connctor. This way a component would have
> some drawparts, and the drawparts take care of drawing themselves; when
> something is happening to the component (like it's moved, changes state,
> ...) it only tells the drawparts how they should behave in the new
> conditions (it moves them, or changes their color,...). This is only a
> plan, because there are more urgent things to do.
That's what I'm working on at the moment. I created a page in the wiki, but 
since Jason wanted to abandon the page, I have to be careful, not to loose any 
information ;). It's not much for now, since my time was quite limited but I 
will work on that regularly from now on.

You can have a look here: 
http://www.ktechlab.org/wiki/index.php?title=DEVEL:KDE4_Port

>   About handling bugs: we should use the sf.net service for bug reports or
> use something else? (as the sdcc problem should be handled)
I just had a look at this stuff and it's pretty cool. They also did some work 
on that feature. It's pretty shiny now.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 489 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/ktechlab-devel/attachments/20080916/9a08c758/attachment.sig>


More information about the Ktechlab-devel mailing list