[Ktechlab-devel] clarification about GenericElementFactory

Julian Bäume julian at svg4all.de
Tue Jul 27 08:40:43 UTC 2010


moin Zoltan,
could you provide some more information for the use of
GenericElementFactory? Are the macros you defined supposed to be used from
other plugins as well? Then this code shouldn't be inside a plugin. At least
to me, this looks quite generic. Then the plugins would only be used to
define specific instances of components. This could look like:

// my cool
resistor
implementation
DECLARE_ELEMENT_FACTORY(KTechLab::Element::Resistor);

REGIST
ER_ELEMENT_FACTORY(ElementFactory<KTechLab::Element::Resistor>);

class
KTechLab::Element::Resistor: public IElement {
	//implementation
};

It
would be cool to be able to just provide support for new components like
this. (Okay, one still needs to create visual representation, but this is
easy, too.)

bye then
julian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/ktechlab-devel/attachments/20100727/eb1412ed/attachment.sig>


More information about the Ktechlab-devel mailing list