[Ktechlab-devel] Abstraction and properties of components

Zoltan Padrah zoltan.padrah at gmail.com
Thu Oct 28 21:31:11 UTC 2010


  Hi,

 After analyzing the source code of the old simulator, I've come to
the conclusion that currently the best way to abstract the simulator,
is to use the following abstraction:

- the cicuit elements should be added as the existing Component subclasses
- the Circuit itself could be extended to have a list of components
- the elements (or components) have Pins
- Pins can be connected with Wires

We need the component level abstaction, becasue some components might
be formed by have more than one element.

All the above mentioned classes should be models. The controllers
should be separate classes, I guess.


The classes derived from Components can have properties. A quiestion
is, how should be the properties implemented. I see two options here:
- as traditional C++ properties, with setter and getter methods; the
property should be set by the controller and it should have associated
property classes/objects.
- as propery object associated with each component object. The
component shows only the list of its properties, and those properties
can be handled by the controller.

Currently I don't know which way of implementation is better. Any ideas on this?

 Zotltan




More information about the Ktechlab-devel mailing list