MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / AddUnitGroup

Method AddUnitGroup

lib/mdflib/mdflib/src/hounitspecification.cpp:50–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48}
49
50void HoUnitSpecification::AddUnitGroup(HoUnitGroup group) {
51 const std::string& key = group.ShortName();
52 if (key.empty()) {
53 MDF_ERROR() << "A unit group must have a short name.";
54 return;
55 }
56
57 if (const auto itr = unit_group_list_.find(key);
58 itr != unit_group_list_.cend() ) {
59 MDF_ERROR() << "The unit group is already defined. Short Name: " << key;
60 return;
61 }
62 unit_group_list_.emplace(key,std::move(group));
63}
64
65const HoUnitGroupList& HoUnitSpecification::UnitGroups() const {
66 return unit_group_list_;

Callers 1

TESTFunction · 0.80

Calls 4

emptyMethod · 0.80
findMethod · 0.80
cendMethod · 0.80
ShortNameMethod · 0.45

Tested by

no test coverage detected