MCPcopy Create free account
hub / github.com/OpenDDS/OpenDDS / write_union

Function write_union

tests/DCPS/XTypes/Publisher.cpp:164–174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

162
163template <typename TopicType>
164void write_union(const TypeSupport_var& ts, const DataWriter_var& dw, bool dynamic)
165{
166 if (dynamic) {
167 DynamicWriter d(ts, dw);
168 d.set_int32("key_field", key_value);
169 } else {
170 TopicType sample;
171 sample.key_field(key_value);
172 write_sample(ts, dw, sample);
173 }
174}
175
176template <typename TopicType>
177void write_trim_struct(const TypeSupport_var& ts, const DataWriter_var& dw, bool dynamic)

Callers

nothing calls this directly

Calls 2

write_sampleFunction · 0.85
set_int32Method · 0.45

Tested by

no test coverage detected