[sword-svn] r2802 - in trunk/bindings/objc: ObjCSword.xcodeproj src

mdbergmann at crosswire.org mdbergmann at crosswire.org
Sun May 26 06:25:30 MST 2013


Author: mdbergmann
Date: 2013-05-26 06:25:30 -0700 (Sun, 26 May 2013)
New Revision: 2802

Modified:
   trunk/bindings/objc/ObjCSword.xcodeproj/project.pbxproj
   trunk/bindings/objc/src/SwordBible.mm
   trunk/bindings/objc/src/SwordBibleBook.h
   trunk/bindings/objc/src/SwordBibleBook.mm
   trunk/bindings/objc/src/SwordUtil.m
   trunk/bindings/objc/src/SwordVerseManager.h
   trunk/bindings/objc/src/SwordVerseManager.mm
Log:
adaptions and corrections to current sword sources.

Modified: trunk/bindings/objc/ObjCSword.xcodeproj/project.pbxproj
===================================================================
--- trunk/bindings/objc/ObjCSword.xcodeproj/project.pbxproj	2013-05-21 16:57:04 UTC (rev 2801)
+++ trunk/bindings/objc/ObjCSword.xcodeproj/project.pbxproj	2013-05-26 13:25:30 UTC (rev 2802)
@@ -44,6 +44,8 @@
 		8DC2EF530486A6940098B216 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C1666FE841158C02AAC07 /* InfoPlist.strings */; };
 		8DC2EF570486A6940098B216 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */; };
 		A917AF2616B1BE38006367FC /* Tests-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = A917AF2516B1BE38006367FC /* Tests-Info.plist */; };
+		A91C8B67175233F3008702B9 /* versificationmgr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A91C8B66175233F3008702B9 /* versificationmgr.cpp */; };
+		A91C8B6817523609008702B9 /* versificationmgr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A91C8B66175233F3008702B9 /* versificationmgr.cpp */; };
 		A929619C16B1BA240094E5BE /* SwordBibleTextEntry.m in Sources */ = {isa = PBXBuildFile; fileRef = A929619616B1BA240094E5BE /* SwordBibleTextEntry.m */; };
 		A929619D16B1BA240094E5BE /* SwordKey.h in Headers */ = {isa = PBXBuildFile; fileRef = A929619716B1BA240094E5BE /* SwordKey.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		A929619E16B1BA240094E5BE /* SwordKey.mm in Sources */ = {isa = PBXBuildFile; fileRef = A929619816B1BA240094E5BE /* SwordKey.mm */; };
@@ -212,7 +214,6 @@
 		A954AC5013EEA0C10094E3FE /* swlocale.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A954A82713EE98B30094E3FE /* swlocale.cpp */; };
 		A954AC5113EEA0C10094E3FE /* swmgr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A954A82813EE98B30094E3FE /* swmgr.cpp */; };
 		A954AC5213EEA0C10094E3FE /* swsearchable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A954A82913EE98B30094E3FE /* swsearchable.cpp */; };
-		A954AC5313EEA0C10094E3FE /* versemgr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A954A82A13EE98B30094E3FE /* versemgr.cpp */; };
 		A954AC5413EEA0C10094E3FE /* hrefcom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A954A82E13EE98B30094E3FE /* hrefcom.cpp */; };
 		A954AC5513EEA0C10094E3FE /* rawcom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A954A83613EE98B30094E3FE /* rawcom.cpp */; };
 		A954AC5613EEA0C10094E3FE /* rawcom4.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A954A83913EE98B30094E3FE /* rawcom4.cpp */; };
@@ -689,6 +690,7 @@
 		A917AF2516B1BE38006367FC /* Tests-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Tests-Info.plist"; sourceTree = "<group>"; };
 		A918B8E211C6697400024D84 /* SwordModuleTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SwordModuleTest.h; path = ../test/SwordModuleTest.h; sourceTree = "<group>"; };
 		A918B8E311C6697400024D84 /* SwordModuleTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SwordModuleTest.m; path = ../test/SwordModuleTest.m; sourceTree = "<group>"; };
+		A91C8B66175233F3008702B9 /* versificationmgr.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = versificationmgr.cpp; sourceTree = "<group>"; };
 		A929619616B1BA240094E5BE /* SwordBibleTextEntry.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SwordBibleTextEntry.m; path = src/SwordBibleTextEntry.m; sourceTree = "<group>"; };
 		A929619716B1BA240094E5BE /* SwordKey.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SwordKey.h; path = src/SwordKey.h; sourceTree = "<group>"; };
 		A929619816B1BA240094E5BE /* SwordKey.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = SwordKey.mm; path = src/SwordKey.mm; sourceTree = "<group>"; };
@@ -750,7 +752,6 @@
 		A954A82713EE98B30094E3FE /* swlocale.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = swlocale.cpp; sourceTree = "<group>"; };
 		A954A82813EE98B30094E3FE /* swmgr.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = swmgr.cpp; sourceTree = "<group>"; };
 		A954A82913EE98B30094E3FE /* swsearchable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = swsearchable.cpp; sourceTree = "<group>"; };
-		A954A82A13EE98B30094E3FE /* versemgr.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = versemgr.cpp; sourceTree = "<group>"; };
 		A954A82E13EE98B30094E3FE /* hrefcom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = hrefcom.cpp; sourceTree = "<group>"; };
 		A954A83613EE98B30094E3FE /* rawcom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = rawcom.cpp; sourceTree = "<group>"; };
 		A954A83913EE98B30094E3FE /* rawcom4.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = rawcom4.cpp; sourceTree = "<group>"; };
@@ -1586,6 +1587,7 @@
 		A954A81713EE98B30094E3FE /* mgr */ = {
 			isa = PBXGroup;
 			children = (
+				A91C8B66175233F3008702B9 /* versificationmgr.cpp */,
 				A954A81813EE98B30094E3FE /* curlftpt.cpp */,
 				A954A81913EE98B30094E3FE /* curlhttpt.cpp */,
 				A954A81A13EE98B30094E3FE /* encfiltmgr.cpp */,
@@ -1602,7 +1604,6 @@
 				A954A82713EE98B30094E3FE /* swlocale.cpp */,
 				A954A82813EE98B30094E3FE /* swmgr.cpp */,
 				A954A82913EE98B30094E3FE /* swsearchable.cpp */,
-				A954A82A13EE98B30094E3FE /* versemgr.cpp */,
 			);
 			path = mgr;
 			sourceTree = "<group>";
@@ -2854,6 +2855,7 @@
 				A929619C16B1BA240094E5BE /* SwordBibleTextEntry.m in Sources */,
 				A929619E16B1BA240094E5BE /* SwordKey.mm in Sources */,
 				A92961A016B1BA240094E5BE /* SwordListKey.mm in Sources */,
+				A91C8B67175233F3008702B9 /* versificationmgr.cpp in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -2861,6 +2863,7 @@
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				A91C8B6817523609008702B9 /* versificationmgr.cpp in Sources */,
 				A967FB5616806B16004ED73C /* teixhtml.cpp in Sources */,
 				A954ACCA13EEA5340094E3FE /* ftplib.c in Sources */,
 				A954ACCB13EEA5340094E3FE /* ftpparse.c in Sources */,
@@ -2904,7 +2907,6 @@
 				A954AC5013EEA0C10094E3FE /* swlocale.cpp in Sources */,
 				A954AC5113EEA0C10094E3FE /* swmgr.cpp in Sources */,
 				A954AC5213EEA0C10094E3FE /* swsearchable.cpp in Sources */,
-				A954AC5313EEA0C10094E3FE /* versemgr.cpp in Sources */,
 				A954AC5413EEA0C10094E3FE /* hrefcom.cpp in Sources */,
 				A954AC5513EEA0C10094E3FE /* rawcom.cpp in Sources */,
 				A954AC5613EEA0C10094E3FE /* rawcom4.cpp in Sources */,

Modified: trunk/bindings/objc/src/SwordBible.mm
===================================================================
--- trunk/bindings/objc/src/SwordBible.mm	2013-05-21 16:57:04 UTC (rev 2801)
+++ trunk/bindings/objc/src/SwordBible.mm	2013-05-26 13:25:30 UTC (rev 2802)
@@ -133,13 +133,13 @@
 - (void)buildBookList {
 	[moduleLock lock];
     
-    sword::VerseMgr *vmgr = sword::VerseMgr::getSystemVerseMgr();
-    const sword::VerseMgr::System *system = vmgr->getVersificationSystem([[self versification] UTF8String]);
+    sword::VersificationMgr *vmgr = sword::VersificationMgr::getSystemVersificationMgr();
+    const sword::VersificationMgr::System *system = vmgr->getVersificationSystem([[self versification] UTF8String]);
 
     NSMutableDictionary *buf = [NSMutableDictionary dictionary];
     int bookCount = system->getBookCount();
     for(int i = 0;i < bookCount;i++) {
-        sword::VerseMgr::Book *book = (sword::VerseMgr::Book *)system->getBook(i);
+        sword::VersificationMgr::Book *book = (sword::VersificationMgr::Book *)system->getBook(i);
         
         SwordBibleBook *bb = [[[SwordBibleBook alloc] initWithBook:book] autorelease];
         [bb setNumber:i+1];

Modified: trunk/bindings/objc/src/SwordBibleBook.h
===================================================================
--- trunk/bindings/objc/src/SwordBibleBook.h	2013-05-21 16:57:04 UTC (rev 2801)
+++ trunk/bindings/objc/src/SwordBibleBook.h	2013-05-26 13:25:30 UTC (rev 2802)
@@ -9,15 +9,15 @@
 #import <Foundation/Foundation.h>
 
 #ifdef __cplusplus
-#include <versemgr.h>
+#include <versificationmgr.h>
 #include <versekey.h>
 #include <localemgr.h>
-class sword::VerseMgr::Book;
+class sword::VersificationMgr::Book;
 #endif
 
 @interface SwordBibleBook : NSObject {
 #ifdef __cplusplus
-    sword::VerseMgr::Book *swBook;
+    sword::VersificationMgr::Book *swBook;
 #endif
     
     NSString *localizedName;
@@ -34,8 +34,8 @@
 @property (retain, readwrite) NSArray *chapters;
 
 #ifdef __cplusplus
-- (id)initWithBook:(sword::VerseMgr::Book *)aBook;
-- (sword::VerseMgr::Book *)book;
+- (id)initWithBook:(sword::VersificationMgr::Book *)aBook;
+- (sword::VersificationMgr::Book *)book;
 #endif
 
 - (NSString *)name;

Modified: trunk/bindings/objc/src/SwordBibleBook.mm
===================================================================
--- trunk/bindings/objc/src/SwordBibleBook.mm	2013-05-21 16:57:04 UTC (rev 2801)
+++ trunk/bindings/objc/src/SwordBibleBook.mm	2013-05-26 13:25:30 UTC (rev 2802)
@@ -31,7 +31,7 @@
     return self;
 }
 
-- (id)initWithBook:(sword::VerseMgr::Book *)aBook {
+- (id)initWithBook:(sword::VersificationMgr::Book *)aBook {
     self = [self init];
     if(self) {
         swBook = aBook;
@@ -100,7 +100,7 @@
     return number + testament * 100;
 }
 
-- (sword::VerseMgr::Book *)book {
+- (sword::VersificationMgr::Book *)book {
     return swBook;
 }
 

Modified: trunk/bindings/objc/src/SwordUtil.m
===================================================================
--- trunk/bindings/objc/src/SwordUtil.m	2013-05-21 16:57:04 UTC (rev 2801)
+++ trunk/bindings/objc/src/SwordUtil.m	2013-05-26 13:25:30 UTC (rev 2802)
@@ -50,11 +50,11 @@
                 }
             }
 
-            [ret setObject:module forKey:ATTRTYPE_MODULE];
-            [ret setObject:passage forKey:ATTRTYPE_PASSAGE];
-            [ret setObject:value forKey:ATTRTYPE_VALUE];
-            [ret setObject:action forKey:ATTRTYPE_ACTION];
-            [ret setObject:type forKey:ATTRTYPE_TYPE];
+            [ret setObject:[module stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding] forKey:ATTRTYPE_MODULE];
+            [ret setObject:[passage stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding] forKey:ATTRTYPE_PASSAGE];
+            [ret setObject:[value stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding] forKey:ATTRTYPE_VALUE];
+            [ret setObject:[action stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding] forKey:ATTRTYPE_ACTION];
+            [ret setObject:[type stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding] forKey:ATTRTYPE_TYPE];
         }
     }
 

Modified: trunk/bindings/objc/src/SwordVerseManager.h
===================================================================
--- trunk/bindings/objc/src/SwordVerseManager.h	2013-05-21 16:57:04 UTC (rev 2801)
+++ trunk/bindings/objc/src/SwordVerseManager.h	2013-05-26 13:25:30 UTC (rev 2802)
@@ -9,15 +9,15 @@
 #import <Foundation/Foundation.h>
 
 #ifdef __cplusplus
-#include <versemgr.h>
-class sword::VerseMgr::Book;
+#include <versificationmgr.h>
+class sword::VersificationMgr::Book;
 #endif
 
 #define SW_VERSIFICATION_KJV       @"KJV"
 
 @interface SwordVerseManager : NSObject {
 #ifdef __cplusplus
-    sword::VerseMgr *verseMgr;
+    sword::VersificationMgr *verseMgr;
 #endif
     NSMutableDictionary *booksPerVersification;
 }
@@ -30,7 +30,7 @@
 - (NSArray *)booksForVersification:(NSString *)verseScheme;
 
 #ifdef __cplusplus
-- (sword::VerseMgr *)verseMgr;
+- (sword::VersificationMgr *)verseMgr;
 #endif
 
 @end

Modified: trunk/bindings/objc/src/SwordVerseManager.mm
===================================================================
--- trunk/bindings/objc/src/SwordVerseManager.mm	2013-05-21 16:57:04 UTC (rev 2801)
+++ trunk/bindings/objc/src/SwordVerseManager.mm	2013-05-26 13:25:30 UTC (rev 2802)
@@ -33,7 +33,7 @@
     self = [super init];
     if(self) {
         self.booksPerVersification = [NSMutableDictionary dictionary];
-        verseMgr = sword::VerseMgr::getSystemVerseMgr();
+        verseMgr = sword::VersificationMgr::getSystemVersificationMgr();
     }
     
     return self;
@@ -59,11 +59,11 @@
     NSArray *ret = [booksPerVersification objectForKey:verseScheme];
     if(ret == nil) {
         // hasn't been initialized yet
-        const sword::VerseMgr::System *system = verseMgr->getVersificationSystem([verseScheme UTF8String]);
+        const sword::VersificationMgr::System *system = verseMgr->getVersificationSystem([verseScheme UTF8String]);
         NSUInteger bookCount = (NSUInteger)system->getBookCount();
         NSMutableArray *buf = [NSMutableArray arrayWithCapacity:bookCount];
         for(int i = 0;i < bookCount;i++) {
-            sword::VerseMgr::Book *book = (sword::VerseMgr::Book *)system->getBook(i);
+            sword::VersificationMgr::Book *book = (sword::VersificationMgr::Book *)system->getBook(i);
             
             SwordBibleBook *bb = [[[SwordBibleBook alloc] initWithBook:book] autorelease];
             [bb setNumber:i+1]; // VerseKey-Book() starts at index 1
@@ -78,7 +78,7 @@
     return ret;
 }
 
-- (sword::VerseMgr *)verseMgr {
+- (sword::VersificationMgr *)verseMgr {
     return verseMgr;
 }
 




More information about the sword-cvs mailing list