Menu

#2 self registering objects

open
nobody
5
2004-08-13
2004-08-13
Mark Beks
No

At the moment the code uses a fairly complex mechanism
to parse input files and create the required objects.
This means that introducing new object types requires
making changes in a fairly large number of changes.

For example, introducing a new ThermoType requires
editing SpeciesThermoFactory.cpp, changing
static void getSpeciesThermoTypes( ...) ,

SpeciesThermoFactory::newSpeciesThermo(int type)

SpeciesThermoFactory::newSpeciesThermo(XMLNode*)

etc..

It would be very helpfull if a configurable object
factory were introduced together with the use of the
self registring object technique (eg. as in Jim
Beveridge, Self registering objects in c++ , Dr. Dobb's
Journal, 288, 38 (1998) ) to allow users to add
plugins without the need to touch the rest of the code.

If needed I would be willing to help by implementing
above suggestion

Discussion


Log in to post a comment.