33 static handle_of_t<T> BackendHandle(
const T& instance);
34 static handle_of_t<T>* BackendHandleAddress(T& instance);
35 template <
typename... Args>
36 static T CreateInstance(Args&&... args);
37 static peak::common::detail::c_type_of_t<T> CreateCType(
const T& instance);
38 static std::vector<T> CreateInstances(std::vector<handle_of_t<T>> handles);
42handle_of_t<T> BackendAccessor<T>::BackendHandle(
const T& instance)
44 return instance.GetHandle();
48handle_of_t<T>* BackendAccessor<T>::BackendHandleAddress(T& instance)
50 return instance.GetHandleAddress();
54template <
typename... Args>
55T BackendAccessor<T>::CreateInstance(Args&&... args)
57 return T{ std::forward<Args>(args)... };
61peak::common::detail::c_type_of_t<T> BackendAccessor<T>::CreateCType(
const T& instance)
63 return {
static_cast<peak::common::detail::c_type_of_t<T>
>(instance) };
67std::vector<T> BackendAccessor<T>::CreateInstances(std::vector<handle_of_t<T>> handles)
69 std::vector<T> instances;
70 instances.reserve(handles.size());
71 std::transform(handles.begin(), handles.end(), std::back_inserter(instances), [](
const auto& handle) {
72 return CreateInstance(handle);
Namespace for internal implementation details and low-level types.
Definition peak_common_math.hpp:24
Root namespace for common types and interfaces shared across multiple libraries.
Definition peak_common_math.hpp:22