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

#include <UT_ARTMap.h>

+ Inheritance diagram for UT_ARTNode< T >:

Public Types

using value_type = T
 

Public Member Functions

 UT_ARTNode (const UT_StringHolder &key, const UT_StringView &prefix)
 
virtual ~UT_ARTNode ()=default
 
 UT_NON_COPYABLE (UT_ARTNode)
 
UT_StringHolder key () const
 
SYS_FORCE_INLINE const value_typevalue () const
 
template<typename... Args>
void emplace (Args &&...args)
 
SYS_FORCE_INLINE value_typevalue ()
 
SYS_FORCE_INLINE bool hasValue () const
 
SYS_FORCE_INLINE const
UT_StringView
prefix () const
 
SYS_FORCE_INLINE bool isLeaf () const
 
virtual bool isFull () const =0
 
SYS_FORCE_INLINE bool allowsPartial () const
 
void setAllowsPartial (bool allow)
 
virtual const UT_StringHoldertype () const =0
 
void debug (UT_WorkBuffer &wbuf, unsigned indent=0) const
 
void compress (UT_ARTNode< T > **ref)
 
virtual UT_ARTNode< T > ** insertChild (UT_ARTNode **ref, UT_ARTNodePtr< UT_ARTNode< T >> node)=0
 
virtual UT_ARTNodePtr
< UT_ARTNode< T > > 
stealChild (UT_ARTNode **ref, UT_ARTNode *child)=0
 
void moveChildren (UT_ARTNode< T > **ref)
 
virtual UT_ARTNode< T > * nextChild (int &idx)=0
 
virtual const UT_ARTNode< T > * nextChild (int &idx) const =0
 
virtual UT_ARTNodePtr
< UT_ARTNode< T > > 
stealChild (UT_ARTNode< T > **ref, int idx)=0
 
exint getCommonPrefixLength (const UT_StringView &key, const UT_StringView &node_prefix)
 
virtual UT_ARTNode< T > ** findPartialPrefixChild (const UT_StringView &prefix)=0
 
void moveHeader (UT_ARTNode< T > &move_to)
 
template<typename NodeT >
UT_ARTNodePtr< NodeT > newNode ()
 

Static Public Member Functions

static void destroy (UT_ARTNode< T > *node)
 

Public Attributes

UT_StringHolder myKey
 
UT_StringView myPrefix
 
UT_Optional< value_typemyValue
 
bool myAllowsPartial = false
 
uint8_t myNumChildren = 0
 

Detailed Description

template<typename T>
class UT_ARTNode< T >

Definition at line 56 of file UT_ARTMap.h.

Member Typedef Documentation

template<typename T>
using UT_ARTNode< T >::value_type = T

Definition at line 73 of file UT_ARTMap.h.

Constructor & Destructor Documentation

template<typename T>
UT_ARTNode< T >::UT_ARTNode ( const UT_StringHolder key,
const UT_StringView prefix 
)
inlineexplicit

Definition at line 75 of file UT_ARTMap.h.

template<typename T>
virtual UT_ARTNode< T >::~UT_ARTNode ( )
virtualdefault

Member Function Documentation

template<typename T>
SYS_FORCE_INLINE bool UT_ARTNode< T >::allowsPartial ( ) const
inline

Definition at line 119 of file UT_ARTMap.h.

template<typename T>
void UT_ARTNode< T >::compress ( UT_ARTNode< T > **  ref)
inline

Compress the current node and its child. Compression happens when this node has no value (edge) and its only child has a value. When this occurs we can move the child up to this node.

Definition at line 154 of file UT_ARTMap.h.

template<typename T>
void UT_ARTNode< T >::debug ( UT_WorkBuffer wbuf,
unsigned  indent = 0 
) const
inline

Definition at line 124 of file UT_ARTMap.h.

template<typename T>
static void UT_ARTNode< T >::destroy ( UT_ARTNode< T > *  node)
inlinestatic

Definition at line 299 of file UT_ARTMap.h.

template<typename T>
template<typename... Args>
void UT_ARTNode< T >::emplace ( Args &&...  args)
inline

Definition at line 102 of file UT_ARTMap.h.

template<typename T>
virtual UT_ARTNode<T>** UT_ARTNode< T >::findPartialPrefixChild ( const UT_StringView prefix)
pure virtual
template<typename T>
exint UT_ARTNode< T >::getCommonPrefixLength ( const UT_StringView key,
const UT_StringView node_prefix 
)
inline

Definition at line 210 of file UT_ARTMap.h.

template<typename T>
SYS_FORCE_INLINE bool UT_ARTNode< T >::hasValue ( ) const
inline

Definition at line 112 of file UT_ARTMap.h.

template<typename T>
virtual UT_ARTNode<T>** UT_ARTNode< T >::insertChild ( UT_ARTNode< T > **  ref,
UT_ARTNodePtr< UT_ARTNode< T >>  node 
)
pure virtual
template<typename T>
virtual bool UT_ARTNode< T >::isFull ( ) const
pure virtual
template<typename T>
SYS_FORCE_INLINE bool UT_ARTNode< T >::isLeaf ( ) const
inline

Definition at line 114 of file UT_ARTMap.h.

template<typename T>
UT_StringHolder UT_ARTNode< T >::key ( ) const
inline

Definition at line 94 of file UT_ARTMap.h.

template<typename T>
void UT_ARTNode< T >::moveChildren ( UT_ARTNode< T > **  ref)
inline

Definition at line 188 of file UT_ARTMap.h.

template<typename T>
void UT_ARTNode< T >::moveHeader ( UT_ARTNode< T > &  move_to)
inline

Definition at line 269 of file UT_ARTMap.h.

template<typename T>
template<typename NodeT >
UT_ARTNodePtr<NodeT> UT_ARTNode< T >::newNode ( )
inline

Definition at line 286 of file UT_ARTMap.h.

template<typename T>
virtual UT_ARTNode<T>* UT_ARTNode< T >::nextChild ( int idx)
pure virtual
template<typename T>
virtual const UT_ARTNode<T>* UT_ARTNode< T >::nextChild ( int idx) const
pure virtual
template<typename T>
SYS_FORCE_INLINE const UT_StringView& UT_ARTNode< T >::prefix ( ) const
inline

Definition at line 113 of file UT_ARTMap.h.

template<typename T>
void UT_ARTNode< T >::setAllowsPartial ( bool  allow)
inline

Definition at line 120 of file UT_ARTMap.h.

template<typename T>
virtual UT_ARTNodePtr<UT_ARTNode<T> > UT_ARTNode< T >::stealChild ( UT_ARTNode< T > **  ref,
UT_ARTNode< T > *  child 
)
pure virtual
template<typename T>
virtual UT_ARTNodePtr<UT_ARTNode<T> > UT_ARTNode< T >::stealChild ( UT_ARTNode< T > **  ref,
int  idx 
)
pure virtual
template<typename T>
virtual const UT_StringHolder& UT_ARTNode< T >::type ( ) const
pure virtual
template<typename T>
UT_ARTNode< T >::UT_NON_COPYABLE ( UT_ARTNode< T )
template<typename T>
SYS_FORCE_INLINE const value_type* UT_ARTNode< T >::value ( ) const
inline

Definition at line 95 of file UT_ARTMap.h.

template<typename T>
SYS_FORCE_INLINE value_type* UT_ARTNode< T >::value ( )
inline

Definition at line 106 of file UT_ARTMap.h.

Member Data Documentation

template<typename T>
bool UT_ARTNode< T >::myAllowsPartial = false

Definition at line 316 of file UT_ARTMap.h.

template<typename T>
UT_StringHolder UT_ARTNode< T >::myKey

Definition at line 311 of file UT_ARTMap.h.

template<typename T>
uint8_t UT_ARTNode< T >::myNumChildren = 0

Definition at line 318 of file UT_ARTMap.h.

template<typename T>
UT_StringView UT_ARTNode< T >::myPrefix

Definition at line 312 of file UT_ARTMap.h.

template<typename T>
UT_Optional<value_type> UT_ARTNode< T >::myValue

Definition at line 313 of file UT_ARTMap.h.


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