[bt-devel] proposal
Troy A. Griffitts
bt-devel@crosswire.org
Sun, 20 May 2001 19:54:42 -0700
> I implemented the copy constructors but I was unable to get a copy of the
> module.
> Imagine this:
> Sword creates objects like this: "SWModule* module = new RawText(...)". The
> problem is, that I don't know how to copy the SWModule to have the
> propertioes of the right implementation-class (SWModule* copy = new
> SWModule(*module) will not work, because RawText has to be copied.) .
> That's why I have not implemented it.
SWModule *module = otherModule.clone() // should be the call but not
impl yet
But this is unecessary.
Just:
void mySearchFunction(SWModule *module, string text) {
static SWMgr searchModules;
searchModules.Modules[module->Name()]->Search(text);
}
Hope this helps.
-Troy.