libzypp: zypp::callback::TempConnect< TReport > Struct Template Reference

libzypp 17.38.11

zypp::callback::TempConnect< TReport > Struct Template Reference

Temporarily connect a ReceiveReport then restore the previous one. More...

`#include <zypp/Callback.h>`

## Public Types
typedef TReport | ReportType
typedef ReceiveReport< TReport > | Receiver
typedef DistributeReport< TReport > | Distributor

## Public Member Functions
| TempConnect ()
| TempConnect (Receiver &rec_r)
| ~TempConnect ()

## Private Attributes
Receiver * | _oldRec

## Detailed Description

template<class TReport>
struct zypp::callback::TempConnect< TReport >

Temporarily connect a ReceiveReport then restore the previous one.

Pass the ReceiveReport you want to connect temporarily to the ctor. The ReceiveReport is connected, a previously connected ReceiveReport is remembered and re-connected in the dtor. Use the default ctpr to temporarily disconnect any connected report.

struct FooReceive : public callback::ReceiveReport<Foo>
{..};
struct FooReceive2 : public callback::ReceiveReport<Foo>
{..};
FooReceive r;
FooReceive2 r2;
r.connect();
... // r receiving the report
{
callback::TempConnect<Foo> temp( r2 );
...// r2 receiving the report
}
...// r receiving the report
zypp::callback::ReceiveReport
Definition Callback.h:169
zypp::callback::TempConnect
Temporarily connect a ReceiveReport then restore the previous one.
Definition Callback.h:285

Definition at line 284 of file Callback.h.

## Member Typedef Documentation

## ◆ ReportType

template<class TReport>

typedef TReport zypp::callback::TempConnect< TReport >::ReportType

Definition at line 286 of file Callback.h.

## ◆ Receiver

template<class TReport>

typedef ReceiveReport<TReport> zypp::callback::TempConnect< TReport >::Receiver

Definition at line 287 of file Callback.h.

## ◆ Distributor

template<class TReport>

typedef DistributeReport<TReport> zypp::callback::TempConnect< TReport >::Distributor

Definition at line 288 of file Callback.h.

## Constructor & Destructor Documentation

## ◆ TempConnect() [1/2]

template<class TReport>

zypp::callback::TempConnect< TReport >::TempConnect | ( |  | ) |
| inline

Definition at line 290 of file Callback.h.

## ◆ TempConnect() [2/2]

template<class TReport>

zypp::callback::TempConnect< TReport >::TempConnect | ( | Receiver & | rec_r | ) |
| inline

Definition at line 296 of file Callback.h.

## ◆ ~TempConnect()

template<class TReport>

zypp::callback::TempConnect< TReport >::~TempConnect | ( |  | ) |
| inline

Definition at line 302 of file Callback.h.

## Member Data Documentation

## ◆ _oldRec

template<class TReport>

Receiver* zypp::callback::TempConnect< TReport >::_oldRec
| private

Definition at line 310 of file Callback.h.

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

- zypp/Callback.h