reSIProcate/stack  9694
Static Public Member Functions | Static Private Attributes | Friends
resip::TestSupportPriv Class Reference

List of all members.

Static Public Member Functions

static void fb (int w, char c=' ')
static void labels (int len, int row)
static void banner (int len, int row)
static void data (const char *p, int len, int row)

Static Private Attributes

static int chPerRow = 0

Friends

class TestSupport

Detailed Description

Definition at line 17 of file TestSupport.cxx.


Member Function Documentation

static void resip::TestSupportPriv::banner ( int  len,
int  row 
) [inline, static]

Definition at line 39 of file TestSupport.cxx.

  {
    int chThisRow = 0;
    
    if (row >= len/chPerRow)
      chThisRow = len%chPerRow;
    else
      chThisRow = chPerRow;
    
    if (chThisRow < 1) return;
    
    cout << "+";
    for(int i = 0 ; i < chThisRow; i++)
      {
        fb(1,'-');
        cout << '+';
      }
    cout << endl;
    return;
  };
static void resip::TestSupportPriv::data ( const char *  p,
int  len,
int  row 
) [inline, static]

Definition at line 59 of file TestSupport.cxx.

  {
    
    cout << '|';
    for(int c = 0; c < chPerRow; c++)
      {
        int o = row*chPerRow + c;
        if (o >= len) break;
        char ch = p[o];
        
        if (isalnum(ch) || ispunct(ch) || ch == ' ' )
          {
            cout << ' ' << (char)ch;
               fb(3);
          }
        else if ( ch == '\t' )
          {
            cout << " \\t";
            fb(4);
          }
        else if ( ch >= '\t' || ch <= '\r')
          {
            cout << " \\" << "tnvfr"[ch-'\t'];
               fb(4);
          }
        else
          {
            cout << 'x' << hex << setw(2) << ch << dec;
            fb(4);
          }
        cout << '|';
      }
    cout << endl;
  };
static void resip::TestSupportPriv::fb ( int  w,
char  c = ' ' 
) [inline, static]

Definition at line 24 of file TestSupport.cxx.

References boxWidth.

  {
    for(int i = 0 ; i < boxWidth-w ; i++) cout << c;
  };
static void resip::TestSupportPriv::labels ( int  len,
int  row 
) [inline, static]

Definition at line 28 of file TestSupport.cxx.

References boxWidth, and len.

  {
    int start = chPerRow*row;
    cout << ' ';
    for(int i = 0; i < chPerRow && start+i < len; i++)
      {
        cout << setw(boxWidth-1) << start+i;
        fb(3);
      }
    cout << endl;
  }

Friends And Related Function Documentation

friend class TestSupport [friend]

Definition at line 21 of file TestSupport.cxx.


Member Data Documentation

int resip::TestSupportPriv::chPerRow = 0 [static, private]

Definition at line 20 of file TestSupport.cxx.


The documentation for this class was generated from the following file: