HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_ARTMap< T > Class Template Reference

A simple radix tree implementation. More...

#include <UT_ARTMap.h>

Public Types

using iterator = UT_ARTIterator< T >
 
using key_type = UT_StringHolder
 
using mapped_type = T
 
using const_iterator = const iterator
 

Public Member Functions

 UT_ARTMap ()
 
 UT_NON_COPYABLE (UT_ARTMap)
 
 ~UT_ARTMap ()
 
std::pair< iterator, bool > insert (const UT_StringHolder &name, const T &data, bool allow_partial=false)
 Insert a node. More...
 
std::pair< iterator, bool > insert (const UT_StringHolder &name, T &&value, bool allow_partial=false)
 
template<typename... Args>
std::pair< iterator, bool > emplace (const UT_StringHolder &name, Args &&...args)
 
std::enable_if_t
< std::is_default_constructible_v
< T >, T & > 
operator[] (const UT_StringHolder &key)
 
std::enable_if_t
< std::is_default_constructible_v
< T >, T & > 
operator[] (UT_StringHolder &&key)
 
SYS_NO_DISCARD_RESULT iterator find (UT_StringView prefix) const
 Find the node based on the provided prefix. More...
 
SYS_NO_DISCARD_RESULT bool contains (const UT_StringHolder &prefix) const
 Check if the tree contains the provided string. More...
 
void debug (UT_WorkBuffer &wbuf) const
 Write out the tree into the work buffer. This is pretty printed. More...
 
bool erase (const UT_StringRef &prefix)
 
void clear ()
 Clear out the tree. More...
 
SYS_NO_DISCARD_RESULT bool isEmpty () const
 
SYS_NO_DISCARD_RESULT
const_iterator 
begin () const
 
SYS_NO_DISCARD_RESULT iterator begin ()
 
SYS_NO_DISCARD_RESULT
const_iterator 
end () const
 
SYS_NO_DISCARD_RESULT iterator end ()
 
SYS_NO_DISCARD_RESULT
const_iterator 
cbegin () const
 
SYS_NO_DISCARD_RESULT
const_iterator 
cend () const
 

Detailed Description

template<typename T>
class UT_ARTMap< T >

A simple radix tree implementation.

Definition at line 54 of file UT_ARTMap.h.

Member Typedef Documentation

template<typename T >
using UT_ARTMap< T >::const_iterator = const iterator

Definition at line 855 of file UT_ARTMap.h.

template<typename T >
using UT_ARTMap< T >::iterator = UT_ARTIterator<T>

Definition at line 673 of file UT_ARTMap.h.

template<typename T >
using UT_ARTMap< T >::key_type = UT_StringHolder

Definition at line 674 of file UT_ARTMap.h.

template<typename T >
using UT_ARTMap< T >::mapped_type = T

Definition at line 675 of file UT_ARTMap.h.

Constructor & Destructor Documentation

template<typename T >
UT_ARTMap< T >::UT_ARTMap ( )
inline

Definition at line 685 of file UT_ARTMap.h.

template<typename T >
UT_ARTMap< T >::~UT_ARTMap ( )
inline

Definition at line 693 of file UT_ARTMap.h.

Member Function Documentation

template<typename T >
SYS_NO_DISCARD_RESULT const_iterator UT_ARTMap< T >::begin ( void  ) const
inline

Definition at line 856 of file UT_ARTMap.h.

template<typename T >
SYS_NO_DISCARD_RESULT iterator UT_ARTMap< T >::begin ( void  )
inline

Definition at line 861 of file UT_ARTMap.h.

template<typename T >
SYS_NO_DISCARD_RESULT const_iterator UT_ARTMap< T >::cbegin ( ) const
inline

Definition at line 867 of file UT_ARTMap.h.

template<typename T >
SYS_NO_DISCARD_RESULT const_iterator UT_ARTMap< T >::cend ( ) const
inline

Definition at line 868 of file UT_ARTMap.h.

template<typename T >
void UT_ARTMap< T >::clear ( void  )
inline

Clear out the tree.

Definition at line 836 of file UT_ARTMap.h.

template<typename T >
SYS_NO_DISCARD_RESULT bool UT_ARTMap< T >::contains ( const UT_StringHolder prefix) const
inline

Check if the tree contains the provided string.

Definition at line 818 of file UT_ARTMap.h.

template<typename T >
void UT_ARTMap< T >::debug ( UT_WorkBuffer wbuf) const
inline

Write out the tree into the work buffer. This is pretty printed.

Definition at line 824 of file UT_ARTMap.h.

template<typename T >
template<typename... Args>
std::pair<iterator, bool> UT_ARTMap< T >::emplace ( const UT_StringHolder name,
Args &&...  args 
)
inline

Definition at line 722 of file UT_ARTMap.h.

template<typename T >
SYS_NO_DISCARD_RESULT const_iterator UT_ARTMap< T >::end ( void  ) const
inline

Definition at line 865 of file UT_ARTMap.h.

template<typename T >
SYS_NO_DISCARD_RESULT iterator UT_ARTMap< T >::end ( void  )
inline

Definition at line 866 of file UT_ARTMap.h.

template<typename T >
bool UT_ARTMap< T >::erase ( const UT_StringRef prefix)
inline

Definition at line 830 of file UT_ARTMap.h.

template<typename T >
SYS_NO_DISCARD_RESULT iterator UT_ARTMap< T >::find ( UT_StringView  prefix) const
inline

Find the node based on the provided prefix.

Definition at line 760 of file UT_ARTMap.h.

template<typename T >
std::pair<iterator, bool> UT_ARTMap< T >::insert ( const UT_StringHolder name,
const T data,
bool  allow_partial = false 
)
inline

Insert a node.

Definition at line 705 of file UT_ARTMap.h.

template<typename T >
std::pair<iterator, bool> UT_ARTMap< T >::insert ( const UT_StringHolder name,
T &&  value,
bool  allow_partial = false 
)
inline

Definition at line 713 of file UT_ARTMap.h.

template<typename T >
SYS_NO_DISCARD_RESULT bool UT_ARTMap< T >::isEmpty ( ) const
inline

Definition at line 850 of file UT_ARTMap.h.

template<typename T >
std::enable_if_t<std::is_default_constructible_v<T>, T&> UT_ARTMap< T >::operator[] ( const UT_StringHolder key)
inline

Definition at line 731 of file UT_ARTMap.h.

template<typename T >
std::enable_if_t<std::is_default_constructible_v<T>, T&> UT_ARTMap< T >::operator[] ( UT_StringHolder &&  key)
inline

Definition at line 745 of file UT_ARTMap.h.

template<typename T >
UT_ARTMap< T >::UT_NON_COPYABLE ( UT_ARTMap< T )

The documentation for this class was generated from the following file: