5#include <google/protobuf/repeated_field.h>
7#include <viam/sdk/common/proto_convert.hpp>
13template <
typename T,
typename = EquivalentApiType<T>>
14auto to_repeated_field(
const std::vector<T>& v) {
16 result.Reserve(v.size());
18 for (
const auto& elem : v) {
19 *(result.Add()) = to_proto(elem);
25template <
typename T,
typename = EquivalentSdkType<T>>
26auto from_repeated_field(const ::google::protobuf::RepeatedPtrField<T>& v) {
27 std::vector<EquivalentSdkType<T>> result;
28 result.reserve(v.size());
30 for (
const auto& elem : v) {
31 result.push_back(from_proto(elem));
Definition service.hpp:15