Adding more to it ...
Recall .. the code in the attached file is:
//------------
extern DISPATCHER<MODEL_CARD> model_dispatcher;
static MODEL_DIODE p1;
static DISPATCHER<MODEL_CARD>::INSTALL
p_D(&model_dispatcher, "D", &p1);
//---------------
Inside, the code to lookup this model looks something like this:
//---------------
// the name of the model I want is in the string "model_name"
....
const MODEL_CARD* proto = model_dispatcher[model_name];
// that's square brackets, like subscripting an array.
// we have the prototype now, I think
if (proto) {
model = proto.clone();
}else{
error("didn't find the model");
}
// Now "model" is a pointer to a new one we can play with.
_______________________________________________
Gnucap-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnucap-devel