15 #ifndef BORNAGAIN_MVVM_MODEL_MVVM_SIGNALS_CALLBACKCONTAINER_H
16 #define BORNAGAIN_MVVM_MODEL_MVVM_SIGNALS_CALLBACKCONTAINER_H
18 #include "mvvm/model_export.h"
37 template <
typename... Args>
void operator()(Args... args);
47 m_callbacks.push_back(std::make_pair(callback, client));
51 template <
typename T,
typename U>
52 template <
typename... Args>
55 for (
const auto& f : m_callbacks) {
64 m_callbacks.remove_if(
65 [client](
const std::pair<T, U>& x) ->
bool {
return (x.second == client ?
true :
false); });
Container to hold callbacks in the context of ModelMapper.
void remove_client(U client)
Remove client from the list to call back.
void operator()(Args... args)
Notify clients using given list of arguments.
void connect(T callback, U client)
std::list< std::pair< T, U > > m_callbacks
Callback container for specific client type.
materialitems.h Collection of materials to populate MaterialModel.