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

Method parse_class_id

dds/DCPS/security/AccessControlBuiltInImpl.cpp:1528–1563  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1526}
1527
1528void AccessControlBuiltInImpl::parse_class_id(
1529 const std::string& class_id,
1530 std::string & plugin_class_name,
1531 int & major_version,
1532 int & minor_version)
1533{
1534 const std::string delimiter = ":";
1535
1536 major_version = 1;
1537 minor_version = 0;
1538
1539 size_t pos = class_id.find_last_of(delimiter);
1540
1541 if ((pos > 0UL) && (pos != class_id.length() - 1)) {
1542 plugin_class_name = class_id.substr(0, (pos - 1));
1543
1544 const std::string period = ".";
1545
1546 size_t period_pos = class_id.find_last_of(period);
1547
1548 if (period_pos > 0UL) {
1549 std::string mv_string = class_id.substr((pos + 1), (period_pos - 1));
1550
1551 major_version = atoi(mv_string.c_str());
1552
1553 if (period_pos != class_id.length() - 1) {
1554 mv_string = class_id.substr((period_pos + 1), (class_id.length() - 1));
1555 minor_version = atoi(mv_string.c_str());
1556 }
1557 }
1558 }
1559 else {
1560 plugin_class_name.clear();
1561 }
1562
1563}
1564
1565AccessControlBuiltInImpl::RevokePermissions::RevokePermissions(AccessControlBuiltInImpl& impl)
1566 : impl_(impl)

Callers

nothing calls this directly

Calls 2

lengthMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected