moin,
I had a look into the simulatormanager branch and want to add some
comments to the interface.

There are some methods that aren't supposed to
change the state of their class in any way. These should be declared as
const. These are:

virtual QString&
ISimulatorFactory::simulationType();
should be:
virtual QString
ISimulatorFactory::simulationType() const;

The way it is now means that you
will be able to get the simulation-type and change it's value outside the
class, because it returns a reference to the string. Making the method const
means, that you won't be able to change internal state of the class using
this method. This would make the returned reference const. It's better to
just return a QString there, because it would break existing code,
otherwise. That's not a performance problem, because of QStrings
implicit-sharing. The string-data will only get copied, when you try to
manipulate the string itself. If you only call const methods of QString,
there won't be any copying.

More methods, that count in here:
virtual
QString &ISimulatorFactorysupportedDocumentMimeTypeName();
virtual QString
&SimulatorFactory::simulationType();
virtual QString
&SimulatorFactory::supportedDocumentMimeTypeName();

I'm not sure about the
ISimulatorFactory::create-method, though. The current implementation doesn't
change the internals, but may be, it will do later.

The IElementFactory
class looks better, concerning constness. I dont't think, you should return
const QString&, but just plain QStrings. This would make it easier to use,
because you don't have to copy things around yourself, if you want to "work"
with the returned data. Same for the const QList.

The private member
variables in GenericElementFactory should have the "m_"-prefix, just to be
consistent.

Okay, that's all for now. I think the next step should be to
try to implement some elements using all this and see, if this interface
works out. If we find some problems, we can still adapt (Yay, we're all
gonna be Borg!) :)

bye then
julian

Attachment: signature.asc
Description: This is a digitally signed message part.

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share 
of $1 Million in cash or HP Products. Visit us here for more details:
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/
_______________________________________________
Ktechlab-devel mailing list
Ktechlab-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ktechlab-devel

Reply via email to