MCPcopy Create free account
hub / github.com/Snapchat/Valdi / marshallVector

Function marshallVector

valdi_core/src/valdi_core/cpp/Utils/BridgeObject.hpp:125–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123
124template<typename VecValue, typename ConvertValue>
125Value marshallVector(const std::vector<VecValue>& value,
126 const Ref<BridgeContext>& /*bridgeContext*/,
127 ConvertValue&& convertValue) {
128 auto out = ValueArray::make(value.size());
129
130 size_t index = 0;
131
132 for (const auto& it : value) {
133 out->emplace(index, convertValue(it));
134 index++;
135 }
136
137 return Value(out);
138}
139
140template<typename T>
141Value marshallBridgeObject(const std::shared_ptr<T>& bridgeObject, const Ref<BridgeContext>& /*bridgeContext*/) {

Callers

nothing calls this directly

Calls 3

ValueClass · 0.70
sizeMethod · 0.45
emplaceMethod · 0.45

Tested by

no test coverage detected