8#ifndef INCLUDED_BALL_CATEGORYMANAGER_RADIXTREE
9#define INCLUDED_BALL_CATEGORYMANAGER_RADIXTREE
179#include <balscm_version.h>
193#include <bsl_cstddef.h>
194#include <bsl_functional.h>
195#include <bsl_iostream.h>
197#include <bsl_optional.h>
198#include <bsl_string.h>
199#include <bsl_string_view.h>
200#include <bsl_utility.h>
201#include <bsl_vector.h>
203#if BSLS_COMPILERFEATURES_SIMULATE_CPP11_FEATURES
209# define COMPILING_BALL_CATEGORYMANAGER_RADIXTREE_H
211# undef COMPILING_BALL_CATEGORYMANAGER_RADIXTREE_H
230template <
class t_VALUE>
359template <
class t_VALUE>
365template <
class t_VALUE>
379template <
class t_VALUE>
433template <
class t_VALUE>
465#if !BSLS_COMPILERFEATURES_SIMULATE_CPP11_FEATURES
472 template <
class... Args>
506 void cleanupChildAfterErase(
508 typename Node::Children::iterator it,
520 template <
class t_FUNCTOR>
521 static void forEachImp(
const Node *node,
523 const t_FUNCTOR& functor);
530 template <
class t_FUNCTOR>
531 static void forEachImp(
Node *node,
533 const t_FUNCTOR& functor);
540 template <
class t_FUNCTOR>
543 const t_FUNCTOR& functor);
550 template <
class t_FUNCTOR>
553 const t_FUNCTOR& functor);
560 static void printNodeImp(bsl::ostream& stream,
573 template <
class t_TYPE>
577 template <
class t_TYPE>
638#if !BSLS_COMPILERFEATURES_SIMULATE_CPP11_FEATURES
647 template <
class... Args>
697 template <
class t_FUNCTOR>
706 template <
class t_FUNCTOR>
708 const t_FUNCTOR& functor);
758 template <
class t_FUNCTOR>
767 template <
class t_FUNCTOR>
769 const t_FUNCTOR& functor)
const;
786 int spacesPerLevel = 4)
const;
806template <
class t_VALUE>
814template <
class t_VALUE>
823template <
class t_VALUE>
836template <
class t_VALUE>
849template <
class t_VALUE>
855 d_parent_p->children().erase(d_child);
860template <
class t_VALUE>
872template <
class t_VALUE>
877: d_prefix(prefix, allocator)
879, d_children(allocator)
883template <
class t_VALUE>
887: d_prefix(original.d_prefix)
889, d_children(original.d_children)
893template <
class t_VALUE>
898: d_prefix(original.d_prefix, allocator)
899, d_value(original.d_value, allocator)
900, d_children(original.d_children, allocator)
904template <
class t_VALUE>
920template <
class t_VALUE>
925: d_prefix(
bslmf::MovableRefUtil::move(
926 bslmf::MovableRefUtil::access(original).d_prefix),
928, d_value(
bslmf::MovableRefUtil::move(
929 bslmf::MovableRefUtil::access(original).d_value),
931, d_children(
bslmf::MovableRefUtil::move(
932 bslmf::MovableRefUtil::access(original).d_children),
938template <
class t_VALUE>
952template <
class t_VALUE>
959 if (
this != &lvalue) {
973template <
class t_VALUE>
981template <
class t_VALUE>
988template <
class t_VALUE>
1000template <
class t_VALUE>
1008template <
class t_VALUE>
1016template <
class t_VALUE>
1023template <
class t_VALUE>
1033template <
class t_VALUE>
1046#if !BSLS_COMPILERFEATURES_SIMULATE_CPP11_FEATURES
1047template <
class t_VALUE>
1048template <
class... Args>
1057 if (remainingKey.
empty()) {
1058 if (node->value().has_value()) {
1059 return EmplaceResult(
false, node->value().value());
1061 node->value().emplace(std::forward<Args>(args)...);
1062 return EmplaceResult(
true, node->value().value());
1065 const char firstChar = remainingKey[0];
1066 typename Node::Children::iterator it = node->children().
find(firstChar);
1068 if (it == node->children().end()) {
1070 typename Node::Children::iterator iter =
1071 node->children().emplace(firstChar, remainingKey).first;
1072 ChildNodeGuard guard(node, iter);
1073 iter->second.value().emplace(std::forward<Args>(args)...);
1075 return EmplaceResult(
true, iter->second.value().value());
1078 Node& child = it->second;
1082 size_type minLen = bsl::min(remainingKey.
size(), childPrefix.
size());
1084 bsl::mismatch(remainingKey.
begin(),
1085 remainingKey.
begin() + minLen,
1086 childPrefix.
begin())
1088 const size_type commonLen = mismatchPos - remainingKey.
begin();
1090 if (commonLen == childPrefix.
size()) {
1092 return emplaceImp(&child,
1093 remainingKey.
substr(commonLen),
1094 std::forward<Args>(args)...);
1099 Node splitNode(childPrefix.
substr(0, commonLen), get_allocator());
1105 Node childCopy(child, get_allocator());
1106 childCopy.prefix() = childPrefix.
substr(commonLen);
1109 splitNode.children().emplace(childCopy.prefix()[0],
1112 if (commonLen == remainingKey.
size()) {
1114 splitNode.value().emplace(std::forward<Args>(args)...);
1119 return EmplaceResult(
true,
1120 it->second.value().value());
1125 const typename Node::Children::iterator newIter =
1126 splitNode.children().emplace(newKey[0], newKey).first;
1127 newIter->second.value().emplace(std::forward<Args>(args)...);
1131 return EmplaceResult(
true, newIter->second.value().value());
1135template <
class t_VALUE>
1137CategoryManager_RadixTree<t_VALUE>::eraseAllChildren(
1138 typename CategoryManager_RadixTree<t_VALUE>::Node *node)
1142 size_type count = 0;
1144 typedef typename Node::Children::iterator Iter;
1145 for (Iter it = node->children().begin();
1146 it != node->children().end(); ) {
1147 count += eraseAllChildren(&it->second);
1148 if (it->second.value().has_value()) {
1149 it->second.value().reset();
1153 it = node->children().erase(it);
1159template <
class t_VALUE>
1160void CategoryManager_RadixTree<t_VALUE>::cleanupChildAfterErase(
1162 typename Node::Children::iterator it,
1167 Node& child = it->second;
1169 if (!child.value().has_value() && child.children().empty()) {
1171 node->children().erase(it);
1173 else if (!child.value().has_value() && child.children().size() == 1) {
1176 const typename Node::Children::iterator grandIt =
1177 child.children().begin();
1178 Node& grandchild = grandIt->second;
1181 bsl::string mergedPrefix(child.prefix() + grandchild.prefix(),
1185 Node mergedNode(mergedPrefix, get_allocator());
1187 mergedNode.children() =
1191 node->children().erase(it);
1192 node->children().emplace(firstChar,
1197template <
class t_VALUE>
1198bool CategoryManager_RadixTree<t_VALUE>::eraseImp(
1204 if (remainingKey.
empty()) {
1205 if (!node->value().has_value()) {
1208 node->value().reset();
1212 const char firstChar = remainingKey[0];
1213 typename Node::Children::iterator it = node->children().
find(firstChar);
1215 if (it == node->children().end()) {
1219 Node& child = it->second;
1227 const bool erased = eraseImp(&child,
1235 cleanupChildAfterErase(node, it, firstChar);
1240template <
class t_VALUE>
1242CategoryManager_RadixTree<t_VALUE>::erasePrefixImp(
1248 if (remainingPrefix.
empty()) {
1250 size_type count = 0;
1253 if (node->value().has_value()) {
1254 node->value().reset();
1260 typedef typename Node::Children::iterator Iter;
1261 for (Iter it = node->children().begin();
1262 it != node->children().end();
1264 count += erasePrefixImp(&it->second,
"");
1267 node->children().clear();
1272 const char firstChar = remainingPrefix[0];
1273 const typename Node::Children::iterator it =
1274 node->children().
find(firstChar);
1276 if (it == node->children().end()) {
1280 Node& child = it->second;
1285 const size_type count =
1286 erasePrefixImp(&child,
1290 cleanupChildAfterErase(node, it, firstChar);
1294 else if (childPrefix.
starts_with(remainingPrefix)) {
1296 const size_type count = erasePrefixImp(&child,
"");
1297 node->children().erase(it);
1305template <
class t_VALUE>
1306template <
class t_FUNCTOR>
1308CategoryManager_RadixTree<t_VALUE>::forEachImp(
1311 const t_FUNCTOR& functor)
1318 const bsl::string fullKey = keyPrefix + node->prefix();
1321 if (node->value().has_value()) {
1322 functor(fullKey, node->value().value());
1326 typedef typename Node::Children::const_iterator ConstIter;
1327 for (ConstIter it = node->children().begin();
1328 it != node->children().end();
1330 forEachImp(&it->second, fullKey, functor);
1334template <
class t_VALUE>
1335template <
class t_FUNCTOR>
1337CategoryManager_RadixTree<t_VALUE>::forEachImp(
1340 const t_FUNCTOR& functor)
1347 const bsl::string fullKey = keyPrefix + node->prefix();
1350 if (node->value().has_value()) {
1351 functor(fullKey, node->value().value());
1355 typedef typename Node::Children::iterator Iter;
1356 for (Iter it = node->children().begin();
1357 it != node->children().end();
1359 forEachImp(&it->second, fullKey, functor);
1363template <
class t_VALUE>
1364template <
class t_FUNCTOR>
1366CategoryManager_RadixTree<t_VALUE>::forEachPrefixImp(
1369 const t_FUNCTOR& functor)
1373 size_type count = 0;
1376 if (node->value()) {
1377 functor(key, *node->value());
1382 typedef typename Node::Children::iterator Iter;
1383 for (Iter it = node->children().begin();
1384 it != node->children().end();
1386 const bsl::string nextKey = key + it->second.prefix();
1387 count += forEachPrefixImp(&it->second, nextKey, functor);
1393template <
class t_VALUE>
1394template <
class t_FUNCTOR>
1396CategoryManager_RadixTree<t_VALUE>::forEachPrefixImp(
1399 const t_FUNCTOR& functor)
1403 size_type count = 0;
1406 if (node->value()) {
1407 functor(key, *node->value());
1412 typedef typename Node::Children::const_iterator Iter;
1413 for (Iter it = node->children().begin();
1414 it != node->children().end();
1416 const bsl::string nextKey = key + it->second.prefix();
1417 count += forEachPrefixImp(&it->second, nextKey, functor);
1423template <
class t_VALUE>
1425CategoryManager_RadixTree<t_VALUE>::printNodeImp(
1426 bsl::ostream& stream,
1435 const bool noFirstLineIndent = (currLevel < 0);
1436 const bool singleLineMode = (spacesPerLevel < 0);
1438 const int absLevel = noFirstLineIndent ? -currLevel : currLevel;
1439 const int absSpacesPerLevel = singleLineMode
1443 if (!noFirstLineIndent) {
1444 stream <<
bsl::string(absLevel * absSpacesPerLevel,
' ');
1447 if (singleLineMode) {
1448 stream <<
'{' << depth <<
"} ";
1451 stream <<
'"' << keyPrefix <<
'"';
1452 if (node->value().has_value()) {
1454 stream << node->value().value();
1457 stream <<
": **NO-VALUE**";
1460 stream << (singleLineMode ?
' ' :
'\n');
1462 const int nextLevel = absLevel + 1;
1464 typedef typename Node::Children::const_iterator Iter;
1465 for (Iter it = node->children().begin();
1466 it != node->children().end();
1468 printNodeImp(stream,
1471 keyPrefix + it->second.prefix(),
1472 singleLineMode ? -nextLevel : nextLevel,
1478template <
class t_VALUE>
1488template <
class t_VALUE>
1492: d_root(
"", allocator)
1499template <
class t_VALUE>
1504: d_root(original.d_root, allocator)
1505, d_size(original.d_size)
1509template <
class t_VALUE>
1522template <
class t_VALUE>
1527: d_root(
bslmf::MovableRefUtil::move(
1528 bslmf::MovableRefUtil::access(original).d_root),
1530, d_size(
bslmf::MovableRefUtil::move(
1531 bslmf::MovableRefUtil::access(original).d_size))
1539template <
class t_VALUE>
1552template <
class t_VALUE>
1559 if (
this != &lvalue) {
1573#if !BSLS_COMPILERFEATURES_SIMULATE_CPP11_FEATURES
1574template <
class t_VALUE>
1575template <
class... Args>
1582 std::forward<Args>(args)...);
1590template <
class t_VALUE>
1595 d_root.
value().reset();
1599template <
class t_VALUE>
1602 const bool erased = eraseImp(&d_root, key);
1609template <
class t_VALUE>
1614 Node *node = &d_root;
1617 while (pos < prefix.
size()) {
1618 typedef typename Node::Children::iterator Iter;
1625 Node &child = it->second;
1627 if (prefix.
substr(pos, childPrefix.
size()) == childPrefix) {
1629 pos += childPrefix.
size();
1635 return eraseAllChildren(node);
1638template <
class t_VALUE>
1643 if (prefix.
empty()) {
1649 return erasePrefixImp(&d_root, prefix);
1652template <
class t_VALUE>
1657 Node *currentNode = &d_root;
1661 if (remainingKey.
empty()) {
1662 return currentNode->
value().has_value()
1668 const typename Node::Children::iterator it =
1675 Node& child = it->second;
1684 currentNode = &child;
1688template <
class t_VALUE>
1702 if (constValue.has_value()) {
1703 *value =
bsl::ref(
const_cast<t_VALUE&
>(constValue.value().get()));
1711template <
class t_VALUE>
1712template <
class t_FUNCTOR>
1719 forEachImp(&d_root,
"", functor);
1722template <
class t_VALUE>
1723template <
class t_FUNCTOR>
1727 const t_FUNCTOR& functor)
1729 Node *node = &d_root;
1732 while (pos < prefix.
size()) {
1734 typedef typename Node::Children::iterator Iter;
1738 const Node& child = it->second;
1741 while (i < childPrefix.
size()
1742 && pos + i < prefix.
size()
1743 && prefix[pos + i] == childPrefix[i]) {
1746 if (i == childPrefix.
size()) {
1749 keySoFar.
append(childPrefix);
1753 }
else if (i == prefix.
size() - pos) {
1760 return forEachPrefixImp(node, prefix, functor);
1771 return forEachPrefixImp(node, prefix.
substr(0, keySoFar.
size()), functor);
1774template <
class t_VALUE>
1785template <
class t_VALUE>
1791 const Node *currentNode = &d_root;
1795 if (remainingKey.
empty()) {
1796 return currentNode->
value().has_value();
1799 const typename Node::Children::const_iterator it =
1806 const Node& child = it->second;
1815 currentNode = &child;
1819template <
class t_VALUE>
1826 typedef typename Node::Children::const_iterator Iter;
1837 while (!stack.
empty()) {
1853template <
class t_VALUE>
1860template <
class t_VALUE>
1865 const Node *currentNode = &d_root;
1869 if (remainingKey.
empty()) {
1870 return currentNode->
value().has_value()
1876 const typename Node::Children::const_iterator it =
1883 const Node& child = it->second;
1892 currentNode = &child;
1896template <
class t_VALUE>
1903 const Node *node = &d_root;
1910 if (node->
value().has_value()) {
1911 lastMatchedLength = 0;
1915 while (pos < key.
size()) {
1916 typedef typename Node::Children::const_iterator Iter;
1921 const Node& child = it->second;
1924 while (i < childPrefix.
size()
1925 && pos + i < key.
size()
1926 && key[pos + i] == childPrefix[i]) {
1934 if (i < childPrefix.
size()) {
1942 if (node->
value().has_value()) {
1943 lastMatchedLength = matched;
1948 *value = lastValueRef;
1950 return key.
substr(0, lastMatchedLength);
1953template <
class t_VALUE>
1954template <
class t_FUNCTOR>
1962 forEachImp(&d_root,
"", functor);
1965template <
class t_VALUE>
1966template <
class t_FUNCTOR>
1970 const t_FUNCTOR& functor)
const
1972 const Node *node = &d_root;
1976 while (pos < prefix.
size()) {
1978 typedef typename Node::Children::const_iterator Iter;
1982 const Node& child = it->second;
1985 while (i < childPrefix.
size()
1986 && pos + i < prefix.
size()
1987 && prefix[pos + i] == childPrefix[i]) {
1990 if (i == childPrefix.
size()) {
1993 keySoFar.
append(childPrefix);
1997 }
else if (i == prefix.
size() - pos) {
2004 return forEachPrefixImp(node, prefix, functor);
2015 return forEachPrefixImp(node, prefix.
substr(0, keySoFar.
size()), functor);
2018template <
class t_VALUE>
2020 bsl::ostream& stream,
2022 int spacesPerLevel)
const
2024 printNodeImp(stream, 0, &d_root,
"", level, spacesPerLevel);
2028template <
class t_VALUE>
2038template <
class t_VALUE>
2053template <
class t_VALUE>
2055 const CategoryManager_RadixTree_Node<t_VALUE>& rhs)
2057 return lhs.prefix() == rhs.prefix()
2058 && lhs.value() == rhs.value()
2059 && lhs.children() == rhs.children();
2062template <
class t_VALUE>
2065 const CategoryManager_RadixTree_Node<t_VALUE>& rhs)
2076template <
class t_VALUE>
2078 const CategoryManager_RadixTree<t_VALUE>& rhs)
2080 if (
lhs.d_size !=
rhs.d_size) {
2086 return lhs.d_root ==
rhs.d_root;
2089template <
class t_VALUE>
2092 const CategoryManager_RadixTree<t_VALUE>& rhs)
2098template <
class t_VALUE>
2100void ball::swap(CategoryManager_RadixTree<t_VALUE>& a,
2101 CategoryManager_RadixTree<t_VALUE>& b)
Definition ball_categorymanager_radixtree.h:380
void release()
Definition ball_categorymanager_radixtree.h:862
~CategoryManager_RadixTree_ChildNodeGuard()
Definition ball_categorymanager_radixtree.h:852
Node::Children::iterator ChildIterator
Definition ball_categorymanager_radixtree.h:384
CategoryManager_RadixTree_Node< t_VALUE > Node
Definition ball_categorymanager_radixtree.h:383
Definition ball_categorymanager_radixtree.h:231
CategoryManager_RadixTree_Node(bslmf::MovableRef< CategoryManager_RadixTree_Node > original, const allocator_type &allocator)
Definition ball_categorymanager_radixtree.h:922
void swap(CategoryManager_RadixTree_Node &other)
Definition ball_categorymanager_radixtree.h:990
bsl::allocator allocator_type
Definition ball_categorymanager_radixtree.h:251
CategoryManager_RadixTree_Node(const CategoryManager_RadixTree_Node &original, const allocator_type &allocator)
Definition ball_categorymanager_radixtree.h:895
CategoryManager_RadixTree_Node(bslmf::MovableRef< CategoryManager_RadixTree_Node > original) BSLS_KEYWORD_NOEXCEPT
Definition ball_categorymanager_radixtree.h:906
CategoryManager_RadixTree_Node & operator=(bslmf::MovableRef< CategoryManager_RadixTree_Node > rhs)
Definition ball_categorymanager_radixtree.h:955
Children & children()
Definition ball_categorymanager_radixtree.h:976
bsl::optional< t_VALUE > & value()
Definition ball_categorymanager_radixtree.h:1002
CategoryManager_RadixTree_Node(const CategoryManager_RadixTree_Node &original)
Definition ball_categorymanager_radixtree.h:885
const Children & children() const
Definition ball_categorymanager_radixtree.h:1011
bsl::map< char, CategoryManager_RadixTree_Node > Children
Definition ball_categorymanager_radixtree.h:237
allocator_type get_allocator() const
Return the allocator used by this object to supply memory.
Definition ball_categorymanager_radixtree.h:1036
const bsl::string & prefix() const
Definition ball_categorymanager_radixtree.h:1018
CategoryManager_RadixTree_Node(const bsl::string_view &prefix, const allocator_type &allocator=allocator_type())
Definition ball_categorymanager_radixtree.h:874
const bsl::optional< t_VALUE > & value() const
Definition ball_categorymanager_radixtree.h:1026
bsl::string & prefix()
Definition ball_categorymanager_radixtree.h:983
CategoryManager_RadixTree_Node & operator=(const CategoryManager_RadixTree_Node &rhs)
Definition ball_categorymanager_radixtree.h:941
Definition ball_categorymanager_radixtree.h:434
size_type eraseChildrenOfPrefix(const bsl::string_view &prefix)
Definition ball_categorymanager_radixtree.h:1611
void forEach(const t_FUNCTOR &functor) const
Definition ball_categorymanager_radixtree.h:1956
~CategoryManager_RadixTree()=default
Destroy this object.
OptValueRef find(const bsl::string_view &key)
Definition ball_categorymanager_radixtree.h:1654
bsl::optional< bsl::reference_wrapper< t_VALUE > > OptValueRef
Definition ball_categorymanager_radixtree.h:443
bsl::ostream & printNodes(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
Definition ball_categorymanager_radixtree.h:2019
bool empty() const
Return true if this tree contains no entries, and false otherwise.
Definition ball_categorymanager_radixtree.h:1855
OptValueCRef find(const bsl::string_view &key) const
Definition ball_categorymanager_radixtree.h:1862
bsl::size_t size_type
Definition ball_categorymanager_radixtree.h:439
bsl::optional< bsl::reference_wrapper< const t_VALUE > > OptValueCRef
Definition ball_categorymanager_radixtree.h:447
bsl::pair< bool, bsl::reference_wrapper< t_VALUE > > EmplaceResult
Definition ball_categorymanager_radixtree.h:457
void swap(CategoryManager_RadixTree &other)
Definition ball_categorymanager_radixtree.h:1776
t_VALUE value_type
Definition ball_categorymanager_radixtree.h:438
friend void swap(CategoryManager_RadixTree< t_TYPE > &a, CategoryManager_RadixTree< t_TYPE > &b)
CategoryManager_RadixTree(const CategoryManager_RadixTree &original, const allocator_type &allocator=allocator_type())
Definition ball_categorymanager_radixtree.h:1501
CategoryManager_RadixTree(bslmf::MovableRef< CategoryManager_RadixTree > original, const allocator_type &allocator)
Definition ball_categorymanager_radixtree.h:1524
allocator_type get_allocator() const
Definition ball_categorymanager_radixtree.h:2041
void forEach(const t_FUNCTOR &functor)
Definition ball_categorymanager_radixtree.h:1713
void clear()
Definition ball_categorymanager_radixtree.h:1592
friend bool operator==(const CategoryManager_RadixTree< t_TYPE > &, const CategoryManager_RadixTree< t_TYPE > &)
CategoryManager_RadixTree & operator=(const CategoryManager_RadixTree &rhs)
Definition ball_categorymanager_radixtree.h:1542
bsl::string_view findLongestCommonPrefix(OptValueCRef *value, const bsl::string_view &key) const
Definition ball_categorymanager_radixtree.h:1898
size_type forEachPrefix(const bsl::string_view &prefix, const t_FUNCTOR &functor)
Definition ball_categorymanager_radixtree.h:1725
EmplaceResult emplace(const bsl::string_view &key, Args &&... args)
Definition ball_categorymanager_radixtree.h:1577
size_type forEachPrefix(const bsl::string_view &prefix, const t_FUNCTOR &functor) const
Definition ball_categorymanager_radixtree.h:1968
bsl::allocator allocator_type
Definition ball_categorymanager_radixtree.h:437
size_type erasePrefix(const bsl::string_view &prefix)
Definition ball_categorymanager_radixtree.h:1640
CategoryManager_RadixTree(bslmf::MovableRef< CategoryManager_RadixTree > original) BSLS_KEYWORD_NOEXCEPT
Definition ball_categorymanager_radixtree.h:1511
size_type countNodes() const
Definition ball_categorymanager_radixtree.h:1821
bsl::string_view findLongestCommonPrefix(OptValueRef *value, const bsl::string_view &key)
Definition ball_categorymanager_radixtree.h:1691
CategoryManager_RadixTree()
Definition ball_categorymanager_radixtree.h:1480
CategoryManager_RadixTree & operator=(bslmf::MovableRef< CategoryManager_RadixTree > rhs)
Definition ball_categorymanager_radixtree.h:1555
bool erase(const bsl::string_view &key)
Definition ball_categorymanager_radixtree.h:1600
CategoryManager_RadixTree(const allocator_type &allocator)
Definition ball_categorymanager_radixtree.h:1490
bool contains(const bsl::string_view &key) const
Definition ball_categorymanager_radixtree.h:1787
size_type size() const
Return the number of entries in this tree.
Definition ball_categorymanager_radixtree.h:2031
Definition bslma_bslallocator.h:588
Definition bslstl_stringview.h:471
BSLS_KEYWORD_CONSTEXPR_CPP14 size_type find(basic_string_view subview, size_type position=0) const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_stringview.h:2284
BSLS_KEYWORD_CONSTEXPR_CPP17 bool starts_with(basic_string_view subview) const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_stringview.h:2215
BSLS_KEYWORD_CONSTEXPR_CPP14 basic_string_view substr(size_type position=0, size_type numChars=npos) const
Definition bslstl_stringview.h:2027
BSLS_KEYWORD_CONSTEXPR size_type size() const BSLS_KEYWORD_NOEXCEPT
Return the length of this view.
Definition bslstl_stringview.h:1904
const value_type * const_iterator
Definition bslstl_stringview.h:481
BSLS_KEYWORD_CONSTEXPR const_iterator begin() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_stringview.h:1830
BSLS_KEYWORD_CONSTEXPR_CPP14 void remove_prefix(size_type numChars)
Definition bslstl_stringview.h:1800
BSLS_KEYWORD_CONSTEXPR bool empty() const BSLS_KEYWORD_NOEXCEPT
Return true if this view has length 0, and false otherwise.
Definition bslstl_stringview.h:1931
Definition bslstl_string.h:1252
basic_string substr(size_type position=0, size_type numChars=npos) const
Definition bslstl_string.h:8013
size_type size() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_string.h:7292
allocator_type get_allocator() const BSLS_KEYWORD_NOEXCEPT
Return the allocator used by this string to supply memory.
Definition bslstl_string.h:7423
basic_string & append(const basic_string &suffix)
Definition bslstl_string.h:6188
Definition bslstl_map.h:653
allocator_type get_allocator() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_map.h:3949
iterator end() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_map.h:3308
iterator find(const key_type &key)
Definition bslstl_map.h:1885
iterator begin() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_map.h:3300
void clear() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_map.h:3927
Definition bslstl_optional.h:2043
Definition bslstl_pair.h:1280
reference back()
Definition bslstl_vector.h:2932
bool empty() const BSLS_KEYWORD_NOEXCEPT
Return true if this vector has size 0, and false otherwise.
Definition bslstl_vector.h:3034
Definition bslstl_vector.h:1120
void push_back(const VALUE_TYPE &value)
Definition bslstl_vector.h:4343
void pop_back()
Definition bslstl_vector.h:4375
Definition bslalg_constructorproxy.h:376
OBJECT_TYPE & object() BSLS_KEYWORD_NOEXCEPT
Return a reference to the modifiable object held by this proxy.
Definition bslalg_constructorproxy.h:1197
static void swap(T *a, T *b)
Definition bslalg_swaputil.h:182
Definition bslmf_movableref.h:752
#define BSLS_ASSERT(X)
Definition bsls_assert.h:1976
#define BSLS_IDENT(str)
BSLS_IDENT() - insert string into .comment binary segment (if supported)
Definition bsls_ident.h:238
#define BSLS_KEYWORD_DELETED
Definition bsls_keyword.h:651
#define BSLS_KEYWORD_NOEXCEPT
Definition bsls_keyword.h:674
Definition ball_administration.h:214
void swap(CategoryManager_RadixTree< t_VALUE > &a, CategoryManager_RadixTree< t_VALUE > &b)
bool operator!=(const Attribute &lhs, const Attribute &rhs)
bool operator==(const Attribute &lhs, const Attribute &rhs)
reference_wrapper< const T > cref(const T &object)
reference_wrapper< T > ref(T &object)
Return a reference wrapper that represents the specified object.
ALLOCATOR const STRING_VIEW_LIKE_TYPE & rhs
Definition bslstl_string.h:3918
ALLOCATOR & lhs
Definition bslstl_string.h:3917
basic_string< char > string
Definition bslstl_string.h:844
Definition bdlbb_blob.h:579
static MovableRef< t_TYPE > move(t_TYPE &reference) BSLS_KEYWORD_NOEXCEPT
Definition bslmf_movableref.h:1067
static t_TYPE & access(t_TYPE &ref) BSLS_KEYWORD_NOEXCEPT
Definition bslmf_movableref.h:1039