[sword-svn] r2629 - in trunk: examples/cmdline include src/modules tests

scribe at crosswire.org scribe at crosswire.org
Tue Jun 28 13:57:54 MST 2011


Author: scribe
Date: 2011-06-28 13:57:54 -0700 (Tue, 28 Jun 2011)
New Revision: 2629

Modified:
   trunk/examples/cmdline/lookup.cpp
   trunk/include/swfilter.h
   trunk/include/swmodule.h
   trunk/src/modules/swmodule.cpp
   trunk/tests/Makefile.am
Log:
removed bibliography test accidently commited in tests/makefile
Added a convenience method for getting the render header


Modified: trunk/examples/cmdline/lookup.cpp
===================================================================
--- trunk/examples/cmdline/lookup.cpp	2011-06-28 20:40:34 UTC (rev 2628)
+++ trunk/examples/cmdline/lookup.cpp	2011-06-28 20:57:54 UTC (rev 2629)
@@ -89,11 +89,8 @@
 	std::cout << target->getRawEntry();
 	std::cout << "\n";
 	std::cout << "==Render=Entry============\n";
-	FilterList::const_iterator first = target->getRenderFilters().begin();
-	if (first != target->getRenderFilters().end()) {
-		std::cout << (*first)->getHeader();
-		std::cout << "\n";
-	}
+	std::cout << target->getRenderHeader();
+	std::cout << "\n";
 	std::cout << target->RenderText();
 	std::cout << "\n";
 	std::cout << "==========================\n";

Modified: trunk/include/swfilter.h
===================================================================
--- trunk/include/swfilter.h	2011-06-28 20:40:34 UTC (rev 2628)
+++ trunk/include/swfilter.h	2011-06-28 20:57:54 UTC (rev 2629)
@@ -54,7 +54,6 @@
 
 	/** This method can supply a header associated with the processing done with this filter.
 	 *	A typical example is a suggested CSS style block for classed containers.
-	 * @param text The text to be filtered/converted
 	 */
 	virtual const char *getHeader() const { return ""; }
 };

Modified: trunk/include/swmodule.h
===================================================================
--- trunk/include/swmodule.h	2011-06-28 20:40:34 UTC (rev 2628)
+++ trunk/include/swmodule.h	2011-06-28 20:57:54 UTC (rev 2629)
@@ -617,6 +617,12 @@
 	 */
 	virtual const char *RenderText(const char *buf = 0, int len = -1, bool render = true);
 
+	/** Produces any header data which might be useful which associated with the
+	 *	processing done with this filter.  A typical example is a suggested
+	 *	CSS style block for classed containers.
+	 */
+	virtual const char *getRenderHeader() const;
+
 	/** Produces plain text, without markup, of the module entry at the supplied key
 	 * @param tmpKey desired module entry
 	 * @return result buffer

Modified: trunk/src/modules/swmodule.cpp
===================================================================
--- trunk/src/modules/swmodule.cpp	2011-06-28 20:40:34 UTC (rev 2628)
+++ trunk/src/modules/swmodule.cpp	2011-06-28 20:57:54 UTC (rev 2629)
@@ -846,6 +846,20 @@
 }
 
 
+/** SWModule::getRenderHeader()	- Produces any header data which might be
+ *	useful which associated with the processing done with this filter.
+ *	A typical example is a suggested CSS style block for classed
+ *	containers.
+ */
+const char *SWModule::getRenderHeader() const {
+	FilterList::const_iterator first = getRenderFilters().begin();
+	if (first != getRenderFilters().end()) {
+		return (*first)->getHeader();
+	}
+	return "";
+}
+
+
 /******************************************************************************
  * SWModule::RenderText 	- calls all renderfilters on current text
  *

Modified: trunk/tests/Makefile.am
===================================================================
--- trunk/tests/Makefile.am	2011-06-28 20:40:34 UTC (rev 2628)
+++ trunk/tests/Makefile.am	2011-06-28 20:57:54 UTC (rev 2629)
@@ -7,7 +7,7 @@
 
 SUBDIRS = cppunit
 
-noinst_PROGRAMS = utf8norm ciphertest keytest mgrtest parsekey versekeytest vtreekeytest versemgrtest listtest casttest bibliography\
+noinst_PROGRAMS = utf8norm ciphertest keytest mgrtest parsekey versekeytest vtreekeytest versemgrtest listtest casttest \
 modtest compnone complzss localetest introtest indextest configtest keycast \
 romantest testblocks filtertest rawldidxtest lextest swaptest \
  swbuftest xmltest webiftest striptest




More information about the sword-cvs mailing list