debugger Class Reference

#include <debugger.h>

Inheritance diagram for debugger:

Inheritance graph
[legend]
Collaboration diagram for debugger:

Collaboration graph
[legend]
List of all members.

Public Types

enum  synchronicity { delayed, immediate }
enum  time_stamp_method { ADD_STAMP, NO_STAMP }

Public Member Functions

 debugger (void *recipient, synchronicity synch=delayed, line_ending ending=CRLF_AT_END, time_stamp_method stamp=NO_STAMP)
virtual ~debugger ()
 IMPLEMENT_CLASS_NAME ("debugger")
virtual outcome log (const istring &info, int filter=ALWAYS_PRINT)
 writes the information in "info" to the log using the "filter" value.
outcome print (const istring &info, int filter=ALWAYS_PRINT)
outcome log (u_int string_table_id, void *instance, int filter=ALWAYS_PRINT)
outcome print (u_int string_table_id, void *instance, int filter=ALWAYS_PRINT)
void * recipient () const
void reset_recipient (void *recipient)
synchronicity synch () const
void synch (synchronicity new_synch)
time_stamp_method stamp () const
void stamp (time_stamp_method new_method)

Static Public Member Functions

static const u_intEVENT ()
static byte_arraycreate_debug_message (const istring &to_show, line_ending ending, int filter, time_stamp_method stamp)
static istring crack_debug_message (void *data, line_ending &ending, int &filter)

Detailed Description

Definition at line 28 of file debugger.h.


Member Enumeration Documentation

enum debugger::synchronicity

Enumerator:
delayed 
immediate 

Definition at line 31 of file debugger.h.

enum debugger::time_stamp_method

Enumerator:
ADD_STAMP 
NO_STAMP 

Definition at line 39 of file debugger.h.


Constructor & Destructor Documentation

debugger::debugger ( void *  recipient,
synchronicity  synch = delayed,
line_ending  ending = CRLF_AT_END,
time_stamp_method  stamp = NO_STAMP 
)

Definition at line 27 of file debugger.cpp.

References log_base::eol().

debugger::~debugger (  )  [virtual]

Definition at line 37 of file debugger.cpp.


Member Function Documentation

debugger::IMPLEMENT_CLASS_NAME ( "debugger"   ) 

outcome debugger::log ( const istring info,
int  filter = ALWAYS_PRINT 
) [virtual]

writes the information in "info" to the log using the "filter" value.

the "filter" value must be checked to see if it is in the current set of allowed filters (using member()). this function _must_ be provided by derived classes and it _must_ check the filter before printing if it wants to be in compliance with log_base protocols. it also must implement the line_ending appropriately. the return value will often be a member of the common outcomes, but derived classes may see fit to return other things. note that an object derived from log_base should be thread-safe and protect its own member attributes through synchronization.

Implements log_base.

Reimplemented in wx_debugger.

Definition at line 102 of file debugger.cpp.

References common::BAD_INPUT, create_debug_message(), log_base::eol(), EVENT(), immediate, NIL, common::NOT_IMPLEMENTED, and common::OKAY.

Referenced by wx_tiny_shell::log(), log(), and tiny_shell::log().

outcome debugger::print ( const istring info,
int  filter = ALWAYS_PRINT 
) [inline]

Definition at line 58 of file debugger.h.

References log_base::log().

Referenced by wx_tiny_shell::print(), and tiny_shell::print().

outcome debugger::log ( u_int  string_table_id,
void *  instance,
int  filter = ALWAYS_PRINT 
)

Definition at line 52 of file debugger.cpp.

References log(), common::NOT_IMPLEMENTED, and portable::rc_string().

outcome debugger::print ( u_int  string_table_id,
void *  instance,
int  filter = ALWAYS_PRINT 
) [inline]

Definition at line 64 of file debugger.h.

References log_base::log().

void * debugger::recipient (  )  const

Definition at line 63 of file debugger.cpp.

Referenced by wx_debugger::log().

void debugger::reset_recipient ( void *  recipient  )  [inline]

Definition at line 76 of file debugger.h.

Referenced by tiny_shell::OnCreate().

synchronicity debugger::synch (  )  const [inline]

Definition at line 82 of file debugger.h.

Referenced by wx_debugger::log().

void debugger::synch ( synchronicity  new_synch  )  [inline]

Definition at line 83 of file debugger.h.

const u_int & debugger::EVENT (  )  [static]

Reimplemented in wx_debugger.

Definition at line 39 of file debugger.cpp.

Referenced by log().

byte_array * debugger::create_debug_message ( const istring to_show,
line_ending  ending,
int  filter,
time_stamp_method  stamp 
) [static]

Definition at line 65 of file debugger.cpp.

References ADD_STAMP, basis::attach(), istring::pack(), istring::t(), and timestamp().

Referenced by wx_debugger::log(), and log().

istring debugger::crack_debug_message ( void *  data,
line_ending ending,
int &  filter 
) [static]

Definition at line 84 of file debugger.cpp.

References basis::detach(), istring::unpack(), and WHACK().

Referenced by wx_debugging_base::display_message(), and debugging_base::display_message().

time_stamp_method debugger::stamp (  )  const [inline]

Definition at line 114 of file debugger.h.

Referenced by wx_debugger::log().

void debugger::stamp ( time_stamp_method  new_method  )  [inline]

Definition at line 115 of file debugger.h.


The documentation for this class was generated from the following files:
Generated on Fri Oct 10 04:30:07 2008 for HOOPLE Libraries by  doxygen 1.5.1