48 :
SWGenBook(iname, idesc, idisp, enc, dir, mark, ilang) {
50 char *buf =
new char [ strlen (ipath) + 20 ];
54 verseKey = !strcmp(
"VerseKey", keyType);
65 sprintf(buf,
"%s.bdt",
path);
148 memcpy(userData, &offset, 4);
149 memcpy(userData+4, &size, 4);
193 char *buf =
new char [ strlen (ipath) + 20 ];
199 if ((path[strlen(path)-1] ==
'/') || (path[strlen(path)-1] ==
'\\'))
200 path[strlen(path)-1] = 0;
202 sprintf(buf,
"%s.bdt", path);
225 return (dsize > 7) && key.
getError() ==
'\x00';
void setFillByte(char ch)
#define SWORD_NAMESPACE_START
virtual bool isWritable() const
long seek(long offset, int whence)
FileDesc * open(const char *path, int mode, bool tryDowngrade)
virtual bool hasEntry(const SWKey *k) const
virtual const char * getUserData(int *size=0) const
static void prepText(SWBuf &buf)
virtual void rawFilter(SWBuf &buf, const SWKey *key) const
static char createModule(const char *ipath)
virtual void setUserData(const char *userData, int size=0)
virtual const char * getUserData(int *size=0) const =0
static signed char create(const char *path)
long write(const void *buf, long count)
SWORD_NAMESPACE_START char * stdstr(char **ipstr, const char *istr, unsigned int memPadFactor=1)
virtual void linkEntry(const SWKey *linkKey)
void close(FileDesc *file)
virtual SWKey * createKey() const
static int removeFile(const char *fName)
const TreeKey & getTreeKey(const SWKey *k=0) const
virtual void setEntry(const char *inbuf, long len=-1)
#define SWDYNAMIC_CAST(className, object)
static unsigned int CREAT
static unsigned int IWRITE
static unsigned int WRONLY
long read(void *buf, long count)
static unsigned int IREAD
virtual SWBuf & getRawEntryBuf() const
#define SWORD_NAMESPACE_END
virtual char getError() const
void setType(const char *imodtype)
virtual void deleteEntry()
RawGenBook(const char *ipath, const char *iname=0, const char *idesc=0, SWDisplay *idisp=0, SWTextEncoding encoding=ENC_UNKNOWN, SWTextDirection dir=DIRECTION_LTR, SWTextMarkup markup=FMT_UNKNOWN, const char *ilang=0, const char *keyType="TreeKey")
void setSize(unsigned long len)
static FileMgr * getSystemFileMgr()