PLaSK library

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | Protected Attributes | List of all members
plask::ScaledProviderBase< DstProviderT, SrcProviderT, ScaleT > Struct Template Reference

Template of base of scaled provider. More...

`#include <plask/provider/scaled_provider.hpp>`

Inheritance diagram for plask::ScaledProviderBase< DstProviderT, SrcProviderT, ScaleT >:
[legend]
Collaboration diagram for plask::ScaledProviderBase< DstProviderT, SrcProviderT, ScaleT >:
[legend]

## Public Types
typedef SrcProviderT | SourceType
typedef DstProviderT | DestinationType
typedef ScaleT | ScaleType

## Public Member Functions
| ScaledProviderBase (ScaleT scale=1.)
| Create the provider.
void | set (SrcProviderT *src, bool prv=false)
| Set source provider.
void | set (std::unique_ptr< SrcProviderT > &&src)
| Set source provider.
void | reset ()
| Reset source provider.
SrcProviderT * | getSource () const
| Obtain source provider.
| ~ScaledProviderBase ()
void | ensureHasProvider () const
| Throw exception if the providers set of this is empty.

## Public Attributes
ScaleT | scale
| Scale for the provider value.

## Protected Attributes
SrcProviderT * | source
| Source provider.

## Detailed Description

template<typename DstProviderT, typename SrcProviderT, typename ScaleT = double>
struct plask::ScaledProviderBase< DstProviderT, SrcProviderT, ScaleT >

Template of base of scaled provider.

Definition at line 30 of file scaled_provider.hpp.

## Member Typedef Documentation

## ◆ DestinationType

template<typename DstProviderT , typename SrcProviderT , typename ScaleT = double>

typedef DstProviderT plask::ScaledProviderBase< DstProviderT, SrcProviderT, ScaleT >::DestinationType

Definition at line 33 of file scaled_provider.hpp.

## ◆ ScaleType

template<typename DstProviderT , typename SrcProviderT , typename ScaleT = double>

typedef ScaleT plask::ScaledProviderBase< DstProviderT, SrcProviderT, ScaleT >::ScaleType

Definition at line 34 of file scaled_provider.hpp.

## ◆ SourceType

template<typename DstProviderT , typename SrcProviderT , typename ScaleT = double>

typedef SrcProviderT plask::ScaledProviderBase< DstProviderT, SrcProviderT, ScaleT >::SourceType

Definition at line 32 of file scaled_provider.hpp.

## Constructor & Destructor Documentation

## ◆ ScaledProviderBase()

template<typename DstProviderT , typename SrcProviderT , typename ScaleT = double>

plask::ScaledProviderBase< DstProviderT, SrcProviderT, ScaleT >::ScaledProviderBase | ( | ScaleT | scale = `1.` | ) |
| inline

Create the provider.

Parameters

  scale | initial scale

Definition at line 60 of file scaled_provider.hpp.

## ◆ ~ScaledProviderBase()

template<typename DstProviderT , typename SrcProviderT , typename ScaleT = double>

plask::ScaledProviderBase< DstProviderT, SrcProviderT, ScaleT >::~ScaledProviderBase | ( |  | ) |
| inline

Definition at line 101 of file scaled_provider.hpp.

## Member Function Documentation

## ◆ ensureHasProvider()

template<typename DstProviderT , typename SrcProviderT , typename ScaleT = double>

void plask::ScaledProviderBase< DstProviderT, SrcProviderT, ScaleT >::ensureHasProvider | ( |  | ) | const
| inline

Throw exception if the providers set of this is empty.

Definition at line 108 of file scaled_provider.hpp.

## ◆ getSource()

template<typename DstProviderT , typename SrcProviderT , typename ScaleT = double>

SrcProviderT * plask::ScaledProviderBase< DstProviderT, SrcProviderT, ScaleT >::getSource | ( |  | ) | const
| inline

Obtain source provider.

Returns
  source provider

Definition at line 97 of file scaled_provider.hpp.

## ◆ reset()

template<typename DstProviderT , typename SrcProviderT , typename ScaleT = double>

void plask::ScaledProviderBase< DstProviderT, SrcProviderT, ScaleT >::reset | ( |  | ) |
| inline

Reset source provider.

Definition at line 86 of file scaled_provider.hpp.

## ◆ set() [1/2]

template<typename DstProviderT , typename SrcProviderT , typename ScaleT = double>

void plask::ScaledProviderBase< DstProviderT, SrcProviderT, ScaleT >::set | ( | SrcProviderT * | src,
|  | bool | prv = `false`
| ) |  |
| inline

Set source provider.

Parameters

  src | source provider
  prv | `true` only if `src` is private and should be deleted by destructor of this

Definition at line 67 of file scaled_provider.hpp.

## ◆ set() [2/2]

template<typename DstProviderT , typename SrcProviderT , typename ScaleT = double>

void plask::ScaledProviderBase< DstProviderT, SrcProviderT, ScaleT >::set | ( | std::unique_ptr< SrcProviderT > && | src | ) |
| inline

Set source provider.

Parameters

  src | source provider

Definition at line 79 of file scaled_provider.hpp.

## Member Data Documentation

## ◆ scale

template<typename DstProviderT , typename SrcProviderT , typename ScaleT = double>

ScaleT plask::ScaledProviderBase< DstProviderT, SrcProviderT, ScaleT >::scale

Scale for the provider value.

Definition at line 54 of file scaled_provider.hpp.

## ◆ source

template<typename DstProviderT , typename SrcProviderT , typename ScaleT = double>

SrcProviderT* plask::ScaledProviderBase< DstProviderT, SrcProviderT, ScaleT >::source
| protected

Source provider.

Definition at line 38 of file scaled_provider.hpp.

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

- plask/provider/scaled_provider.hpp