1 #line 1 "S:/jenkins/workspace/ufe-full-windows/ufe/include/trie.h" 18 #include <unordered_map> 38 template<
typename T>
class Trie;
41 class TrieNode :
public std::enable_shared_from_this< TrieNode<T> >
45 typedef std::shared_ptr<TrieNode>
Ptr;
55 void add(
const Ptr& child);
56 void remove(
const Ptr& child);
63 std::size_t size()
const;
66 std::size_t treeSize()
const;
77 void setData(
const T& data);
81 const T& data()
const;
90 int closestCommonAncestor(
int depth )
const;
94 typedef std::unordered_map<PathComponent, Ptr>
Children;
102 void setParent(
Ptr parent);
128 Trie& operator=(
const Trie&) =
delete;
142 bool contains(
const Path&
path)
const;
151 bool containsDescendant(
const Path&
path)
const;
156 bool containsAncestor(
const Path&
path)
const;
161 int closestCommonAncestor()
const;
165 std::size_t size()
const;
std::unordered_map< PathComponent, Ptr > Children
Constant string representation with fixed space and O(1) comparison.
Node for Universal Front End trie.
Identify an object or 3D path in the scene.
std::weak_ptr< TrieNode > ParentPtr
std::shared_ptr< TrieNode > Ptr
Path path(const std::string &pathString)