gnucap-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnucap-devel] The new "dispatcher" and plugins


From: al davis
Subject: Re: [Gnucap-devel] The new "dispatcher" and plugins
Date: Mon, 4 Dec 2006 22:47:05 -0500
User-agent: KMail/1.9.5

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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]