Audacity 3.2.0
Public Member Functions | Private Member Functions | Private Attributes | List of all members
NyqRedirector Class Reference

#include <NyqBench.h>

Inheritance diagram for NyqRedirector:
[legend]
Collaboration diagram for NyqRedirector:
[legend]

Public Member Functions

 NyqRedirector (NyqTextCtrl *text)
 
virtual ~NyqRedirector ()
 
int overflow (int c)
 

Private Member Functions

void AppendText ()
 

Private Attributes

std::string s
 
std::streambuf * mOld
 
NyqTextCtrlmText
 

Detailed Description

Definition at line 79 of file NyqBench.h.

Constructor & Destructor Documentation

◆ NyqRedirector()

NyqRedirector::NyqRedirector ( NyqTextCtrl text)

Definition at line 505 of file NyqBench.cpp.

506: mText(text)
507{
508 mOld = std::cout.rdbuf(this);
509}
NyqTextCtrl * mText
Definition: NyqBench.h:92
std::streambuf * mOld
Definition: NyqBench.h:91

References mOld.

◆ ~NyqRedirector()

NyqRedirector::~NyqRedirector ( )
virtual

Definition at line 511 of file NyqBench.cpp.

512{
513 std::cout.flush();
514 std::cout.rdbuf(mOld);
515 if (s.length() > 0) {
516 AppendText();
517 }
518}
std::string s
Definition: NyqBench.h:90
void AppendText()
Definition: NyqBench.cpp:530

References AppendText(), mOld, and s.

Here is the call graph for this function:

Member Function Documentation

◆ AppendText()

void NyqRedirector::AppendText ( )
private

Definition at line 530 of file NyqBench.cpp.

531{
532 mText->AppendText(wxString(s.c_str(), wxConvISO8859_1));
533 s.clear();
534}

References mText, and s.

Referenced by overflow(), and ~NyqRedirector().

Here is the caller graph for this function:

◆ overflow()

int NyqRedirector::overflow ( int  c)

Definition at line 520 of file NyqBench.cpp.

521{
522 s += (char)c;
523 if (c == '\n') {
524 AppendText();
525 }
526
527 return 0;
528}

References AppendText(), and s.

Here is the call graph for this function:

Member Data Documentation

◆ mOld

std::streambuf* NyqRedirector::mOld
private

Definition at line 91 of file NyqBench.h.

Referenced by NyqRedirector(), and ~NyqRedirector().

◆ mText

NyqTextCtrl* NyqRedirector::mText
private

Definition at line 92 of file NyqBench.h.

Referenced by AppendText().

◆ s

std::string NyqRedirector::s
private

Definition at line 90 of file NyqBench.h.

Referenced by AppendText(), overflow(), and ~NyqRedirector().


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