aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/ValueBroker.hpp
blob: 927142fe17bb812399ce1d1cae343e9fe999ac17 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#pragma once

#include "ValueBroker.h"

namespace crepe {

template <typename T>
ValueBroker<T>::ValueBroker(const setter_t & setter, const getter_t & getter)
	: setter(setter), getter(getter) {}

template <typename T>
const T & ValueBroker<T>::get() {
	return this->getter();
}

template <typename T>
void ValueBroker<T>::set(const T & value) {
	this->setter(value);
}

} // namespace crepe