ufe 5.5
Universal Front End is a DCC-agnostic component that will allow a DCC to browse and edit data in multiple data models
Ufe::TrieNode< T > Class Template Reference

#include <trie.h>

Inheritance diagram for Ufe::TrieNode< T >:
Collaboration diagram for Ufe::TrieNode< T >:

Public Types

typedef std::shared_ptr< TrieNodePtr
 

Public Member Functions

 TrieNode (const PathComponent &component)
 
 TrieNode ()
 
Ptr parent () const
 
void add (const Ptr &child)
 
void remove (const Ptr &child)
 
bool contains (const PathComponent &child) const
 
Ptr operator[] (const PathComponent &child) const
 
std::vector< PathComponentchildrenComponents () const
 
std::size_t size () const
 
std::size_t treeSize () const
 
bool empty () const
 
PathComponent component () const
 
void rename (const PathComponent &component)
 
void move (const PathComponent &component, const Ptr &newParent)
 
void setData (const T &data)
 
const T & data () const
 
bool hasData () const
 
int closestCommonAncestor (int depth) const
 

Private Types

typedef std::unordered_map< PathComponent, PtrChildren
 
typedef std::weak_ptr< TrieNodeParentPtr
 

Private Member Functions

void clear ()
 
void clearData ()
 
void setParent (Ptr parent)
 

Private Attributes

PathComponent fComponent
 
ParentPtr fParent
 
Children fChildren
 
bool fHasData
 
fData
 

Friends

class Trie< T >
 

Detailed Description

template<typename T>
class Ufe::TrieNode< T >

Definition at line 41 of file trie.h.

Member Typedef Documentation

◆ Children

template<typename T >
typedef std::unordered_map<PathComponent, Ptr> Ufe::TrieNode< T >::Children
private

Definition at line 100 of file trie.h.

◆ ParentPtr

template<typename T >
typedef std::weak_ptr<TrieNode> Ufe::TrieNode< T >::ParentPtr
private

Definition at line 101 of file trie.h.

◆ Ptr

template<typename T >
typedef std::shared_ptr<TrieNode> Ufe::TrieNode< T >::Ptr

Definition at line 45 of file trie.h.

Constructor & Destructor Documentation

◆ TrieNode() [1/2]

template<typename T >
Ufe::TrieNode< T >::TrieNode ( const PathComponent component)

Definition at line 26 of file trie.imp.h.

◆ TrieNode() [2/2]

template<typename T >
Ufe::TrieNode< T >::TrieNode

Definition at line 32 of file trie.imp.h.

Member Function Documentation

◆ add()

template<typename T >
void Ufe::TrieNode< T >::add ( const Ptr child)

Definition at line 36 of file trie.imp.h.

References UFE_ASSERT_MSG.

Referenced by Ufe::Trie< T >::createNode().

Here is the caller graph for this function:

◆ childrenComponents()

template<typename T >
std::vector< PathComponent > Ufe::TrieNode< T >::childrenComponents

Definition at line 86 of file trie.imp.h.

◆ clear()

template<typename T >
void Ufe::TrieNode< T >::clear
private

Definition at line 58 of file trie.imp.h.

◆ clearData()

template<typename T >
void Ufe::TrieNode< T >::clearData
private

Definition at line 188 of file trie.imp.h.

Referenced by Ufe::Trie< T >::remove().

Here is the caller graph for this function:

◆ closestCommonAncestor()

template<typename T >
int Ufe::TrieNode< T >::closestCommonAncestor ( int  depth) const

Definition at line 98 of file trie.imp.h.

◆ component()

template<typename T >
PathComponent Ufe::TrieNode< T >::component

Definition at line 149 of file trie.imp.h.

◆ contains()

template<typename T >
bool Ufe::TrieNode< T >::contains ( const PathComponent child) const

Definition at line 73 of file trie.imp.h.

◆ data()

template<typename T >
const T & Ufe::TrieNode< T >::data

Definition at line 194 of file trie.imp.h.

◆ empty()

template<typename T >
bool Ufe::TrieNode< T >::empty

Definition at line 143 of file trie.imp.h.

Referenced by Ufe::Trie< T >::cleanUpNode(), and Ufe::Trie< T >::containsDescendantHelper().

Here is the caller graph for this function:

◆ hasData()

template<typename T >
bool Ufe::TrieNode< T >::hasData

Definition at line 200 of file trie.imp.h.

Referenced by Ufe::Trie< T >::cleanUpNode(), Ufe::Trie< T >::containsAncestorHelper(), Ufe::Trie< T >::find(), and Ufe::Trie< T >::remove().

Here is the caller graph for this function:

◆ move()

template<typename T >
void Ufe::TrieNode< T >::move ( const PathComponent component,
const Ptr newParent 
)

Definition at line 167 of file trie.imp.h.

References UFE_ASSERT_MSG.

Referenced by Ufe::Trie< T >::move().

Here is the caller graph for this function:

◆ operator[]()

template<typename T >
TrieNode< T >::Ptr Ufe::TrieNode< T >::operator[] ( const PathComponent child) const

Definition at line 79 of file trie.imp.h.

◆ parent()

template<typename T >
TrieNode< T >::Ptr Ufe::TrieNode< T >::parent

Definition at line 67 of file trie.imp.h.

Referenced by Ufe::Trie< T >::cleanUpNode(), and Ufe::Trie< T >::move().

Here is the caller graph for this function:

◆ remove()

template<typename T >
void Ufe::TrieNode< T >::remove ( const Ptr child)

Definition at line 49 of file trie.imp.h.

References UFE_ASSERT_COMPILED, and UFE_ASSERT_MSG.

Referenced by Ufe::Trie< T >::cleanUpNode().

Here is the caller graph for this function:

◆ rename()

template<typename T >
void Ufe::TrieNode< T >::rename ( const PathComponent component)

Definition at line 155 of file trie.imp.h.

References UFE_ASSERT_MSG.

◆ setData()

template<typename T >
void Ufe::TrieNode< T >::setData ( const T &  data)

Definition at line 181 of file trie.imp.h.

Referenced by Ufe::Trie< T >::add().

Here is the caller graph for this function:

◆ setParent()

template<typename T >
void Ufe::TrieNode< T >::setParent ( Ptr  parent)
private

Definition at line 206 of file trie.imp.h.

◆ size()

template<typename T >
std::size_t Ufe::TrieNode< T >::size

Definition at line 127 of file trie.imp.h.

◆ treeSize()

template<typename T >
std::size_t Ufe::TrieNode< T >::treeSize

Definition at line 133 of file trie.imp.h.

Friends And Related Function Documentation

◆ Trie< T >

template<typename T >
friend class Trie< T >
friend

Definition at line 1 of file trie.h.

Member Data Documentation

◆ fChildren

template<typename T >
Children Ufe::TrieNode< T >::fChildren
private

Definition at line 112 of file trie.h.

◆ fComponent

template<typename T >
PathComponent Ufe::TrieNode< T >::fComponent
private

Definition at line 110 of file trie.h.

◆ fData

template<typename T >
T Ufe::TrieNode< T >::fData
private

Definition at line 114 of file trie.h.

◆ fHasData

template<typename T >
bool Ufe::TrieNode< T >::fHasData
private

Definition at line 113 of file trie.h.

◆ fParent

template<typename T >
ParentPtr Ufe::TrieNode< T >::fParent
private

Definition at line 111 of file trie.h.


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