24 #pragma warning( disable: 4251 )
34 #ifndef NO_SWORD_NAMESPACE
36 using sword::SWModule;
38 using sword::VerseKey;
44 static char printed = 0;
45 char maxHashes = *((
char *)userData);
47 while ((((
float)percent)/100) * maxHashes > printed) {
59 int main(
int argc,
char **argv)
62 fprintf(stderr,
"usage: %s <modname>\n", argv[0]);
71 it = manager.
Modules.find(argv[1]);
72 if (it == manager.
Modules.end()) {
73 fprintf(stderr,
"Could not find module [%s]. Available modules:\n", argv[1]);
74 for (it = manager.
Modules.begin(); it != manager.
Modules.end(); it++) {
75 fprintf(stderr,
"[%s]\t - %s\n", (*it).second->getName(), (*it).second->getDescription());
82 fprintf(stderr,
"%s: error: %s does not support a search framework.\n", *argv, it->second->getName());
86 printf(
"Deleting any existing framework...\n");
88 printf(
"Building framework, please wait...\n");
90 printf(
"[0=================================50==============================100]\n ");
93 fprintf(stderr,
"%s: couldn't create search framework (permissions?)\n", *argv);
virtual bool hasSearchFramework()
virtual signed char createSearchFramework(void(*percent)(char, void *)=&nullPercent, void *percentUserData=0)
virtual void deleteSearchFramework()
std::map< SWBuf, SWModule *, std::less< SWBuf > > ModMap
void percentUpdate(char percent, void *userData)