OTest2
A C++ testing framework
Public Member Functions | Protected Member Functions | List of all members
OTest2::AssertBufferStr Class Reference

An implementation of the assertion buffer keeping messages in a memory buffer. More...

#include <assertbufferstr.h>

Inheritance diagram for OTest2::AssertBufferStr:
Inheritance graph
[legend]
Collaboration diagram for OTest2::AssertBufferStr:
Collaboration graph
[legend]

Public Member Functions

 AssertBufferStr (const AssertBufferStr &)=delete
 
AssertBufferStroperator= (const AssertBufferStr &)=delete
 
 AssertBufferStr (AssertBufferListener *listener_)
 Ctor. More...
 
virtual ~AssertBufferStr ()
 Dtor. More...
 
void openAssertion (const AssertBufferAssertData &data_)
 Open an assertion. More...
 
void openError ()
 Open an internal error. More...
 
virtual void setForeground (Color color_) override
 Set foreground color. More...
 
virtual void setBackground (Color color_) override
 Set background color. More...
 
virtual void setTextStyle (Style style_) override
 Set style of the shown text. More...
 
virtual void resetAttributes () override
 Reset currently set text attributes. More...
 
virtual void commitMessage (const Context &context_) override final
 Commit (flush) current assertion message. More...
 
virtual void commitAssertion (const Context &context_) override final
 Finish current assertion. More...
 
- Public Member Functions inherited from OTest2::AssertBuffer
 AssertBuffer (const AssertBuffer &)=delete
 
AssertBufferoperator= (const AssertBuffer &)=delete
 
 AssertBuffer ()
 Ctor. More...
 
virtual ~AssertBuffer ()
 Dtor. More...
 

Protected Member Functions

virtual int overflow (int c_) override final
 

Detailed Description

An implementation of the assertion buffer keeping messages in a memory buffer.

Definition at line 117 of file assertbufferstr.h.

Constructor & Destructor Documentation

◆ AssertBufferStr() [1/2]

OTest2::AssertBufferStr::AssertBufferStr ( const AssertBufferStr )
delete

◆ AssertBufferStr() [2/2]

OTest2::AssertBufferStr::AssertBufferStr ( AssertBufferListener listener_)
explicit

Ctor.

Parameters
listener_Listener of the buffer. The ownership is not taken.

Definition at line 29 of file assertbufferstr.cpp.

◆ ~AssertBufferStr()

OTest2::AssertBufferStr::~AssertBufferStr ( )
virtual

Dtor.

Definition at line 38 of file assertbufferstr.cpp.

Member Function Documentation

◆ commitAssertion()

void OTest2::AssertBufferStr::commitAssertion ( const Context context_)
finaloverridevirtual

Finish current assertion.

Parameters
context_The OTest2 context

Implements OTest2::AssertBuffer.

Definition at line 144 of file assertbufferstr.cpp.

◆ commitMessage()

void OTest2::AssertBufferStr::commitMessage ( const Context context_)
finaloverridevirtual

Commit (flush) current assertion message.

Parameters
context_The OTest2 context

Implements OTest2::AssertBuffer.

Definition at line 98 of file assertbufferstr.cpp.

◆ openAssertion()

void OTest2::AssertBufferStr::openAssertion ( const AssertBufferAssertData data_)

Open an assertion.

Parameters
data_Data kept about the assertion

Definition at line 42 of file assertbufferstr.cpp.

◆ openError()

void OTest2::AssertBufferStr::openError ( )

Open an internal error.

Definition at line 51 of file assertbufferstr.cpp.

◆ operator=()

AssertBufferStr& OTest2::AssertBufferStr::operator= ( const AssertBufferStr )
delete

◆ overflow()

int OTest2::AssertBufferStr::overflow ( int  c_)
finaloverrideprotectedvirtual

Definition at line 66 of file assertbufferstr.cpp.

◆ resetAttributes()

void OTest2::AssertBufferStr::resetAttributes ( )
overridevirtual

Reset currently set text attributes.

Implements OTest2::AssertBuffer.

Definition at line 94 of file assertbufferstr.cpp.

◆ setBackground()

void OTest2::AssertBufferStr::setBackground ( Color  color_)
overridevirtual

Set background color.

Parameters
color_The color

Implements OTest2::AssertBuffer.

Definition at line 84 of file assertbufferstr.cpp.

◆ setForeground()

void OTest2::AssertBufferStr::setForeground ( Color  color_)
overridevirtual

Set foreground color.

Parameters
color_The color

Implements OTest2::AssertBuffer.

Definition at line 79 of file assertbufferstr.cpp.

◆ setTextStyle()

void OTest2::AssertBufferStr::setTextStyle ( Style  style_)
overridevirtual

Set style of the shown text.

Parameters
style_The style

Implements OTest2::AssertBuffer.

Definition at line 89 of file assertbufferstr.cpp.


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