[sword-devel] CreateMod

Troy A. Griffitts scribe at crosswire.org
Sun Mar 8 09:24:14 MST 2009

Dear Manfred,

CreateMod is a factory method in SWMgr for creating SWModule objects.

You shouldn't need to ever call it yourself.  mgr->getModule("KJV") for 
example will give you the correct SWModule object (currently zText) for 
the KJV module.

Likely not what you want.

If you'd like to actually create a new module on disk, then you can call 
the static createModule(...) method on any of the specific drivers.

For example, you could make a new RawCom module on disk along with its 
corresponding .conf file, something like:

// let's create the directory for storing our module

// let's create a brand new empty module

// let's add our .conf file

mbergmanConf["MBergmannCommentary1"]["DataPath"] = 
mbergmanConf["MBergmannCommentary1"]["ModDrv"] = "RawCom";
mbergmanConf["MBergmannCommentary1"]["SourceType"] = "OSIS";
mbergmanConf["MBergmannCommentary1"]["Decription"] = "Manfred Bergmann's 
Concise Commentary on the Bible";
mbergmanConf["MBergmannCommentary1"]["About"] = "...";

Hope this is useful.


Manfred Bergmann wrote:
> Hi.
> I have seen that SWMgr has a method CreateMod().
> What does it do? Can it create all types of modules?
> Regards,
> Manfred
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page

More information about the sword-devel mailing list