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

scribe at crosswire.org scribe at crosswire.org
Tue Apr 15 13:27:07 MST 2014


Author: scribe
Date: 2014-04-15 13:27:07 -0700 (Tue, 15 Apr 2014)
New Revision: 3154

Modified:
   trunk/examples/cmdline/lookup.cpp
Log:
added special processing for preverse material, because this material is
usually sent through renderText and it's nice to see what it will
produce

Modified: trunk/examples/cmdline/lookup.cpp
===================================================================
--- trunk/examples/cmdline/lookup.cpp	2014-04-14 16:22:11 UTC (rev 3153)
+++ trunk/examples/cmdline/lookup.cpp	2014-04-15 20:27:07 UTC (rev 3154)
@@ -103,12 +103,19 @@
 	AttributeTypeList::iterator i1;
 	AttributeList::iterator i2;
 	AttributeValue::iterator i3;
+	bool heading = false;
+	bool preverse = false;
 	for (i1 = target->getEntryAttributes().begin(); i1 != target->getEntryAttributes().end(); ++i1) {
 		std::cout << "[ " << i1->first << " ]\n";
+		heading = (i1->first == "Heading");
 		for (i2 = i1->second.begin(); i2 != i1->second.end(); ++i2) {
 			std::cout << "\t[ " << i2->first << " ]\n";
+			preverse = (heading && i2->first == "Preverse");
 			for (i3 = i2->second.begin(); i3 != i2->second.end(); ++i3) {
 				std::cout << "\t\t" << i3->first << " = " << i3->second << "\n";
+				if (preverse) {
+					std::cout << "\t\tmodule->renderText(heading[" << i3->first << "]) = " << target->renderText(i3->second) << "\n";
+				}
 			}
 		}
 	}




More information about the sword-cvs mailing list