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

ht_format_viewer Class Reference

#include <htformat.h>

Inheritance diagram for ht_format_viewer:

ht_viewer ht_view Object ht_format_group ht_uformat_viewer cview ht_coff ht_elf ht_flt ht_le ht_macho ht_mz ht_ne ht_pe ht_pef ht_xbe ht_aviewer ht_clipboard_viewer ht_disasm_viewer ht_hex_viewer ht_ne_entrypoint_viewer ht_pe_header_viewer ht_pe_il_viewer ht_text_viewer2 ht_xbe_header_viewer List of all members.

Public Member Functions

void init (bounds *b, const char *desc, UINT caps, ht_streamfile *file, ht_format_group *format_group)
virtual void done ()
virtual void handlemsg (htmsg *msg)
virtual bool pos_to_offset (viewer_pos pos, FILEOFS *ofs)
virtual bool offset_to_pos (FILEOFS ofs, viewer_pos *pos)
virtual void get_pindicator_str (char *buf)
virtual bool get_hscrollbar_pos (int *pstart, int *psize)
virtual bool get_vscrollbar_pos (int *pstart, int *psize)
virtual void loc_enum_start ()
virtual bool loc_enum_next (ht_format_loc *loc)
virtual bool get_current_offset (FILEOFS *ofs)
virtual bool goto_offset (FILEOFS ofs, bool save_vstate)
virtual UINT pread (FILEOFS ofs, void *buf, UINT size)
virtual ht_search_resultpsearch (ht_search_request *search, FILEOFS start, FILEOFS end)
virtual void pselect_add (FILEOFS start, FILEOFS end)
virtual void pselect_get (FILEOFS *start, FILEOFS *end)
virtual void pselect_set (FILEOFS start, FILEOFS end)
virtual UINT pwrite (FILEOFS ofs, void *buf, UINT size)
virtual bool string_to_offset (char *string, FILEOFS *ofs)
virtual bool qword_to_offset (qword q, FILEOFS *ofs)
virtual bool get_current_real_offset (FILEOFS *ofs)
virtual bool get_current_pos (viewer_pos *pos)
virtual bool goto_pos (viewer_pos pos, bool save_vstate)
virtual UINT vread (viewer_pos pos, void *buf, UINT size)
virtual ht_search_resultvsearch (ht_search_request *search, viewer_pos start, viewer_pos end)
virtual void vselect_add (viewer_pos start, viewer_pos end)
virtual void vselect_get (viewer_pos *start, viewer_pos *end)
virtual void vselect_set (viewer_pos start, viewer_pos end)
virtual UINT vwrite (viewer_pos pos, void *buf, UINT size)
virtual bool string_to_pos (char *string, viewer_pos *pos)
virtual bool qword_to_pos (qword q, viewer_pos *pos)
virtual int func_handler (eval_scalar *result, char *name, eval_scalarlist *params)
virtual int symbol_handler (eval_scalar *result, char *name)
bool continue_search ()
virtual bool show_search_result (ht_search_result *result)
void clear_viewer_pos (viewer_pos *p)
ht_streamfileget_file ()
bool string_to_qword (char *string, qword *q)
bool vstate_save ()

Public Attributes

ht_format_groupformat_group

Protected Member Functions

virtual bool compeq_viewer_pos (viewer_pos *a, viewer_pos *b)
virtual void vstate_restore (Object *view_state)
virtual Objectvstate_create ()
virtual bool next_logical_pos (viewer_pos pos, viewer_pos *npos)
virtual bool next_logical_offset (FILEOFS ofs, FILEOFS *nofs)

Protected Attributes

ht_streamfilefile
ht_search_requestlast_search_request
bool last_search_physical

Member Function Documentation

void ht_format_viewer::clear_viewer_pos viewer_pos p  ) 
 

Reimplemented in ht_uformat_viewer.

Definition at line 483 of file htformat.cc.

bool ht_format_viewer::compeq_viewer_pos viewer_pos a,
viewer_pos b
[protected, virtual]
 

Reimplemented in ht_uformat_viewer.

Definition at line 487 of file htformat.cc.

bool ht_format_viewer::continue_search  ) 
 

Definition at line 492 of file htformat.cc.

References errorbox, FILEOFS, get_current_offset(), get_current_pos(), last_search_end_ofs, last_search_end_pos, last_search_physical, last_search_request, next_logical_offset(), next_logical_pos(), NULL, psearch(), SC_PHYSICAL, SC_VISUAL, ht_search_request::search_class, show_search_result(), and vsearch().

Referenced by ht_uformat_viewer::handlemsg().

void ht_format_viewer::done  )  [virtual]
 

Reimplemented from ht_viewer.

Reimplemented in cview, ht_aviewer, ht_coff, ht_disasm_viewer, ht_elf, ht_flt, ht_format_group, ht_uformat_viewer, ht_le, ht_macho, ht_mz, ht_ne, ht_pe, ht_pef, ht_pe_il_viewer, and ht_xbe.

Definition at line 471 of file htformat.cc.

References ht_view::done(), and last_search_request.

Referenced by ht_uformat_viewer::done(), and ht_format_group::done().

int ht_format_viewer::func_handler eval_scalar result,
char *  name,
eval_scalarlist params
[virtual]
 

Reimplemented in ht_aviewer, ht_pef_aviewer, ht_pe_aviewer, and ht_xbe_aviewer.

Definition at line 529 of file htformat.cc.

Referenced by ht_aviewer::func_handler().

bool ht_format_viewer::get_current_offset FILEOFS ofs  )  [virtual]
 

Reimplemented in ht_aviewer, and ht_uformat_viewer.

Definition at line 539 of file htformat.cc.

References FILEOFS.

Referenced by continue_search(), get_current_real_offset(), and replace_dialog().

bool ht_format_viewer::get_current_pos viewer_pos pos  )  [virtual]
 

Reimplemented in ht_uformat_viewer.

Definition at line 544 of file htformat.cc.

Referenced by continue_search().

bool ht_format_viewer::get_current_real_offset FILEOFS ofs  )  [virtual]
 

Reimplemented in ht_le_aviewer.

Definition at line 549 of file htformat.cc.

References FILEOFS, and get_current_offset().

Referenced by ht_uformat_viewer::func(), and ht_aviewer::handlemsg().

ht_streamfile * ht_format_viewer::get_file  ) 
 

Definition at line 554 of file htformat.cc.

References file.

Referenced by blockop_dialog(), dialog_assemble(), ht_uformat_viewer::handlemsg(), and replace_dialog().

bool ht_format_viewer::get_hscrollbar_pos int *  pstart,
int *  psize
[virtual]
 

Reimplemented in ht_aviewer, and ht_format_group.

Definition at line 564 of file htformat.cc.

Referenced by ht_uformat_viewer::handlemsg(), and ht_disasm_viewer::handlemsg().

void ht_format_viewer::get_pindicator_str char *  buf  )  [virtual]
 

Reimplemented in ht_aviewer, ht_clipboard_viewer, ht_disasm_viewer, ht_format_group, and ht_hex_viewer.

Definition at line 559 of file htformat.cc.

References buf.

Referenced by ht_uformat_viewer::handlemsg().

bool ht_format_viewer::get_vscrollbar_pos int *  pstart,
int *  psize
[virtual]
 

Reimplemented in ht_disasm_viewer, ht_format_group, and ht_hex_viewer.

Definition at line 569 of file htformat.cc.

Referenced by ht_uformat_viewer::handlemsg().

bool ht_format_viewer::goto_offset FILEOFS  ofs,
bool  save_vstate
[virtual]
 

Reimplemented in ht_uformat_viewer.

Definition at line 574 of file htformat.cc.

References FILEOFS.

Referenced by handlemsg(), ht_pe_header_viewer::ref_sel(), ht_pe_resource_viewer::select_node(), and show_search_result().

bool ht_format_viewer::goto_pos viewer_pos  pos,
bool  save_vstate
[virtual]
 

Reimplemented in ht_uformat_viewer.

Definition at line 579 of file htformat.cc.

Referenced by show_search_result().

void ht_format_viewer::handlemsg htmsg *  msg  )  [virtual]
 

Reimplemented from ht_viewer.

Reimplemented in ht_aviewer, ht_clipboard_viewer, ht_disasm_viewer, ht_format_group, ht_uformat_viewer, ht_hex_viewer, and ht_text_viewer2.

Definition at line 584 of file htformat.cc.

References button_yes, clearmsg(), cmd_edit_mode, cmd_edit_mode_i, cmd_file_truncate, cmd_view_mode, cmd_view_mode_i, ht_streamfile::cntl(), confirmbox, errorbox, FAM_READ, FAM_WRITE, FCNTL_MODS_INVD, file, FILEOFS, ht_stream::get_error(), ht_streamfile::get_filename(), ht_streamfile::get_size(), goto_offset(), ht_viewer::handlemsg(), ht_format_loc::length, loc_enum_next(), loc_enum_start(), msg_filesize_changed, msg_goto_offset, msg_vstate_restore, mt_broadcast, ht_format_loc::name, ht_view::sendmsg(), ht_stream::set_access_mode(), size, ht_format_loc::start, UINT, and vstate_restore().

Referenced by ht_uformat_viewer::handlemsg(), and ht_format_group::handlemsg().

void ht_format_viewer::init bounds *  b,
const char *  desc,
UINT  caps,
ht_streamfile file,
ht_format_group format_group
 

Definition at line 457 of file htformat.cc.

References file, format_group, Object::init(), last_search_request, NULL, UINT, VIEW_DEBUG_NAME, and VO_FORMAT_VIEW.

bool ht_format_viewer::loc_enum_next ht_format_loc loc  )  [virtual]
 

Reimplemented in ht_elf, ht_le, ht_mz, ht_ne, ht_pe, and ht_xbe.

Definition at line 656 of file htformat.cc.

Referenced by handlemsg().

void ht_format_viewer::loc_enum_start  )  [virtual]
 

Reimplemented in ht_elf, ht_le, ht_mz, ht_ne, ht_pe, and ht_xbe.

Definition at line 652 of file htformat.cc.

Referenced by handlemsg().

bool ht_format_viewer::next_logical_offset FILEOFS  ofs,
FILEOFS nofs
[protected, virtual]
 

Reimplemented in ht_uformat_viewer.

Definition at line 666 of file htformat.cc.

References FILEOFS.

Referenced by continue_search().

bool ht_format_viewer::next_logical_pos viewer_pos  pos,
viewer_pos npos
[protected, virtual]
 

Reimplemented in ht_uformat_viewer.

Definition at line 661 of file htformat.cc.

Referenced by continue_search().

bool ht_format_viewer::offset_to_pos FILEOFS  ofs,
viewer_pos pos
[virtual]
 

Reimplemented in ht_aviewer, ht_disasm_viewer, ht_hex_viewer, and ht_le_aviewer.

Definition at line 671 of file htformat.cc.

References FILEOFS.

Referenced by ht_analy_sub::convert_ofs_to_id(), and search_dialog().

bool ht_format_viewer::pos_to_offset viewer_pos  pos,
FILEOFS ofs
[virtual]
 

Reimplemented in ht_aviewer, ht_disasm_viewer, ht_hex_viewer, and ht_le_aviewer.

Definition at line 478 of file htformat.cc.

References FILEOFS.

Referenced by ht_uformat_viewer::handlemsg(), search_dialog(), vread(), vselect_add(), vselect_set(), and vwrite().

UINT ht_format_viewer::pread FILEOFS  ofs,
void *  buf,
UINT  size
[virtual]
 

Definition at line 691 of file htformat.cc.

References buf, file, FILEOFS, ht_stream::read(), ht_streamfile::seek(), size, and UINT.

Referenced by ht_uformat_viewer::edit_input(), ht_hex_viewer::handlemsg(), ht_linear_func_readbyte(), ht_linear_func_readstring(), ht_uformat_viewer::ref_desc(), ht_uformat_viewer::render_tagstring(), ht_uformat_viewer::render_tagstring_desc(), and vread().

ht_search_result * ht_format_viewer::psearch ht_search_request search,
FILEOFS  start,
FILEOFS  end
[virtual]
 

Reimplemented in ht_uformat_viewer.

Definition at line 699 of file htformat.cc.

References FILEOFS.

Referenced by continue_search(), and replace_dialog().

void ht_format_viewer::pselect_add FILEOFS  start,
FILEOFS  end
[virtual]
 

Reimplemented in ht_clipboard_viewer, and ht_uformat_viewer.

Definition at line 704 of file htformat.cc.

References FILEOFS.

Referenced by vselect_add().

void ht_format_viewer::pselect_get FILEOFS start,
FILEOFS end
[virtual]
 

Reimplemented in ht_uformat_viewer.

Definition at line 708 of file htformat.cc.

References FILEOFS.

void ht_format_viewer::pselect_set FILEOFS  start,
FILEOFS  end
[virtual]
 

Reimplemented in ht_clipboard_viewer, and ht_uformat_viewer.

Definition at line 712 of file htformat.cc.

References FILEOFS.

Referenced by ht_pe_header_viewer::ref_sel(), ht_pe_resource_viewer::select_node(), show_search_result(), and vselect_set().

UINT ht_format_viewer::pwrite FILEOFS  ofs,
void *  buf,
UINT  size
[virtual]
 

Reimplemented in ht_uformat_viewer.

Definition at line 716 of file htformat.cc.

References buf, file, FILEOFS, msg_file_changed, ht_streamfile::seek(), ht_view::sendmsg(), size, UINT, and ht_stream::write().

Referenced by ht_uformat_viewer::pwrite(), and vwrite().

bool ht_format_viewer::qword_to_offset qword  q,
FILEOFS ofs
[virtual]
 

Reimplemented in ht_uformat_viewer.

Definition at line 725 of file htformat.cc.

References FILEOFS.

Referenced by string_to_offset().

bool ht_format_viewer::qword_to_pos qword  q,
viewer_pos pos
[virtual]
 

Reimplemented in ht_aviewer, ht_disasm_viewer, and ht_hex_viewer.

Definition at line 730 of file htformat.cc.

Referenced by string_to_pos().

bool ht_format_viewer::show_search_result ht_search_result result  )  [virtual]
 

Definition at line 735 of file htformat.cc.

References goto_offset(), goto_pos(), ht_physical_search_result::offset, ht_visual_search_result::pos, pselect_set(), SC_PHYSICAL, SC_VISUAL, ht_search_result::search_class, and ht_physical_search_result::size.

Referenced by continue_search(), ht_uformat_viewer::handlemsg(), and replace_dialog().

bool ht_format_viewer::string_to_offset char *  string,
FILEOFS ofs
[virtual]
 

Definition at line 789 of file htformat.cc.

References FILEOFS, qword, qword_to_offset(), string, and string_to_qword().

Referenced by format_string_to_offset_if_avail(), and test_str_to_ofs().

bool ht_format_viewer::string_to_pos char *  string,
viewer_pos pos
[virtual]
 

Definition at line 782 of file htformat.cc.

References qword, qword_to_pos(), string, and string_to_qword().

Referenced by ht_aviewer::generateOutputDialog(), ht_uformat_viewer::handlemsg(), htclassimage_init(), ht_aviewer::showXRefs(), and test_str_to_pos().

bool ht_format_viewer::string_to_qword char *  string,
qword *  q
 

Definition at line 764 of file htformat.cc.

References eval(), get_eval_error(), GLOBAL_ERROR_SIZE, globalerror, ht_snprintf(), scalar_context_int(), scalar_destroy(), string, and eval_int::value.

Referenced by string_to_offset(), and string_to_pos().

int ht_format_viewer::symbol_handler eval_scalar result,
char *  name
[virtual]
 

Reimplemented in ht_aviewer, ht_disasm_viewer, and ht_hex_viewer.

Definition at line 534 of file htformat.cc.

Referenced by ht_hex_viewer::symbol_handler(), ht_disasm_viewer::symbol_handler(), and ht_aviewer::symbol_handler().

UINT ht_format_viewer::vread viewer_pos  pos,
void *  buf,
UINT  size
[virtual]
 

Definition at line 805 of file htformat.cc.

References buf, FILEOFS, pos_to_offset(), pread(), size, and UINT.

Referenced by ht_disasm_viewer::handlemsg().

ht_search_result * ht_format_viewer::vsearch ht_search_request search,
viewer_pos  start,
viewer_pos  end
[virtual]
 

Reimplemented in ht_uformat_viewer.

Definition at line 814 of file htformat.cc.

References NULL.

Referenced by continue_search().

void ht_format_viewer::vselect_add viewer_pos  start,
viewer_pos  end
[virtual]
 

Definition at line 819 of file htformat.cc.

References FILEOFS, pos_to_offset(), and pselect_add().

void ht_format_viewer::vselect_get viewer_pos start,
viewer_pos end
[virtual]
 

Definition at line 827 of file htformat.cc.

References HT_ERROR.

void ht_format_viewer::vselect_set viewer_pos  start,
viewer_pos  end
[virtual]
 

Definition at line 832 of file htformat.cc.

References FILEOFS, pos_to_offset(), and pselect_set().

Object * ht_format_viewer::vstate_create  )  [protected, virtual]
 

Reimplemented in ht_uformat_viewer.

Definition at line 796 of file htformat.cc.

References NULL.

Referenced by vstate_save().

void ht_format_viewer::vstate_restore Object view_state  )  [protected, virtual]
 

Reimplemented in ht_uformat_viewer.

Definition at line 801 of file htformat.cc.

Referenced by handlemsg().

bool ht_format_viewer::vstate_save  ) 
 

Definition at line 676 of file htformat.cc.

References app, msg_vstate_save, mt_empty, ht_view::sendmsg(), and vstate_create().

Referenced by ht_uformat_viewer::func(), ht_uformat_viewer::goto_offset(), ht_uformat_viewer::goto_pos(), ht_uformat_viewer::handlemsg(), ht_pe_header_viewer::ref_sel(), and replace_dialog().

UINT ht_format_viewer::vwrite viewer_pos  pos,
void *  buf,
UINT  size
[virtual]
 

Definition at line 840 of file htformat.cc.

References buf, FILEOFS, pos_to_offset(), pwrite(), size, and UINT.

Referenced by dialog_assemble().


Member Data Documentation

ht_streamfile* ht_format_viewer::file [protected]
 

Reimplemented in ht_class_aviewer, ht_coff_aviewer, ht_le_aviewer, and ht_ne_aviewer.

Definition at line 146 of file htformat.h.

Referenced by get_file(), handlemsg(), init(), pread(), and pwrite().

ht_format_group* ht_format_viewer::format_group
 

Definition at line 164 of file htformat.h.

Referenced by init().

FILEOFS ht_format_viewer::last_search_end_ofs [protected]
 

Definition at line 151 of file htformat.h.

Referenced by continue_search().

viewer_pos ht_format_viewer::last_search_end_pos [protected]
 

Definition at line 152 of file htformat.h.

Referenced by continue_search().

bool ht_format_viewer::last_search_physical [protected]
 

Definition at line 149 of file htformat.h.

Referenced by continue_search().

ht_search_request* ht_format_viewer::last_search_request [protected]
 

Definition at line 148 of file htformat.h.

Referenced by continue_search(), done(), and init().


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