aboutsummaryrefslogtreecommitdiffstats
path: root/tests/modtest.cpp
blob: 37daabf4ba9c95e9fe2b05706fcdefd3065ca62d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <swmgr.h>
#include <swtext.h>
#include <iostream>
#ifndef NO_SWORD_NAMESPACE
using namespace sword;
#endif

int main(int argc, char **argv) {
	SWMgr mymgr;
	ModMap::iterator it;
	SWModule *module;

	for (it = mymgr.Modules.begin(); it != mymgr.Modules.end(); it++) {
		module = it->second;
		if (!strcmp(module->Type(), "Biblical Texts")) {
			std::cout << module->Name() << "\n";
			for (*module = TOP; (!module->Key().Error()); ((VerseKey *)&module->Key())->Book(((VerseKey *)&module->Key())->Book()+1)) {
				std::cout << module->KeyText() << "\n";
			}
		}
			
		if (!strcmp(module->Type(), "Commentaries")) {
			std::cout << module->Name() << "\n";
			for (*module = TOP; (!module->Error()); (*module)--) {
				std::cout << module->KeyText() << "\n";
			}
				
		}
	}
	return 0;
}