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

#include <common.hpp>

Collaboration diagram for MockCErr:
Collaboration graph

Public Member Functions

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

Detailed Description

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

Definition at line 94 of file common.hpp.

Constructor & Destructor Documentation

◆ MockCErr()

MockCErr::MockCErr ( )
inline

Replace std::cerr with this mock.

Definition at line 99 of file common.hpp.

◆ ~MockCErr()

MockCErr::~MockCErr ( )
inline

Restore std::cerr.

Definition at line 106 of file common.hpp.

Member Function Documentation

◆ buffer()

std::string MockCErr::buffer ( )
inline

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

Returns
The contents of the mocked buffer.

Definition at line 114 of file common.hpp.

◆ reset()

void MockCErr::reset ( )
inline

Erase the mocked buffer.

Definition at line 120 of file common.hpp.


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