[sword-svn] r1971 - in trunk: . examples include src/modules/filters

scribe at www.crosswire.org scribe at www.crosswire.org
Mon Sep 4 18:59:53 MST 2006


Author: scribe
Date: 2006-09-04 18:59:48 -0700 (Mon, 04 Sep 2006)
New Revision: 1971

Added:
   trunk/examples/simple.cpp
Modified:
   trunk/INSTALL
   trunk/include/swmgr.h
   trunk/src/modules/filters/osismorphsegmentation.cpp
Log:
Updated name and tip for morpheme filter to better confirm to other filters
Updated some docs.
Added a very simple code example.


Modified: trunk/INSTALL
===================================================================
--- trunk/INSTALL	2006-09-04 19:45:57 UTC (rev 1970)
+++ trunk/INSTALL	2006-09-05 01:59:48 UTC (rev 1971)
@@ -64,6 +64,10 @@
 After modules are installed, you can create fast search indecies (if you have
 compiled with clucene support), with utilities/mkfastmod
 
+NOTE: sometimes clucene forgets to install some header files.  You might need to
+manually copy clucene-core-X/src/CLucene/clucene-config.h to your install prefix
+(e.g. /usr/local/include/CLucene/)
+
 If you want module configuration/installation details, read on...
 
 

Added: trunk/examples/simple.cpp
===================================================================
--- trunk/examples/simple.cpp	2006-09-04 19:45:57 UTC (rev 1970)
+++ trunk/examples/simple.cpp	2006-09-05 01:59:48 UTC (rev 1971)
@@ -0,0 +1,33 @@
+/******************************************************************************
+ * This is about the simplest useful example of using the sword engine.
+ *
+ * After sword is installed, it should compile with something similar to:
+ *
+ *	g++ -o simple simple.cpp `pkg-config --cflags --libs sword`
+ *
+ * If you'd like to choose the type of tag markup which sword will output
+ *	for you, include:
+ *
+ *	#include <markupfiltmgr.h>
+ *
+ * and change your instantiation of SWMgr, below, to (e.g., for HTML):
+ *
+ *	SWMgr library(0, 0, true, new MarkupFilterMgr(FMT_HTMLHREF));
+ *
+ */
+
+#include <swmgr.h>
+#include <swmodule.h>
+#include <iostream>
+
+using namespace sword;
+using std::cout;
+
+int main(int argc, char **argv) {
+	SWMgr library;
+	SWModule *darby = library.getModule("Darby");
+	darby->setKey("James 1:19");
+	cout << darby->RenderText();
+
+	return 0;
+}

Modified: trunk/include/swmgr.h
===================================================================
--- trunk/include/swmgr.h	2006-09-04 19:45:57 UTC (rev 1970)
+++ trunk/include/swmgr.h	2006-09-05 01:59:48 UTC (rev 1971)
@@ -224,7 +224,7 @@
 	 *	For example, this will create an SWMgr and cause its modules to produce HTMLHREF formatted output
 	 *	when asked for renderable text:
 	 *
-	 *	SWMgr *myMgr = new SWMgr(0, 0, false, new MarkupFilterMgr(FMT_HTMLHREF));
+	 *	SWMgr *myMgr = new SWMgr(0, 0, true, new MarkupFilterMgr(FMT_HTMLHREF));
 	 */
 	SWMgr(SWConfig *iconfig = 0, SWConfig *isysconfig = 0, bool autoload = true, SWFilterMgr *filterMgr = 0, bool multiMod = false);
 

Modified: trunk/src/modules/filters/osismorphsegmentation.cpp
===================================================================
--- trunk/src/modules/filters/osismorphsegmentation.cpp	2006-09-04 19:45:57 UTC (rev 1970)
+++ trunk/src/modules/filters/osismorphsegmentation.cpp	2006-09-05 01:59:48 UTC (rev 1971)
@@ -11,8 +11,8 @@
 
 SWORD_NAMESPACE_START
 
-const char oName[] = "Morpheme segmentation";
-const char oTip[] = "Toggles morpheme segmentation, when present";
+const char oName[] = "Morpheme Segmentation";
+const char oTip[] = "Toggles Morpheme Segmentation On and Off, when present";
 
 const SWBuf choices[3] = {"Off", "On", ""};
 const StringList oValues(&choices[0], &choices[2]);




More information about the sword-cvs mailing list