mavtables  0.2.1
MAVLink router and firewall.
Public Member Functions | List of all members
MockCOut Class Reference

#include <common.hpp>

Collaboration diagram for MockCOut:
Collaboration graph

Public Member Functions

 MockCOut ()
 
 ~MockCOut ()
 
std::string buffer ()
 
void reset ()
 

Detailed Description

RAII class to replace std::cout with a mocked buffer.

Definition at line 55 of file common.hpp.

Constructor & Destructor Documentation

◆ MockCOut()

MockCOut::MockCOut ( )
inline

Replace std::cout with this mock.

Definition at line 60 of file common.hpp.

◆ ~MockCOut()

MockCOut::~MockCOut ( )
inline

Restore std::cout.

Definition at line 67 of file common.hpp.

Member Function Documentation

◆ buffer()

std::string MockCOut::buffer ( )
inline

Return the contents of the mocked std::cout buffer as a string.

Returns
The contents of the mocked buffer.

Definition at line 75 of file common.hpp.

◆ reset()

void MockCOut::reset ( )
inline

Erase the mocked buffer.

Definition at line 81 of file common.hpp.


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