[sword-svn] r1843 - in trunk: . bindings/corba bindings/corba/orbitcpp

scribe at crosswire.org scribe at crosswire.org
Tue Aug 2 02:59:54 MST 2005


Author: scribe
Date: 2005-08-02 02:59:53 -0700 (Tue, 02 Aug 2005)
New Revision: 1843

Modified:
   trunk/bindings/corba/orbitcpp/swordorb-impl.cpp
   trunk/bindings/corba/orbitcpp/swordorb-impl.hpp
   trunk/bindings/corba/swordorb.idl
   trunk/usrinst.sh
Log:
Added a couple new methods to enhance tree traversal


Modified: trunk/bindings/corba/orbitcpp/swordorb-impl.cpp
===================================================================
--- trunk/bindings/corba/orbitcpp/swordorb-impl.cpp	2005-08-01 15:24:18 UTC (rev 1842)
+++ trunk/bindings/corba/orbitcpp/swordorb-impl.cpp	2005-08-02 09:59:53 UTC (rev 1843)
@@ -233,7 +233,32 @@
 	return retVal;
 }
 
+CORBA::Boolean SWModule_impl::hasKeyChildren() throw(CORBA::SystemException) {
+	sword::SWKey *key = delegate->getKey();
+	bool retVal = "";
 
+	TreeKeyIdx *tkey = SWDYNAMIC_CAST(TreeKeyIdx, key);
+	if (tkey) {
+		retVal = tkey->hasChildren();
+	}
+	return retVal;
+}
+
+
+char *SWModule_impl::getKeyParent() throw(CORBA::SystemException) {
+	sword::SWKey *key = delegate->getKey();
+	SWBuf retVal = "";
+
+	TreeKeyIdx *tkey = SWDYNAMIC_CAST(TreeKeyIdx, key);
+	if (tkey) {
+		if (tkey->parent()) {
+			retVal = tkey->getFullName();
+		}
+	}
+	return CORBA::string_dup((const char *)retVal);
+}
+
+
 StringList *SWMgr_impl::getAvailableLocales() throw(CORBA::SystemException) {
 	sword::StringList localeNames = LocaleMgr::getSystemLocaleMgr()->getAvailableLocales();
 	StringList *retVal = new StringList;

Modified: trunk/bindings/corba/orbitcpp/swordorb-impl.hpp
===================================================================
--- trunk/bindings/corba/orbitcpp/swordorb-impl.hpp	2005-08-01 15:24:18 UTC (rev 1842)
+++ trunk/bindings/corba/orbitcpp/swordorb-impl.hpp	2005-08-02 09:59:53 UTC (rev 1843)
@@ -27,6 +27,8 @@
 	void   setKeyText(const char *key) throw(CORBA::SystemException) { delegate->KeyText(key); }
 	char *getKeyText() throw(CORBA::SystemException) { return CORBA::string_dup((char *)delegate->KeyText()); }
 	StringList *getKeyChildren() throw(CORBA::SystemException);
+	char *getKeyParent() throw(CORBA::SystemException);
+	CORBA::Boolean hasKeyChildren() throw(CORBA::SystemException);
 	char *getName() throw(CORBA::SystemException) { return CORBA::string_dup((char *)delegate->Name()); }
 	char *getDescription() throw(CORBA::SystemException) { return CORBA::string_dup((char *)delegate->Description()); }
 	char *getCategory() throw(CORBA::SystemException);

Modified: trunk/bindings/corba/swordorb.idl
===================================================================
--- trunk/bindings/corba/swordorb.idl	2005-08-01 15:24:18 UTC (rev 1842)
+++ trunk/bindings/corba/swordorb.idl	2005-08-02 09:59:53 UTC (rev 1843)
@@ -45,7 +45,9 @@
 	StringList getEntryAttribute(in string level1, in string level2, in string level3);
 	void   setKeyText(in string key);
 	string getKeyText();
+	boolean hasKeyChildren();
 	StringList getKeyChildren();
+	string getKeyParent();
 	string getName();
 	string getDescription();
 	string getCategory();

Modified: trunk/usrinst.sh
===================================================================
--- trunk/usrinst.sh	2005-08-01 15:24:18 UTC (rev 1842)
+++ trunk/usrinst.sh	2005-08-02 09:59:53 UTC (rev 1843)
@@ -4,7 +4,7 @@
 OPTIONS="--without-conf $OPTIONS"
 OPTIONS="--sysconfdir=/etc $OPTIONS"
 OPTIONS="--with-lucene $OPTIONS"
-#OPTIONS="--with-icu $OPTIONS"
+OPTIONS="--with-icu $OPTIONS"
 #OPTIONS="--without-curl $OPTIONS"
 #OPTIONS="--enable-tests $OPTIONS"
 #OPTIONS="--enable-profile $OPTIONS"



More information about the sword-cvs mailing list