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

Method gen_struct

dds/idl/value_reader_generator.cpp:436–461  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

434}
435
436bool value_reader_generator::gen_struct(AST_Structure* node,
437 UTL_ScopedName* name,
438 const std::vector<AST_Field*>& /*fields*/,
439 AST_Type::SIZE_TYPE,
440 const char*)
441{
442 be_global->add_include("dds/DCPS/Util.h", BE_GlobalData::STREAM_H);
443 be_global->add_include("dds/DCPS/ValueReader.h", BE_GlobalData::STREAM_H);
444
445 const std::string type_name = scoped(name);
446 const bool use_cxx11 = be_global->language_mapping() == BE_GlobalData::LANGMAP_CXX11;
447 const ExtensibilityKind ek = be_global->extensibility(node);
448
449 NamespaceGuard guard;
450 if (!gen_struct_i(node, type_name, use_cxx11, ek, FieldFilter_All) ||
451 !gen_struct_i(node, type_name, use_cxx11, ek, FieldFilter_NestedKeyOnly)) {
452 return false;
453 }
454
455 if (be_global->is_topic_type(node)) {
456 if (!gen_struct_i(node, type_name, use_cxx11, ek, FieldFilter_KeyOnly)) {
457 return false;
458 }
459 }
460 return true;
461}
462
463bool value_reader_generator::gen_union(AST_Union* u,
464 UTL_ScopedName* name,

Callers

nothing calls this directly

Calls 6

scopedFunction · 0.85
language_mappingMethod · 0.80
is_topic_typeMethod · 0.80
gen_struct_iFunction · 0.70
add_includeMethod · 0.45
extensibilityMethod · 0.45

Tested by

no test coverage detected