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

Function remove_enumerators

dds/DCPS/XTypes/Utils.cpp:1731–1755  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1729 }
1730
1731 TypeObject remove_enumerators(const TypeObject& to_enum_type,
1732 const Sequence<DDS::Int32>& values)
1733 {
1734 const OPENDDS_SET(DDS::Int32) toRemove(values.begin(), values.end());
1735 TypeObject removed(to_enum_type);
1736 switch (removed.kind) {
1737 case EK_MINIMAL:
1738 if (removed.minimal.kind != TK_ENUM) {
1739 return TypeObject();
1740 }
1741 removed.minimal.enumerated_type.literal_seq =
1742 subset(removed.minimal.enumerated_type.literal_seq, toRemove);
1743 break;
1744 case EK_COMPLETE:
1745 if (removed.complete.kind != TK_ENUM) {
1746 return TypeObject();
1747 }
1748 removed.complete.enumerated_type.literal_seq =
1749 subset(removed.complete.enumerated_type.literal_seq, toRemove);
1750 break;
1751 default:
1752 return TypeObject();
1753 }
1754 return removed;
1755 }
1756
1757 struct ReplaceEnums {
1758 const TypeIdentifier& enum_type_;

Callers 2

TEST_FFunction · 0.85
setup_typesupportFunction · 0.85

Calls 7

TypeObjectClass · 0.85
subsetFunction · 0.85
makeTypeIdentifierFunction · 0.85
get_type_objectMethod · 0.80
replace_objectMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected