Class Context

Synopsis

#include <include/internal/catch_context.cpp>

class Context : public IMutableContext, NonCopyable

Description

No description yet.

Inheritance

Ancestors: NonCopyable, IMutableContext

Methods

~Context
getConfig
getResultCapture
getRunner
setConfig
setResultCapture
setRunner

Source

Lines 14-47 in include/internal/catch_context.cpp.

class Context : public IMutableContext, NonCopyable {
public: // IContext
    IResultCapture* getResultCapture() override {
        return m_resultCapture;
    }
    IRunner* getRunner() override {
        return m_runner;
    }
    IConfigPtr const& getConfig() const override {
        return m_config;
    }
    ~Context() override;
public: // IMutableContext
    void setResultCapture( IResultCapture* resultCapture ) override {
        m_resultCapture = resultCapture;
    }
    void setRunner( IRunner* runner ) override {
        m_runner = runner;
    }
    void setConfig( IConfigPtr const& config ) override {
        m_config = config;
    }
    friend IMutableContext& getCurrentMutableContext();
private:
    IConfigPtr m_config;
    IRunner* m_runner = nullptr;
    IResultCapture* m_resultCapture = nullptr;
};





Add Discussion as Guest

Log in