8 #include<libtransistor/cpp/types.hpp>
35 InRaw(T value) : value(value) { }
36 static_assert(std::is_pod<T>::value,
"InRaw types must be POD");
46 OutRaw(T &ref) : value(&ref) { }
47 static_assert(std::is_pod<T>::value,
"OutRaw types must be POD");
64 template<
typename T,
typename Transfer>
76 template<
typename Transfer>
88 template<
typename T,
typename Transfer,
typename... Args>
91 template<
typename Transfer>
103 template<
typename T,
typename Transfer,
typename... Args>
105 OutHandle(T &handle, Args... args) : handle(&handle), args(std::make_tuple(args...)) {}
107 OutHandle<T, Transfer, Args...> &operator=(T &val) {
108 *handle = T(val.handle);
112 OutHandle<T, Transfer, Args...> &operator=(
handle_t &val) {
113 HelpConstruct(val, std::index_sequence_for<Args...>());
118 std::tuple<Args...> args;
120 template<std::size_t... I>
121 void HelpConstruct(
handle_t &val, std::index_sequence<I...>) {
122 *handle = T(val, std::get<I>(args)...);
126 template<
typename T, u
int32_t type,
size_t expected_size = 0>
128 Buffer(std::vector<T> &vec) :
Buffer(vec.data(), vec.size() *
sizeof(T)) { }
129 Buffer(T *data,
size_t size) : data(data), size(size) { }
140 OutPid(uint64_t &ref) : value(&ref) { }
Describes an incoming IPC message. Used as an intermediate during unpacking.
Definition: ipc.h:234
uint32_t handle_t
Resource handle.
Definition: types.h:38
Interprocess Communication data structures and functions.