[sword-svn] r2771 - trunk/examples/cmdline

greg.hellings at crosswire.org greg.hellings at crosswire.org
Mon Jan 21 07:56:14 MST 2013


Author: greg.hellings
Date: 2013-01-21 07:56:14 -0700 (Mon, 21 Jan 2013)
New Revision: 2771

Modified:
   trunk/examples/cmdline/lookup.cpp
   trunk/examples/cmdline/outplain.cpp
   trunk/examples/cmdline/outrender.cpp
   trunk/examples/cmdline/search.cpp
   trunk/examples/cmdline/threaded_search.cpp
   trunk/examples/cmdline/verserangeparse.cpp
Log:
Clean up deprecation warnings in examples/cmdline.

Modified: trunk/examples/cmdline/lookup.cpp
===================================================================
--- trunk/examples/cmdline/lookup.cpp	2013-01-21 14:53:46 UTC (rev 2770)
+++ trunk/examples/cmdline/lookup.cpp	2013-01-21 14:56:14 UTC (rev 2771)
@@ -60,7 +60,7 @@
 		fprintf(stderr, "Could not find module [%s].  Available modules:\n", argv[1]);
 		ModMap::iterator it;
 		for (it = manager.Modules.begin(); it != manager.Modules.end(); ++it) {
-			fprintf(stderr, "[%s]\t - %s\n", (*it).second->Name(), (*it).second->Description());
+			fprintf(stderr, "[%s]\t - %s\n", (*it).second->getName(), (*it).second->getDescription());
 		}
 		exit(-1);
 	}
@@ -75,7 +75,7 @@
 
 	if (vk) {
 	//	vk->AutoNormalize(false);
-		vk->Headings(true);
+		vk->setIntros(true);
 		vk->setText(argv[2]);
 	}
 	else {

Modified: trunk/examples/cmdline/outplain.cpp
===================================================================
--- trunk/examples/cmdline/outplain.cpp	2013-01-21 14:53:46 UTC (rev 2770)
+++ trunk/examples/cmdline/outplain.cpp	2013-01-21 14:56:14 UTC (rev 2771)
@@ -53,11 +53,11 @@
 	SWModule *b = manager.getModule(bookName);
 	if (!b) return -1;
 	SWModule &book = *b;
-	book.processEntryAttributes(false);
+	book.setProcessEntryAttributes(false);
 	VerseKey *vk = SWDYNAMIC_CAST(VerseKey, book.getKey());
-	for (book = TOP; !book.Error() && !book.getRawEntryBuf().size(); book++);
+	for (book = TOP; !book.popError() && !book.getRawEntryBuf().size(); book++);
 	if (!book.getRawEntryBuf().size()) return -2; 	// empty module
-	for (;!book.Error(); book++) {
+	for (;!book.popError(); book++) {
 		cout << "$$$";
 		if (vk) cout << vk->getOSISRef();
 		else    cout << book.getKeyText();

Modified: trunk/examples/cmdline/outrender.cpp
===================================================================
--- trunk/examples/cmdline/outrender.cpp	2013-01-21 14:53:46 UTC (rev 2770)
+++ trunk/examples/cmdline/outrender.cpp	2013-01-21 14:56:14 UTC (rev 2771)
@@ -39,11 +39,11 @@
 	SWModule *b = manager.getModule(bookName);
 	if (!b) return -1;
 	SWModule &book = *b;
-	book.processEntryAttributes(false);
+	book.setProcessEntryAttributes(false);
 	VerseKey *vk = SWDYNAMIC_CAST(VerseKey, book.getKey());
-	for (book = TOP; !book.Error() && !book.getRawEntryBuf().size(); book++);
+	for (book = TOP; !book.popError() && !book.getRawEntryBuf().size(); book++);
 	if (!book.getRawEntryBuf().size()) return -2; 	// empty module
-	for (;!book.Error(); book++) {
+	for (;!book.popError(); book++) {
 		cout << "$$$";
 		if (vk) cout << vk->getOSISRef();
 		else    cout << book.getKeyText();

Modified: trunk/examples/cmdline/search.cpp
===================================================================
--- trunk/examples/cmdline/search.cpp	2013-01-21 14:53:46 UTC (rev 2770)
+++ trunk/examples/cmdline/search.cpp	2013-01-21 14:56:14 UTC (rev 2771)
@@ -87,7 +87,7 @@
 	if (it == manager.Modules.end()) {
 		fprintf(stderr, "Could not find module [%s].  Available modules:\n", argv[1]);
 		for (it = manager.Modules.begin(); it != manager.Modules.end(); ++it) {
-			fprintf(stderr, "[%s]\t - %s\n", (*it).second->Name(), (*it).second->Description());
+			fprintf(stderr, "[%s]\t - %s\n", (*it).second->getName(), (*it).second->getDescription());
 		}
 		exit(-1);
 	}
@@ -100,7 +100,7 @@
 		VerseKey kjvParser;
 		if (!parser) parser = &kjvParser;	// use standard KJV parsing as fallback
 		scope = parser->parseVerseList(argv[3], *parser, true);
-		scope.Persist(1);
+		scope.setPersist(1);
 		target->setKey(scope);
 	}
 
@@ -110,7 +110,7 @@
 	std::cerr << std::endl;
 	if (argc > 4) {			// if min / max specified
 		scope = listkey;
-		scope.Persist(1);
+		scope.setPersist(1);
 		target->setKey(scope);
 		printed = 0;
 		std::cerr << " ";
@@ -118,7 +118,7 @@
 		std::cerr << std::endl;
 	}
 	listkey.sort();
-	while (!listkey.Error()) {
+	while (!listkey.popError()) {
 		std::cout << (const char *)listkey << std::endl;
 		listkey++;
 	}

Modified: trunk/examples/cmdline/threaded_search.cpp
===================================================================
--- trunk/examples/cmdline/threaded_search.cpp	2013-01-21 14:53:46 UTC (rev 2770)
+++ trunk/examples/cmdline/threaded_search.cpp	2013-01-21 14:56:14 UTC (rev 2771)
@@ -104,7 +104,7 @@
 	}
 	SWKey* scope = &scopeList;
 
-	searchResult = module->Search(searchedText, -2, REG_ICASE, scope, 0, &percentUpdate);
+	searchResult = module->search(searchedText, -2, REG_ICASE, scope, 0, &percentUpdate);
 
 	if (!scope)
 		std::cout << "bad scope!" << std::endl;
@@ -126,7 +126,7 @@
 	if (it == manager.Modules.end()) {
 		fprintf(stderr, "Could not find module [%s].  Available modules:\n",  argv[1]);
 		for (it = manager.Modules.begin(); it != manager.Modules.end(); ++it) {
-			fprintf(stderr, "[%s]\t - %s\n", (*it).second->Name(), (*it).second->Description());
+			fprintf(stderr, "[%s]\t - %s\n", (*it).second->getName(), (*it).second->getDescription());
 		}
 		exit(-1);
 	}

Modified: trunk/examples/cmdline/verserangeparse.cpp
===================================================================
--- trunk/examples/cmdline/verserangeparse.cpp	2013-01-21 14:53:46 UTC (rev 2770)
+++ trunk/examples/cmdline/verserangeparse.cpp	2013-01-21 14:56:14 UTC (rev 2771)
@@ -47,13 +47,13 @@
 
 	result = parser.parseVerseList(range, parser, true);
 	// let's iterate the key and display
-	for (result = TOP; !result.Error(); result++) {
+	for (result = TOP; !result.popError(); result++) {
 		cout << result << "\n";
 	}
 	cout << endl;
 
 	// Now if we'd like persist this key for use inside of a book...
-	result.Persist(true);
+	result.setPersist(true);
 	
 	// Let's get a book;
 	SWMgr library(new MarkupFilterMgr(FMT_PLAIN));	// render plain without fancy markup
@@ -63,7 +63,7 @@
 	book->setKey(result);
 
 	// now let's iterate the book and display
-	for ((*book) = TOP; !book->Error(); (*book)++) {
+	for ((*book) = TOP; !book->popError(); (*book)++) {
 		cout << "*** " << book->getKeyText() << ": " << book->RenderText() << "\n";
 	}
 




More information about the sword-cvs mailing list