#include <swordbible.h>
Public Member Functions | |
delegate void | DumpNotify (String^ verstext) |
SwordBibleModule () | |
SwordBibleModule (String^ modname, char markup, char encoding) | |
String^ | GetVerse (String^ verseref) |
String^ | NextVerse () |
void | DumpBibleModuleContent (String^ modname, char markup, char encoding) |
Events | |
DumpNotify^ | OnDumpNotify |
Definition at line 10 of file swordbible.h.
SwordBibleModule::SwordBibleModule | ( | ) |
Definition at line 22 of file swordbible.cpp.
SwordBibleModule::SwordBibleModule | ( | String^ | modname, | |
char | markup, | |||
char | encoding | |||
) |
Definition at line 24 of file swordbible.cpp.
00024 { 00025 try{ 00026 Fmodulename= (const char*) (Marshal::StringToHGlobalAnsi(modname)).ToPointer(); 00027 Fmodulemarkup=markup; 00028 Fmoduleencoding=encoding; 00029 SWMgr library=(new MarkupFilterMgr(Fmodulemarkup,Fmoduleencoding)); 00030 SWModule *FFSwordBible=library.getModule(Fmodulename); 00031 Fmodulereference=gcnew String(FFSwordBible->getKey()->getShortText()); 00032 00033 }finally{ 00034 // termination code 00035 00036 } 00037 00038 }
void SwordBibleModule::DumpBibleModuleContent | ( | String^ | modname, | |
char | markup, | |||
char | encoding | |||
) |
Definition at line 73 of file swordbible.cpp.
00073 { 00074 00075 try{ 00076 SWMgr library=(new MarkupFilterMgr(markup,encoding)); 00077 const char* modname1 = (const char*) (Marshal::StringToHGlobalAnsi(modname)).ToPointer(); 00078 SWModule *FFSwordBible=library.getModule(modname1); 00079 if (0==String::Compare(gcnew String(FFSwordBible->Type()), "Biblical Texts",false)){ 00080 for ((*FFSwordBible)=TOP; !FFSwordBible->Error(); (*FFSwordBible)++){ 00081 OnDumpNotify(gcnew String(FFSwordBible->getKey()->getShortText())+" "+ (gcnew String(FFSwordBible->RenderText()))->Trim()); 00082 }}else{ 00083 00084 OnDumpNotify(gcnew String("This is not a bible module!")); 00085 } 00086 00087 } 00088 finally{ 00089 // termination code 00090 00091 } 00092 }
delegate void sword2net::SwordBibleModule::DumpNotify | ( | String^ | verstext | ) |
String SwordBibleModule::GetVerse | ( | String^ | verseref | ) |
Definition at line 41 of file swordbible.cpp.
00041 { 00042 00043 try { 00044 SWMgr library=(new MarkupFilterMgr(this->Fmodulemarkup,this->Fmoduleencoding)); 00045 if(0!=String::Compare(verseref,"",false)){ 00046 this->Fmodulereference=verseref; 00047 } 00048 SWKey *KeyToQuery=new SWKey((const char*) (Marshal::StringToHGlobalAnsi(this->Fmodulereference)).ToPointer()); 00049 SWModule *FFSwordBible=library.getModule(Fmodulename); 00050 return gcnew String(KeyToQuery->getShortText())+" "+(gcnew String(FFSwordBible->RenderText(KeyToQuery)))->Trim(); 00051 }finally{ 00052 // termination code 00053 00054 } 00055 00056 }
String SwordBibleModule::NextVerse | ( | ) |
Definition at line 58 of file swordbible.cpp.
00058 { 00059 00060 try{ 00061 SWMgr library=(new MarkupFilterMgr(this->Fmodulemarkup,this->Fmoduleencoding)); 00062 VerseKey *KeyToQuery=new VerseKey((const char*) (Marshal::StringToHGlobalAnsi(this->Fmodulereference)).ToPointer()); 00063 KeyToQuery->increment(1); 00064 this->Fmodulereference=gcnew String(KeyToQuery->getShortText()); 00065 SWModule *FFSwordBible=library.getModule(Fmodulename); 00066 return gcnew String(KeyToQuery->getShortText())+" "+(gcnew String(FFSwordBible->RenderText(KeyToQuery)))->Trim(); 00067 } 00068 finally{ 00069 // termination code 00070 } 00071 }
DumpNotify^ sword2net::SwordBibleModule::OnDumpNotify |
Definition at line 19 of file swordbible.h.