ArmNN
 21.11
StreamRedirector Struct Reference

#include <ProfilingTests.hpp>

Public Member Functions

 StreamRedirector (std::ostream &stream, std::streambuf *newStreamBuffer)
 
 ~StreamRedirector ()
 
void CancelRedirect ()
 

Detailed Description

Definition at line 45 of file ProfilingTests.hpp.

Constructor & Destructor Documentation

◆ StreamRedirector()

StreamRedirector ( std::ostream &  stream,
std::streambuf *  newStreamBuffer 
)
inline

Definition at line 48 of file ProfilingTests.hpp.

49  : m_Stream(stream)
50  , m_BackupBuffer(m_Stream.rdbuf(newStreamBuffer))
51  {}

◆ ~StreamRedirector()

~StreamRedirector ( )
inline

Definition at line 53 of file ProfilingTests.hpp.

Member Function Documentation

◆ CancelRedirect()

void CancelRedirect ( )
inline

Definition at line 55 of file ProfilingTests.hpp.

56  {
57  // Only cancel the redirect once.
58  if (m_BackupBuffer != nullptr )
59  {
60  m_Stream.rdbuf(m_BackupBuffer);
61  m_BackupBuffer = nullptr;
62  }
63  }

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