ArmNN
 20.05
StreamRedirector Struct Reference

#include <ProfilingTests.hpp>

Public Member Functions

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

Detailed Description

Definition at line 43 of file ProfilingTests.hpp.

Constructor & Destructor Documentation

◆ StreamRedirector()

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

Definition at line 46 of file ProfilingTests.hpp.

47  : m_Stream(stream)
48  , m_BackupBuffer(m_Stream.rdbuf(newStreamBuffer))
49  {}

◆ ~StreamRedirector()

~StreamRedirector ( )
inline

Definition at line 51 of file ProfilingTests.hpp.

Member Function Documentation

◆ CancelRedirect()

void CancelRedirect ( )
inline

Definition at line 53 of file ProfilingTests.hpp.

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

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