Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

ht_streamfile_modifier Class Reference

#include <mfile.h>

Inheritance diagram for ht_streamfile_modifier:

ht_layer_streamfile ht_streamfile ht_stream List of all members.

Public Member Functions

void init (ht_streamfile *streamfile, int own_streamfile, UINT page_granularity=DEFAULT_MOD_PAGE_SIZE)
virtual void done ()
virtual int extend (UINT newsize)
virtual UINT get_size ()
virtual UINT read (void *buf, UINT size)
virtual int seek (FILEOFS offset)
virtual bool set_access_mode (UINT access_mode)
virtual FILEOFS tell ()
virtual int truncate (UINT newsize)
virtual int vcntl (UINT cmd, va_list vargs)
virtual UINT write (const void *buf, UINT size)

Protected Member Functions

virtual void mod_pages_create ()
virtual void mod_pages_destroy ()
void mod_pages_flush ()
void mod_pages_invd ()
virtual ht_mod_pagemod_page_create (FILEOFS offset)
virtual void mod_page_destroy (FILEOFS offset)
virtual ht_mod_pagemod_page_find (FILEOFS offset)
virtual void mod_page_flush (FILEOFS offset)
void cleardirtybyte (FILEOFS offset)
bool isdirty (FILEOFS offset, UINT range)
bool isdirtybit (FILEOFS offset, UINT bit)
bool isdirtybyte (FILEOFS offset)
bool readbyte (FILEOFS offset, byte *b)
bool writebyte (FILEOFS offset, byte b)

Protected Attributes

ht_treemod_pages
bool modified
FILEOFS offset
UINT size
UINT page_granularity
UINT page_mask
bool active

Member Function Documentation

void ht_streamfile_modifier::cleardirtybyte FILEOFS  offset  )  [protected]
 

Definition at line 127 of file mfile.cc.

References byte, FILEOFS, mod_page_find(), page_granularity, ht_layer_streamfile::read(), ht_layer_streamfile::seek(), and ht_mod_page::write().

Referenced by vcntl().

void ht_streamfile_modifier::done  )  [virtual]
 

Reimplemented from ht_layer_streamfile.

Definition at line 84 of file mfile.cc.

References ht_layer_streamfile::done(), and mod_pages_destroy().

int ht_streamfile_modifier::extend UINT  newsize  )  [virtual]
 

Reimplemented from ht_layer_streamfile.

Definition at line 225 of file mfile.cc.

References active, FILEOFS, mod_page_create(), mod_page_find(), modified, page_granularity, page_mask, size, size, and UINT.

UINT ht_streamfile_modifier::get_size  )  [virtual]
 

Reimplemented from ht_layer_streamfile.

Definition at line 241 of file mfile.cc.

References active, ht_layer_streamfile::get_size(), size, and UINT.

void ht_streamfile_modifier::init ht_streamfile streamfile,
int  own_streamfile,
UINT  page_granularity = DEFAULT_MOD_PAGE_SIZE
 

Definition at line 70 of file mfile.cc.

References active, FAM_WRITE, ht_layer_streamfile::get_access_mode(), ht_stream::init(), mod_pages_create(), modified, offset, page_granularity, page_mask, and UINT.

Referenced by ht_app::create_window_file_bin(), and ht_app::handlemsg().

bool ht_streamfile_modifier::isdirty FILEOFS  offset,
UINT  range
[protected]
 

Definition at line 91 of file mfile.cc.

References FILEOFS, IS_DIRTY_SINGLEBIT, isdirtybit(), isdirtybyte(), and UINT.

Referenced by vcntl().

bool ht_streamfile_modifier::isdirtybit FILEOFS  offset,
UINT  bit
[protected]
 

Definition at line 101 of file mfile.cc.

References byte, FILEOFS, mod_page_find(), page_granularity, ht_mod_page::read(), ht_layer_streamfile::read(), ht_layer_streamfile::seek(), and UINT.

Referenced by isdirty().

bool ht_streamfile_modifier::isdirtybyte FILEOFS  offset  )  [protected]
 

Definition at line 114 of file mfile.cc.

References byte, FILEOFS, mod_page_find(), page_granularity, ht_mod_page::read(), ht_layer_streamfile::read(), and ht_layer_streamfile::seek().

Referenced by isdirty().

ht_mod_page * ht_streamfile_modifier::mod_page_create FILEOFS  offset  )  [protected, virtual]
 

Definition at line 184 of file mfile.cc.

References ht_mod_page::data, FILEOFS, ht_layer_streamfile::get_size(), ht_tree::insert(), mod_pages, NULL, page_granularity, page_mask, ht_layer_streamfile::read(), ht_layer_streamfile::seek(), size, and UINT.

Referenced by extend(), write(), and writebyte().

void ht_streamfile_modifier::mod_page_destroy FILEOFS  offset  )  [protected, virtual]
 

Definition at line 204 of file mfile.cc.

References ht_tree::del(), FILEOFS, and mod_pages.

Referenced by truncate().

ht_mod_page * ht_streamfile_modifier::mod_page_find FILEOFS  offset  )  [protected, virtual]
 

Definition at line 210 of file mfile.cc.

References FILEOFS, ht_tree::get(), mod_pages, and page_mask.

Referenced by cleardirtybyte(), extend(), isdirtybit(), isdirtybyte(), mod_page_flush(), read(), readbyte(), write(), and writebyte().

void ht_streamfile_modifier::mod_page_flush FILEOFS  offset  )  [protected, virtual]
 

Definition at line 216 of file mfile.cc.

References ht_mod_page::data, FILEOFS, mod_page_find(), ht_layer_streamfile::seek(), size, ht_mod_page::size, UINT, and ht_layer_streamfile::write().

Referenced by mod_pages_flush().

void ht_streamfile_modifier::mod_pages_create  )  [protected, virtual]
 

Definition at line 139 of file mfile.cc.

References compare_keys_file_delinear(), ht_layer_streamfile::get_size(), ht_stree::init(), ht_dtree::init(), mod_pages, and size.

Referenced by init(), and mod_pages_invd().

void ht_streamfile_modifier::mod_pages_destroy  )  [protected, virtual]
 

Definition at line 152 of file mfile.cc.

References ht_tree::destroy(), mod_pages, and modified.

Referenced by done(), and mod_pages_invd().

void ht_streamfile_modifier::mod_pages_flush  )  [protected]
 

Definition at line 159 of file mfile.cc.

References ht_tree::enum_next(), ht_layer_streamfile::extend(), ht_layer_streamfile::get_size(), mod_page_flush(), mod_pages, modified, NULL, size, ht_layer_streamfile::truncate(), UINT, ht_data_uint::value, and value.

Referenced by vcntl().

void ht_streamfile_modifier::mod_pages_invd  )  [protected]
 

Definition at line 178 of file mfile.cc.

References mod_pages_create(), and mod_pages_destroy().

Referenced by set_access_mode(), and vcntl().

UINT ht_streamfile_modifier::read void *  buf,
UINT  size
[virtual]
 

Reimplemented from ht_layer_streamfile.

Definition at line 247 of file mfile.cc.

References active, buf, byte, FILEOFS, mod_page_find(), offset, page_granularity, page_mask, ht_mod_page::read(), ht_layer_streamfile::read(), readbyte(), ht_layer_streamfile::seek(), ht_layer_streamfile::set_error(), size, tell(), and UINT.

bool ht_streamfile_modifier::readbyte FILEOFS  offset,
byte *  b
[protected]
 

Definition at line 300 of file mfile.cc.

References FILEOFS, mod_page_find(), page_granularity, ht_layer_streamfile::read(), ht_mod_page::read(), and ht_layer_streamfile::seek().

Referenced by read().

int ht_streamfile_modifier::seek FILEOFS  offset  )  [virtual]
 

Reimplemented from ht_layer_streamfile.

Definition at line 310 of file mfile.cc.

References active, FILEOFS, offset, ht_layer_streamfile::seek(), and size.

bool ht_streamfile_modifier::set_access_mode UINT  access_mode  )  [virtual]
 

Reimplemented from ht_layer_streamfile.

Definition at line 318 of file mfile.cc.

References active, FAM_WRITE, ht_layer_streamfile::get_access_mode(), mod_pages_invd(), ht_layer_streamfile::set_access_mode(), and UINT.

FILEOFS ht_streamfile_modifier::tell  )  [virtual]
 

Reimplemented from ht_layer_streamfile.

Definition at line 330 of file mfile.cc.

References active, FILEOFS, offset, and ht_layer_streamfile::tell().

Referenced by read(), and write().

int ht_streamfile_modifier::truncate UINT  newsize  )  [virtual]
 

Reimplemented from ht_layer_streamfile.

Definition at line 336 of file mfile.cc.

References active, FILEOFS, mod_page_destroy(), modified, page_granularity, page_mask, size, size, and UINT.

int ht_streamfile_modifier::vcntl UINT  cmd,
va_list  vargs
[virtual]
 

Reimplemented from ht_layer_streamfile.

Definition at line 350 of file mfile.cc.

References active, cleardirtybyte(), FCNTL_MODS_CLEAR_DIRTY_RANGE, FCNTL_MODS_FLUSH, FCNTL_MODS_INVD, FCNTL_MODS_IS_DIRTY, FILEOFS, isdirty(), mod_pages_flush(), mod_pages_invd(), modified, size, UINT, and ht_layer_streamfile::vcntl().

UINT ht_streamfile_modifier::write const void *  buf,
UINT  size
[virtual]
 

Reimplemented from ht_layer_streamfile.

Definition at line 384 of file mfile.cc.

References active, buf, byte, FILEOFS, mod_page_create(), mod_page_find(), modified, offset, page_granularity, page_mask, ht_layer_streamfile::set_error(), size, tell(), UINT, ht_mod_page::write(), ht_layer_streamfile::write(), and writebyte().

bool ht_streamfile_modifier::writebyte FILEOFS  offset,
byte  b
[protected]
 

Definition at line 434 of file mfile.cc.

References byte, FILEOFS, mod_page_create(), mod_page_find(), modified, page_granularity, ht_mod_page::read(), and ht_mod_page::write().

Referenced by write().


Member Data Documentation

bool ht_streamfile_modifier::active [protected]
 

Definition at line 63 of file mfile.h.

Referenced by extend(), get_size(), init(), read(), seek(), set_access_mode(), tell(), truncate(), vcntl(), and write().

ht_tree* ht_streamfile_modifier::mod_pages [protected]
 

Definition at line 53 of file mfile.h.

Referenced by mod_page_create(), mod_page_destroy(), mod_page_find(), mod_pages_create(), mod_pages_destroy(), and mod_pages_flush().

bool ht_streamfile_modifier::modified [protected]
 

Definition at line 55 of file mfile.h.

Referenced by extend(), init(), mod_pages_destroy(), mod_pages_flush(), truncate(), vcntl(), write(), and writebyte().

FILEOFS ht_streamfile_modifier::offset [protected]
 

Definition at line 57 of file mfile.h.

Referenced by init(), read(), seek(), tell(), and write().

UINT ht_streamfile_modifier::page_granularity [protected]
 

Definition at line 60 of file mfile.h.

Referenced by cleardirtybyte(), extend(), init(), isdirtybit(), isdirtybyte(), mod_page_create(), read(), readbyte(), truncate(), write(), and writebyte().

UINT ht_streamfile_modifier::page_mask [protected]
 

Definition at line 61 of file mfile.h.

Referenced by extend(), init(), mod_page_create(), mod_page_find(), read(), truncate(), and write().

UINT ht_streamfile_modifier::size [protected]
 

Definition at line 58 of file mfile.h.

Referenced by extend(), get_size(), mod_page_create(), mod_page_flush(), mod_pages_create(), mod_pages_flush(), read(), seek(), truncate(), vcntl(), and write().


The documentation for this class was generated from the following files:
Generated on Fri May 7 21:16:03 2004 by doxygen 1.3.5