blob: 39b6984418fb1b71e4c1bbd849e2a75ad53f3748 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#ifndef XDTdAXIBNQWHy4pABnW9tvtXRks
#define XDTdAXIBNQWHy4pABnW9tvtXRks
#include <boost/mpl/bool.hpp>
#include <boost/utility.hpp>
#include "pla_get.hpp"
#include "property_list.hpp"
template <typename PropList>
struct PropertyComposition : boost::noncopyable {
// your endless journey has come to an end. down here lies the
// ACTUAL INSTANCE of the entire simulation!
typedef PropList properties_t;
PL<properties_t> properties;
/// data access
// call: return value of action is of interest
template<typename Action>
inline typename Action::result_t call(Action &action) {
return properties.call(*this, action);
}
// cast: fire and forget
template<typename Action>
inline void cast(Action &&action) {
properties.call(*this, action);
}
void sync() {
properties.sync();
}
};
#endif // XDTdAXIBNQWHy4pABnW9tvtXRks
|