PLaSK library
|
Template of base class of combine provider. More...
#include <plask/provider/combined_provider.hpp>
Public Types | |
typedef BaseProviderT | BaseType |
typedef boost::indirect_iterator< typename std::set< BaseProviderT * >::iterator > | iterator |
Type of iterator over BaseProviderT. | |
typedef boost::indirect_iterator< typename std::set< BaseProviderT * >::const_iterator > | const_iterator |
Type of const iterator over BaseProviderT. | |
Public Member Functions | |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
void | add (BaseProviderT *to_add, bool providerIsPrivate=false) |
Append new provider to set of the held providers. | |
void | add (std::unique_ptr< BaseProviderT > &&to_add) |
Append new provider to the set of the held providers. | |
void | remove (BaseProviderT *to_remove) |
Remove specified provider from the set of the held providers. | |
void | clear () |
Remove all providers from the set of the held providers. | |
~CombinedProviderBase () | |
Delete all private providers. | |
bool | empty () const |
Check if the providers set of this is empty. | |
std::size_t | size () const |
Get number of providers in the set. | |
void | ensureHasProviders () const |
Throw exception if the providers set of this is empty. | |
Protected Attributes | |
std::set< BaseProviderT * > | providers |
Set of providers which values are combinating. | |
Template of base class of combine provider.
Subclass should define operator() which should combine values from providers (which are available by begin() and end() iterators).
Definition at line 36 of file combined_provider.hpp.
typedef BaseProviderT plask::CombinedProviderBase< BaseProviderT >::BaseType |
Definition at line 38 of file combined_provider.hpp.
typedef boost::indirect_iterator<typename std::set<BaseProviderT*>::const_iterator> plask::CombinedProviderBase< BaseProviderT >::const_iterator |
Type of const iterator over BaseProviderT.
Definition at line 63 of file combined_provider.hpp.
typedef boost::indirect_iterator<typename std::set<BaseProviderT*>::iterator> plask::CombinedProviderBase< BaseProviderT >::iterator |
Type of iterator over BaseProviderT.
Definition at line 60 of file combined_provider.hpp.
|
inline |
Delete all private providers.
Definition at line 116 of file combined_provider.hpp.
|
inline |
Append new provider to set of the held providers.
to_add | provider to append, can't be nullptr |
providerIsPrivate | true only if provider is private for this and will be deleted by destructor of this |
Definition at line 82 of file combined_provider.hpp.
|
inline |
Append new provider to the set of the held providers.
to_add | provider to append, can't be nullptr , will be deleted by destructor of this |
Definition at line 93 of file combined_provider.hpp.
|
inline |
Definition at line 66 of file combined_provider.hpp.
|
inline |
Definition at line 72 of file combined_provider.hpp.
|
inline |
Remove all providers from the set of the held providers.
Delete private providers.
Definition at line 111 of file combined_provider.hpp.
|
inline |
Check if the providers set of this is empty.
true
if this not contains any provider Definition at line 124 of file combined_provider.hpp.
|
inline |
Definition at line 69 of file combined_provider.hpp.
|
inline |
Definition at line 75 of file combined_provider.hpp.
|
inline |
Throw exception if the providers set of this is empty.
Definition at line 135 of file combined_provider.hpp.
|
inline |
Remove specified provider from the set of the held providers.
to_remove | provider to remove, it will be deleted if it is private |
Definition at line 101 of file combined_provider.hpp.
|
inline |
Get number of providers in the set.
Definition at line 130 of file combined_provider.hpp.
|
protected |
Set of providers which values are combinating.
Definition at line 55 of file combined_provider.hpp.