[Ktechlab-devel] test-cases using KDevelop::Core

P Zoltan zoltan.padrah at gmail.com
Mon Apr 19 11:04:06 UTC 2010


  Clarifications to my previous email:

On Thu, 15 Apr 2010 21:33:45 +0200, P Zoltan <zoltan.padrah at gmail.com>  
wrote:

>
>   Then getting the model is currently not possible. Not a big problem,  
> can be fixed with the interfaces.
>

  We need a new interface, becausethe circuitdocument is subclassed from  
KDevelop::KPartDocument. Instead I'd suggest:
CircuitDocument <- IComponentDocument <- Kdevelop::KPartDocument.


>   Now I'm thinking how hook up the simulator.
>
>   The debugController might be useful for running PIC programs. It might  
> be usef for circuits, too, but I don't know which one is the better  
> solution: implement the IDebugSesstion interface or subclass the Core  
> and add SimulatorController type member, where the documents can  
> register themselves. It's not obvious.
>
>   For simulation we need:
> - the actual simulator, for different document types
> - a way to register new component models for a simulator class/document  
> type, in order to be loaded from plugins
> - the models for the compoennts
>
>   So one way to do this might be:
> create an ISimulatorController. It contains a list of registered  
> component types and the factories associated with them, and also a list  
> of document types and document simulator factories.
> When a new document is created, it creates a new document simulator with  
> the document type (great, now we will again have document.type()), and  
> attaches the simulator to the document model. Then the document  
> simulator on each model change can rebuild the structure formed by the  
> models. Also, when a given time elapses, the document simulator runs a  
> step in simulation.

  Inheriting from the Core is not a solution, because the Core is created  
in kdevplatform. The way to go is with a ISimulationController singleton.

>   The problem with this solution is I don't know how will be  
> kdevplatform/kde able to load a needed plugin if a component residing in  
> some now loaded plugin is needed.
>

This is still a problem. Maybe load them from the SimuationController at  
document attachment?

>   Opinions, ideas?
>
>>
>> bye then
>> julian
>>
>
>   Zoltan






More information about the Ktechlab-devel mailing list