Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

iSilo Class Reference

#include </home/clem/local/src/opie/noncore/apps/opie-reader/iSilo.h>

Inheritance diagram for iSilo:

Inheritance graph
[legend]
Collaboration diagram for iSilo:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 iSilo ()
 ~iSilo ()
int getch ()
void getch (tchar &ch, CStyle &sty, unsigned long &pos)
MarkupType PreferredMarkup ()
void sizes (unsigned long &_file, unsigned long &_text)
bool hasrandomaccess ()
int OpenFile (const char *src)
unsigned int locate ()
void locate (unsigned int n)
QString about ()

Private Member Functions

void init_tables (void)
int code2tree (struct s_huffman *h)
u_int32_t swap_bits (u_int32_t n, int num)
u_int32_t * huffman_get (struct s_huffman *h)
int size2code (struct s_huffman *h)
void read_attr ()
s_huffmanhuffman_create (u_int32_t num)
void kill_tree (struct s_tree *tree)
void kill_huffman (struct s_huffman *h)
int read_size (struct s_huffman *prev, struct s_huffman *h)
void mymemcpy (u_int8_t *dst, u_int8_t *src, u_int32_t num)
int read_tree (struct s_huffman *prev, struct s_huffman *curr)
bool reset_trees ()
u_int32_t get_bits (int num)
u_int32_t get_swapped (int num)
int read_text ()
u_int32_t getreccode ()
bool process_record ()

Private Attributes

CStyle mystyle
u_int16_t BlockSize
int pos
u_int32_t buf [256]
s_huffmanmaster
s_huffmanlz
s_huffmantext
u_int32_t cur_rec
u_int8_t buffer [4096]
u_int32_t buffer_size
u_int16_t current_pos
u_int16_t bsize
u_int32_t filepos
u_int32_t filesize
u_int32_t textsize
u_int16_t attr_start
u_int16_t attr_end
u_int16_t attr_num
u_int16_t current_attr
u_int16_t attr_rec
u_int16_t pos_hi
u_int16_t last_pos
u_int16_t last_value
s_attribattr

Constructor & Destructor Documentation

iSilo::iSilo  )  [inline]
 

Definition at line 81 of file iSilo.h.

iSilo::~iSilo  ) 
 

Definition at line 392 of file iSilo.cpp.

References attr, kill_huffman(), lz, master, NULL, and text.


Member Function Documentation

QString iSilo::about  )  [virtual]
 

Implements CExpander_Interface.

Definition at line 631 of file iSilo.cpp.

int iSilo::code2tree struct s_huffman h  )  [private]
 

Definition at line 63 of file iSilo.cpp.

References s_tree::branch, s_huffman::code, i, NULL, s_huffman::size, size, t, s_huffman::tree, and s_tree::value.

Referenced by read_tree(), and reset_trees().

u_int32_t iSilo::get_bits int  num  )  [private]
 

Definition at line 286 of file iSilo.cpp.

References buf, Cpdb::fin, i, pos, qDebug(), and Cpdb::unsuspend().

Referenced by get_swapped(), huffman_get(), process_record(), and reset_trees().

u_int32_t iSilo::get_swapped int  num  )  [private]
 

Definition at line 312 of file iSilo.cpp.

References get_bits(), and swap_bits().

Referenced by read_size(), read_text(), and reset_trees().

void iSilo::getch tchar ch,
CStyle sty,
unsigned long &  pos
[virtual]
 

Reimplemented from CExpander.

Definition at line 496 of file iSilo.cpp.

References filepos, getch(), and mystyle.

int iSilo::getch  )  [virtual]
 

Implements CExpander.

Definition at line 403 of file iSilo.cpp.

References attr, attr_num, attr_rec, bsize, buffer, cur_rec, current_attr, current_pos, filepos, mystyle, NULL, process_record(), qDebug(), read_attr(), CStyle::setBold(), CStyle::setCentreJustify(), CStyle::setFontSize(), CStyle::setItalic(), CStyle::setLeftJustify(), CStyle::setLeftMargin(), CStyle::setMono(), CStyle::setRightJustify(), CStyle::setRightMargin(), CStyle::setUnderline(), textsize, CStyle::unset(), and s_attrib::value.

Referenced by getch(), and locate().

u_int32_t iSilo::getreccode  )  [private]
 

Definition at line 351 of file iSilo.cpp.

References cur_rec, Cpdb::fin, Cpdb::gotorecordnumber(), and qDebug().

Referenced by process_record().

bool iSilo::hasrandomaccess  )  [inline, virtual]
 

Implements CExpander.

Definition at line 96 of file iSilo.h.

struct s_huffman * iSilo::huffman_create u_int32_t  num  )  [private]
 

Definition at line 157 of file iSilo.cpp.

References s_huffman::code, s_huffman::num, s_huffman::size, s_huffman::tree, and s_tree::value.

Referenced by reset_trees().

u_int32_t * iSilo::huffman_get struct s_huffman h  )  [private]
 

Definition at line 101 of file iSilo.cpp.

References s_tree::branch, get_bits(), NULL, t, s_huffman::tree, and s_tree::value.

Referenced by read_size(), and read_text().

void iSilo::init_tables void   )  [private]
 

Definition at line 28 of file iSilo.cpp.

References i, rodata, rpos_delta, rpos_min, rsize_delta, and rsize_min.

Referenced by OpenFile().

void iSilo::kill_huffman struct s_huffman h  )  [private]
 

Definition at line 180 of file iSilo.cpp.

References s_huffman::code, kill_tree(), NULL, s_huffman::size, and s_huffman::tree.

Referenced by reset_trees(), and ~iSilo().

void iSilo::kill_tree struct s_tree tree  )  [private]
 

Definition at line 171 of file iSilo.cpp.

References NULL.

Referenced by kill_huffman().

void iSilo::locate unsigned int  n  )  [virtual]
 

Implements CExpander.

Definition at line 594 of file iSilo.cpp.

References attr, attr_num, attr_rec, attr_start, bsize, buffer_size, cur_rec, current_pos, filepos, getch(), last_pos, last_value, NULL, pos, pos_hi, read_attr(), and textsize.

unsigned int iSilo::locate  )  [inline, virtual]
 

Implements CExpander.

Definition at line 98 of file iSilo.h.

References filepos.

void iSilo::mymemcpy u_int8_t *  dst,
u_int8_t *  src,
u_int32_t  num
[private]
 

Definition at line 233 of file iSilo.cpp.

References i.

Referenced by read_text().

int iSilo::OpenFile const char *  src  )  [virtual]
 

Implements CExpander.

Definition at line 503 of file iSilo.cpp.

References attr, attr_end, attr_rec, attr_start, bsize, buffer, buffer_size, DatabaseHdrType::creator, cur_rec, current_pos, filepos, filesize, Cpdb::fin, Cpdb::gotorecordnumber(), Cpdb::head, init_tables(), last_pos, last_value, NULL, RecordListType::numRecords, Cpdb::openpdbfile(), pos, pos_hi, qDebug(), read_attr(), DatabaseHdrType::recordList, textsize, and DatabaseHdrType::type.

MarkupType iSilo::PreferredMarkup  )  [inline, virtual]
 

Implements CExpander.

Definition at line 87 of file iSilo.h.

References cNONE.

bool iSilo::process_record  )  [private]
 

Definition at line 362 of file iSilo.cpp.

References bsize, cur_rec, get_bits(), getreccode(), read_text(), and reset_trees().

Referenced by getch().

void iSilo::read_attr  )  [private]
 

Definition at line 545 of file iSilo.cpp.

References attr, attr_end, attr_num, attr_rec, attr_start, buffer, current_attr, Cpdb::fin, Cpdb::gotorecordnumber(), last_pos, last_value, NULL, s_attrib::offset, pos_hi, and s_attrib::value.

Referenced by getch(), locate(), and OpenFile().

int iSilo::read_size struct s_huffman prev,
struct s_huffman h
[private]
 

Definition at line 190 of file iSilo.cpp.

References get_swapped(), HM_LONG, HM_MEDIUM, HM_SHORT, huffman_get(), i, NULL, s_huffman::num, and s_huffman::size.

Referenced by read_tree().

int iSilo::read_text  )  [private]
 

Definition at line 315 of file iSilo.cpp.

References buffer, buffer_size, get_swapped(), huffman_get(), l, lz, mymemcpy(), NULL, rpos_delta, rpos_min, rsize_delta, rsize_min, and text.

Referenced by process_record().

int iSilo::read_tree struct s_huffman prev,
struct s_huffman curr
[private]
 

Definition at line 241 of file iSilo.cpp.

References code2tree(), read_size(), and size2code().

Referenced by reset_trees().

bool iSilo::reset_trees  )  [private]
 

Definition at line 250 of file iSilo.cpp.

References code2tree(), get_bits(), get_swapped(), huffman_create(), i, kill_huffman(), lz, master, qDebug(), read_tree(), rodata, s_huffman::size, size2code(), and text.

Referenced by process_record().

int iSilo::size2code struct s_huffman h  )  [private]
 

Definition at line 116 of file iSilo.cpp.

References code, i, l, max, and swap_bits().

Referenced by read_tree(), and reset_trees().

void iSilo::sizes unsigned long &  _file,
unsigned long &  _text
[inline, virtual]
 

Implements Cpdb.

Definition at line 91 of file iSilo.h.

References filesize, and textsize.

u_int32_t iSilo::swap_bits u_int32_t  n,
int  num
[private]
 

Definition at line 90 of file iSilo.cpp.

Referenced by get_swapped(), and size2code().


Member Data Documentation

s_attrib* iSilo::attr [private]
 

Definition at line 59 of file iSilo.h.

Referenced by getch(), locate(), OpenFile(), read_attr(), and ~iSilo().

u_int16_t iSilo::attr_end [private]
 

Definition at line 54 of file iSilo.h.

Referenced by OpenFile(), and read_attr().

u_int16_t iSilo::attr_num [private]
 

Definition at line 54 of file iSilo.h.

Referenced by getch(), locate(), and read_attr().

u_int16_t iSilo::attr_rec [private]
 

Definition at line 54 of file iSilo.h.

Referenced by getch(), locate(), OpenFile(), and read_attr().

u_int16_t iSilo::attr_start [private]
 

Definition at line 54 of file iSilo.h.

Referenced by locate(), OpenFile(), and read_attr().

u_int16_t iSilo::BlockSize [private]
 

Definition at line 45 of file iSilo.h.

u_int16_t iSilo::bsize [private]
 

Definition at line 52 of file iSilo.h.

Referenced by getch(), locate(), OpenFile(), and process_record().

u_int32_t iSilo::buf[256] [private]
 

Definition at line 47 of file iSilo.h.

Referenced by get_bits().

u_int8_t iSilo::buffer[4096] [private]
 

Definition at line 50 of file iSilo.h.

Referenced by getch(), OpenFile(), read_attr(), and read_text().

u_int32_t iSilo::buffer_size [private]
 

Definition at line 51 of file iSilo.h.

Referenced by locate(), OpenFile(), and read_text().

u_int32_t iSilo::cur_rec [private]
 

Definition at line 49 of file iSilo.h.

Referenced by getch(), getreccode(), locate(), OpenFile(), and process_record().

u_int16_t iSilo::current_attr [private]
 

Definition at line 54 of file iSilo.h.

Referenced by getch(), and read_attr().

u_int16_t iSilo::current_pos [private]
 

Definition at line 52 of file iSilo.h.

Referenced by getch(), locate(), and OpenFile().

u_int32_t iSilo::filepos [private]
 

Definition at line 53 of file iSilo.h.

Referenced by getch(), locate(), and OpenFile().

u_int32_t iSilo::filesize [private]
 

Definition at line 53 of file iSilo.h.

Referenced by OpenFile(), and sizes().

u_int16_t iSilo::last_pos [private]
 

Definition at line 56 of file iSilo.h.

Referenced by locate(), OpenFile(), and read_attr().

u_int16_t iSilo::last_value [private]
 

Definition at line 56 of file iSilo.h.

Referenced by locate(), OpenFile(), and read_attr().

struct s_huffman * iSilo::lz [private]
 

Definition at line 48 of file iSilo.h.

Referenced by read_text(), reset_trees(), and ~iSilo().

struct s_huffman* iSilo::master [private]
 

Definition at line 48 of file iSilo.h.

Referenced by reset_trees(), and ~iSilo().

CStyle iSilo::mystyle [private]
 

Definition at line 44 of file iSilo.h.

Referenced by getch().

int iSilo::pos [private]
 

Definition at line 46 of file iSilo.h.

Referenced by get_bits(), locate(), and OpenFile().

u_int16_t iSilo::pos_hi [private]
 

Definition at line 55 of file iSilo.h.

Referenced by locate(), OpenFile(), and read_attr().

struct s_huffman * iSilo::text [private]
 

Definition at line 48 of file iSilo.h.

Referenced by read_text(), reset_trees(), and ~iSilo().

u_int32_t iSilo::textsize [private]
 

Definition at line 53 of file iSilo.h.

Referenced by getch(), locate(), OpenFile(), and sizes().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 17:36:57 2005 for OPIE by  doxygen 1.4.2