__GNU_PBDS::DETAIL::PAT_TRIE_BASE__NODE_CITER(3cxx)

πŸŽ€ NAME πŸŽ€

__gnu_pbds::detail::pat_trie_base::_Node_citer< Node, Leaf, Head, Inode, _CIterator, Iterator, _Alloc > β€” Node const iterator πŸ’…

Bestie, quick heads up: this is a section 3cxx page, and the title at the top of the original gets chopped to __gnu_pbds::de...rator, _Alloc > because the full template name is so long it does not fit. We don't make the rules, we just vibe with them 🫢


✨ SYNOPSIS ✨

#include <pat_trie_base.hpp>

Inherited by __gnu_pbds::detail::pat_trie_base::_Node_iter< Node, Leaf, Head, Inode, _CIterator, Iterator, _Alloc > β€” so like, _Node_iter is literally the child of this class, main character energy runs in the family πŸ‘‘

🌸 Public Types 🌸

  • typedef value_type const_reference β€” the const reference flavor of the value type, no extra notes, it just is ✨
  • typedef trivial_iterator_difference_type difference_type β€” difference type, and yes it's the trivial_iterator kind πŸ¦‹
  • typedef trivial_iterator_tag iterator_category β€” iterator category tag: trivial_iterator_tag. Iconic, lowkey.
  • typedef rebind_traits< _Alloc, metadata_type >::const_reference metadata_const_reference β€” Const metadata reference type.
  • typedef Node::metadata_type metadata_type β€” Metadata type.
  • typedef value_type reference β€” the reference flavor of the value type πŸ’–
  • typedef _Alloc::size_type size_type β€” size type, straight from _Alloc; all sizes live here.
  • typedef _CIterator value_type β€” the value type is _CIterator, no cap.

πŸ¦‹ Public Member Functions πŸ¦‹

  • _Node_citer (node_pointer p_nd=0, a_const_pointer p_traits=0) β€” constructor, and both args come with defaults so you can yeet it into existence with nothing 🫢
  • _Node_citer get_child (size_type i) const β€” Returns a __const node __iterator to the corresponding node's i-th child.
  • metadata_const_reference get_metadata () const β€” Metadata access.
  • size_type num_children () const β€” Returns the number of children in the corresponding node.
  • bool operator!= (const _Node_citer &other) const β€” Compares content (negatively) to a different iterator object.
  • const_reference operator* () const β€” Const access; returns the __const iterator* associated with the current leaf.
  • bool operator== (const _Node_citer &other) const β€” Compares content to a different iterator object.
  • std::pair< a_const_iterator, a_const_iterator > valid_prefix () const β€” Subtree valid prefix.

πŸ’œ Public Attributes πŸ’œ

  • node_pointer m_p_nd β€” the node pointer, out here in public, living its life 🌈
  • a_const_pointer m_p_traits β€” the traits pointer, also public, also thriving ✨

🧚 Protected Types 🧚

  • typedef Node::a_const_iterator a_const_iterator β€” a_const_iterator, straight off Node.
  • typedef Node::a_const_pointer a_const_pointer β€” a_const_pointer, also straight off Node.
  • typedef rebind_traits< _Alloc, Inode >::const_pointer inode_const_pointer β€” const pointer rebind for Inode.
  • typedef rebind_traits< _Alloc, Inode >::pointer inode_pointer β€” pointer rebind for Inode.
  • typedef rebind_traits< _Alloc, Leaf >::const_pointer leaf_const_pointer β€” const pointer rebind for Leaf.
  • typedef rebind_traits< _Alloc, Leaf >::pointer leaf_pointer β€” pointer rebind for Leaf.
  • typedef rebind_traits< _Alloc, Node >::pointer node_pointer β€” pointer rebind for Node. It's giving allocation realness πŸŽ€

🌟 Detailed Description 🌟

template<typename Node, typename Leaf, typename Head, typename Inode,
    typename _CIterator, typename Iterator, typename _Alloc>
    class __gnu_pbds::detail::pat_trie_base::_Node_citer< Node, Leaf, Head,
    Inode, _CIterator, Iterator, _Alloc >"Node const iterator.

Not me pointing out that stray " before Node const iterator. β€” that's verbatim from the docs, bestie, we are preserving the chaos 😭 But yes: the class is __gnu_pbds::detail::pat_trie_base::_Node_citer< Node, Leaf, Head, Inode, _CIterator, Iterator, _Alloc >, and it is, in fact, a Node const iterator.


πŸ’– Member Typedef Documentation πŸ’–

metadata_const_reference

template<typename Node , typename Leaf , typename Head , typename Inode ,
    typename _CIterator , typename Iterator , typename _Alloc > typedef
    rebind_traits<_Alloc,metadata_type>::const_reference
    __gnu_pbds::detail::pat_trie_base::_Node_citer< Node, Leaf, Head, Inode,
    _CIterator, Iterator, _Alloc >::metadata_const_reference

Const metadata reference type. That's the whole story πŸ¦‹

metadata_type

template<typename Node , typename Leaf , typename Head , typename Inode ,
    typename _CIterator , typename Iterator , typename _Alloc > typedef
    Node::metadata_type __gnu_pbds::detail::pat_trie_base::_Node_citer<
    Node, Leaf, Head, Inode, _CIterator, Iterator, _Alloc >::metadata_type

Metadata type. Short, sweet, metadata-coded ✨


πŸ”₯ Member Function Documentation πŸ”₯

get_child

template<typename Node , typename Leaf , typename Head , typename Inode ,
    typename _CIterator , typename Iterator , typename _Alloc > _Node_citer
    __gnu_pbds::detail::pat_trie_base::_Node_citer< Node, Leaf, Head, Inode,
    _CIterator, Iterator, _Alloc >::get_child (size_type i) const [inline]

Returns a __const node __iterator to the corresponding node's i-th child. Hand it an i, get back the child iterator, slay.

References std::advance().

get_metadata

template<typename Node , typename Leaf , typename Head , typename Inode ,
    typename _CIterator , typename Iterator , typename _Alloc >
    metadata_const_reference __gnu_pbds::detail::pat_trie_base::_Node_citer<
    Node, Leaf, Head, Inode, _CIterator, Iterator, _Alloc >::get_metadata ()
    const [inline]

Metadata access. That's it, that's the function πŸ’…

num_children

template<typename Node , typename Leaf , typename Head , typename Inode ,
    typename _CIterator , typename Iterator , typename _Alloc > size_type
    __gnu_pbds::detail::pat_trie_base::_Node_citer< Node, Leaf, Head, Inode,
    _CIterator, Iterator, _Alloc >::num_children () const [inline]

Returns the number of children in the corresponding node.

References std::distance().

Referenced by __gnu_pbds::detail::pat_trie_base::_Node_citer< Node, Leaf, Head, Inode, _CIterator, Iterator, _Alloc >::operator*(), and __gnu_pbds::detail::pat_trie_base::_Node_iter< Node, Leaf, Head, Inode, _CIterator, Iterator, _Alloc >::operator*(). So yeah, both operator*()s are literally leaning on it 🫢

operator!=

template<typename Node , typename Leaf , typename Head , typename Inode ,
    typename _CIterator , typename Iterator , typename _Alloc > bool
    __gnu_pbds::detail::pat_trie_base::_Node_citer< Node, Leaf, Head, Inode,
    _CIterator, Iterator, _Alloc >::operator!= (const _Node_citer< Node,
    Leaf, Head, Inode, _CIterator, Iterator, _Alloc > & other) const
    [inline]

Compares content (negatively) to a different iterator object. Negatively, as in: not equal, bestie πŸ’€

operator*

template<typename Node , typename Leaf , typename Head , typename Inode ,
    typename _CIterator , typename Iterator , typename _Alloc >
    const_reference __gnu_pbds::detail::pat_trie_base::_Node_citer< Node,
    Leaf, Head, Inode, _CIterator, Iterator, _Alloc >::operator* () const
    [inline]

Const access; returns the __const iterator* associated with the current leaf. Dereference and chill 🌸

References __gnu_pbds::detail::pat_trie_base::_Node_citer< Node, Leaf, Head, Inode, _CIterator, Iterator, _Alloc >::num_children().

operator==

template<typename Node , typename Leaf , typename Head , typename Inode ,
    typename _CIterator , typename Iterator , typename _Alloc > bool
    __gnu_pbds::detail::pat_trie_base::_Node_citer< Node, Leaf, Head, Inode,
    _CIterator, Iterator, _Alloc >::operator== (const _Node_citer< Node,
    Leaf, Head, Inode, _CIterator, Iterator, _Alloc > & other) const
    [inline]

Compares content to a different iterator object. Positively this time, we love a healthy comparison ✨

valid_prefix

template<typename Node , typename Leaf , typename Head , typename Inode ,
    typename _CIterator , typename Iterator , typename _Alloc > std::pair<
    a_const_iterator, a_const_iterator >
    __gnu_pbds::detail::pat_trie_base::_Node_citer< Node, Leaf, Head, Inode,
    _CIterator, Iterator, _Alloc >::valid_prefix () const [inline]

Subtree valid prefix. Returns it as a std::pair< a_const_iterator, a_const_iterator >, because of course it's a pair πŸŽ€


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for libstdc++ from the source code.


ngl that's the whole page β€” every typedef, every member function, every protected type, every reference and referenced-by, all accounted for. Nothing cut, nothing invented πŸ’…

Okurrr that's a wrap bestie 🫢 this gem is page __gnu_pbds::de...rator, _Alloc >(3cxx) from the libstdc++ docs β€” Doxygen-generated straight from the source code, footer date and all, so go be iconic with your iterators πŸ’œ