httpmockserver
Public Member Functions | Private Attributes | List of all members
httpmock::MockServerHolder Class Reference

#include <mock_holder.h>

Inheritance diagram for httpmock::MockServerHolder:
Inheritance graph
[legend]
Collaboration diagram for httpmock::MockServerHolder:
Collaboration graph
[legend]

Public Member Functions

 MockServerHolder (std::unique_ptr< MockServer > &&server)
 
MockServerHolderoperator= (const MockServerHolder &)=default
 
 MockServerHolder (const MockServerHolder &)=default
 
 MockServerHolder (MockServerHolder &&)=default
 
 ~MockServerHolder ()=default
 
virtual void start () override
 Allow to start the server. More...
 
virtual void stop () override
 Allow to stop the server. More...
 
virtual bool isRunning () const override
 Return true if server is running. More...
 
const std::unique_ptr< MockServer > & operator-> () const
 
- Public Member Functions inherited from httpmock::IMockServer
virtual ~IMockServer ()=0
 

Private Attributes

std::unique_ptr< MockServerheld
 Instance of a mocking server. More...
 

Constructor & Destructor Documentation

◆ MockServerHolder() [1/3]

httpmock::MockServerHolder::MockServerHolder ( std::unique_ptr< MockServer > &&  server)
inline

◆ MockServerHolder() [2/3]

httpmock::MockServerHolder::MockServerHolder ( const MockServerHolder )
default

◆ MockServerHolder() [3/3]

httpmock::MockServerHolder::MockServerHolder ( MockServerHolder &&  )
default

◆ ~MockServerHolder()

httpmock::MockServerHolder::~MockServerHolder ( )
default

Member Function Documentation

◆ isRunning()

virtual bool httpmock::MockServerHolder::isRunning ( ) const
inlineoverridevirtual

Return true if server is running.

Implements httpmock::IMockServer.

◆ operator->()

const std::unique_ptr<MockServer>& httpmock::MockServerHolder::operator-> ( ) const
inline

MockServer pointer access method. Beware, validity is limited by the holder lifetime.

◆ operator=()

MockServerHolder& httpmock::MockServerHolder::operator= ( const MockServerHolder )
default

◆ start()

virtual void httpmock::MockServerHolder::start ( )
inlineoverridevirtual

Allow to start the server.

Implements httpmock::IMockServer.

◆ stop()

virtual void httpmock::MockServerHolder::stop ( )
inlineoverridevirtual

Allow to stop the server.

Implements httpmock::IMockServer.

Member Data Documentation

◆ held

std::unique_ptr<MockServer> httpmock::MockServerHolder::held
private

Instance of a mocking server.


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