SWORD_NAMESPACE_START Namespace Reference

Classes

class  __init
struct  MyProgressData
class  MyUserData

Typedefs

typedef std::map< unsigned
char, SWBuf
DataMap
typedef std::stack< SWBufTagStack

Functions

int my_fprogress (netbuf *nControl, int xfered, void *arg)
int my_swbufwriter (netbuf *nControl, void *buffer, size_t size, void *swbuf)
static void outText (char t, SWBuf &o, BasicFilterUserData *u)
static void outText (const char *t, SWBuf &o, BasicFilterUserData *u)
void processLemma (bool suspendTextPassThru, XMLTag &tag, SWBuf &buf)
void processMorph (bool suspendTextPassThru, XMLTag &tag, SWBuf &buf)
void removeTrailingSlash (SWBuf &buf)

Variables

static class
SWORD_NAMESPACE_START::__init 
___init
DataMap m
const char * masterRepoList = "masterRepoList.conf"

Typedef Documentation

typedef std::map< unsigned char, SWBuf > SWORD_NAMESPACE_START::DataMap

Definition at line 35 of file url.cpp.

Definition at line 38 of file osishtmlhref.cpp.


Function Documentation

int SWORD_NAMESPACE_START::my_fprogress ( netbuf nControl,
int  xfered,
void *  arg 
)

Definition at line 51 of file ftplibftpt.cpp.

00051                                                           {
00052     if (arg) {
00053         MyProgressData *pd = (MyProgressData *)arg;
00054 SWLog::getSystemLog()->logDebug("FTPLibFTPTransport report progress: totalSize: %ld; xfered: %d\n", pd->totalSize, xfered);
00055         if (pd->sr) {
00056             pd->sr->statusUpdate(pd->totalSize, xfered);
00057         }
00058         if (*(pd->term)) return 0;
00059     }
00060     return 1;
00061 }

int SWORD_NAMESPACE_START::my_swbufwriter ( netbuf nControl,
void *  buffer,
size_t  size,
void *  swbuf 
)

Definition at line 43 of file ftplibftpt.cpp.

00043                                                                              {
00044     SWBuf &output = *(SWBuf *)swbuf;
00045     int s = output.size();
00046     output.size(s+size);
00047     memcpy(output.getRawData()+s, buffer, size);
00048     return size;
00049 }

static void SWORD_NAMESPACE_START::outText ( char  t,
SWBuf o,
BasicFilterUserData u 
) [inline, static]

Definition at line 72 of file osisrtf.cpp.

00072 { if (!u->suspendTextPassThru) o += t; else u->lastSuspendSegment += t; }

static void SWORD_NAMESPACE_START::outText ( const char *  t,
SWBuf o,
BasicFilterUserData u 
) [inline, static]

Definition at line 71 of file osisrtf.cpp.

00071 { if (!u->suspendTextPassThru) o += t; else u->lastSuspendSegment += t; }

void SWORD_NAMESPACE_START::processLemma ( bool  suspendTextPassThru,
XMLTag tag,
SWBuf buf 
)

Definition at line 44 of file osishtmlhref.cpp.

00044                                                                      {
00045     const char *attrib;
00046     const char *val;
00047     if ((attrib = tag.getAttribute("lemma"))) {
00048         int count = tag.getAttributePartCount("lemma", ' ');
00049         int i = (count > 1) ? 0 : -1;       // -1 for whole value cuz it's faster, but does the same thing as 0
00050         do {
00051             attrib = tag.getAttribute("lemma", i, ' ');
00052             if (i < 0) i = 0;   // to handle our -1 condition
00053             val = strchr(attrib, ':');
00054             val = (val) ? (val + 1) : attrib;
00055             SWBuf gh;
00056             if(*val == 'G')
00057                 gh = "Greek";
00058             if(*val == 'H')
00059                 gh = "Hebrew";
00060             const char *val2 = val;
00061             if ((strchr("GH", *val)) && (isdigit(val[1])))
00062                 val2++;
00063             //if ((!strcmp(val2, "3588")) && (lastText.length() < 1))
00064             //  show = false;
00065             //else {
00066                 if (!suspendTextPassThru) {
00067                     buf.appendFormatted("<small><em class=\"strongs\">&lt;<a href=\"passagestudy.jsp?action=showStrongs&type=%s&value=%s\" class=\"strongs\">%s</a>&gt;</em></small>",
00068                             (gh.length()) ? gh.c_str() : "", 
00069                             URL::encode(val2).c_str(),
00070                             val2);
00071                 }
00072             //}
00073             
00074         } while (++i < count);
00075     }
00076 }

void SWORD_NAMESPACE_START::processMorph ( bool  suspendTextPassThru,
XMLTag tag,
SWBuf buf 
)

Definition at line 78 of file osishtmlhref.cpp.

00078                                                                      {
00079     const char * attrib;
00080     const char *val;
00081     if ((attrib = tag.getAttribute("morph"))) { // && (show)) {
00082         SWBuf savelemma = tag.getAttribute("savlm");
00083         //if ((strstr(savelemma.c_str(), "3588")) && (lastText.length() < 1))
00084         //  show = false;
00085         //if (show) {
00086             int count = tag.getAttributePartCount("morph", ' ');
00087             int i = (count > 1) ? 0 : -1;       // -1 for whole value cuz it's faster, but does the same thing as 0
00088             do {
00089                 attrib = tag.getAttribute("morph", i, ' ');
00090                 if (i < 0) i = 0;   // to handle our -1 condition
00091                 val = strchr(attrib, ':');
00092                 val = (val) ? (val + 1) : attrib;
00093                 const char *val2 = val;
00094                 if ((*val == 'T') && (strchr("GH", val[1])) && (isdigit(val[2])))
00095                     val2+=2;
00096                 if (!suspendTextPassThru) {
00097                     buf.appendFormatted("<small><em class=\"morph\">(<a href=\"passagestudy.jsp?action=showMorph&type=%s&value=%s\" class=\"morph\">%s</a>)</em></small>",
00098                             URL::encode(tag.getAttribute("morph")).c_str(),
00099                             URL::encode(val).c_str(), 
00100                             val2);
00101                 }
00102             } while (++i < count);
00103         //}
00104     }
00105 }

void SWORD_NAMESPACE_START::removeTrailingSlash ( SWBuf buf  ) 

Definition at line 58 of file installmgr.cpp.

00058                                      {
00059     int len = buf.size();
00060     if ((buf[len-1] == '/')
00061      || (buf[len-1] == '\\'))
00062         buf.size(len-1);
00063 }


Variable Documentation

Definition at line 36 of file url.cpp.

const char* SWORD_NAMESPACE_START::masterRepoList = "masterRepoList.conf"

Definition at line 65 of file installmgr.cpp.


Generated on 18 Mar 2013 for The SWORD Project by  doxygen 1.6.1