[Ktechlab-devel] A patch has arrived

P Zoltan zoltan.padrah at gmail.com
Fri Jul 18 16:35:32 UTC 2008


  Hello,

  As I've written earlier, I've started refactoring the Node hierarhy in  
the source code. I consider the first part of it is done, so I'm sending a  
patch. (I's quite a large one, I hope it's not a problem). It can be  
applied to a source tree called 'trunk'.

  What am I changing with this patch:
- the Node hierarhy looks like this:

1. Node: base class; momentanely has some interfaces related to connectors  
that will be removed with the upcoming patches; also note that this is an  
abstract class
  1.1 ECNode: Electronic Node, inherits from Node; it's an abstract class  
too; defines a simpler interface for managing connectors
   1.1.1 PinNode: inherits from ECNode; this class can be instantiated
   1.1.2 JunctionNode: this also inherits from ECNode; can be instantiated
  1.2 FPNode: Flowpart node; an abstract class which defines the  interface  
for directional connections
   1.2.1 InputFlowNode: correponds to the "old" FPNode with type() == fp_in
   1.2.2 OuptutFlowNode: the "old" FPNode with type() == fp_out
   1.2.3 JunctionFlowNode: the "old" FPNode with type() == fp_junction

- the Node::type() method remains, because it's still needed in some places
- the instantiation of the nodes is different; the constructor  
ECNode::ECNode, FPNode::FPNode with a parameter giving the type of the  
node is now not used (it cannot be used, because those classes are  
abstract now)

  Any comments are welcome :)

  The next thing I want to do is to fix ICNDocument, ItemDocumentData,  
CNItem (?) classes, so I can remove the unneded interfaces from the Node  
class. Also hopefully the type() member will be removed finally. I'll  
write a todo list once I've investigated the problem.

  Zoltan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: node-refactor-part1.patch.bz2
Type: application/bzip2
Size: 10085 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/ktechlab-devel/attachments/20080718/03891535/attachment.bin>


More information about the Ktechlab-devel mailing list