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

Function string_to_bitmask

dds/DCPS/ValueCommon.cpp:139–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137}
138
139ACE_CDR::ULongLong string_to_bitmask(const String& flags, const BitmaskHelper& helper)
140{
141 // The flags string has format "FLAG_A|FLAG_B|FLAG_C"
142 OPENDDS_VECTOR(String) names;
143 size_t start = 0, end = 0;
144 while ((end = flags.find("|", start)) != String::npos) {
145 names.push_back(flags.substr(start, end - start));
146 start = end + 1;
147 }
148 names.push_back(flags.substr(start));
149
150 ACE_CDR::ULongLong rtn = 0;
151 helper.get_value(rtn, names);
152 return rtn;
153}
154
155} // namespace DCPS
156} // namespace OpenDDS

Callers 1

read_bitmaskMethod · 0.85

Calls 2

findMethod · 0.45
get_valueMethod · 0.45

Tested by

no test coverage detected