[Ktechlab-devel] Plans for further refactoring

P Zoltan zoltan.padrah at gmail.com
Tue Sep 16 11:53:42 UTC 2008


   Hi people,

  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.

  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.

  About handling bugs: we should use the sf.net service for bug reports or  
use something else? (as the sdcc problem should be handled)

  Have a nice day,
   Zoltan




More information about the Ktechlab-devel mailing list