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

Method read_union

tests/DCPS/XTypes/Subscriber.cpp:189–208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

187
188 template <typename TopicType>
189 void read_union()
190 {
191 const UnionDisc expected = E_KEY;
192 TopicType cpp_data;
193 if (dynamic) {
194 if (read_dynamic()) {
195 check_int32("discriminator", expected);
196 }
197 } else if (read(cpp_data)) {
198 check_int32("discriminator", expected, cpp_data._d());
199 }
200 if (!success) {
201 return;
202 }
203 if (dynamic) {
204 check_int32("key_field", key_value);
205 } else {
206 check_int32("key_field", key_value, cpp_data.key_field());
207 }
208 }
209};
210
211int ACE_TMAIN(int argc, ACE_TCHAR* argv[])

Callers

nothing calls this directly

Calls 2

read_dynamicFunction · 0.85
readFunction · 0.50

Tested by

no test coverage detected