Inherits G3D::ReferenceCountedObject.
◆ PrefixTree()
G3D::PrefixTree::PrefixTree |
( |
const String & |
value = "" | ) |
|
◆ ~PrefixTree()
virtual G3D::PrefixTree::~PrefixTree |
( |
| ) |
|
|
virtual |
◆ canHaveChildren()
bool G3D::PrefixTree::canHaveChildren |
( |
| ) |
|
|
protected |
◆ childNodeWithPrefix()
const shared_ptr<PrefixTree> G3D::PrefixTree::childNodeWithPrefix |
( |
const String & |
s | ) |
|
|
protected |
◆ children()
◆ compactJoin()
static void G3D::PrefixTree::compactJoin |
( |
Array< String > & |
elements, |
|
|
String & |
result |
|
) |
| |
|
staticprotected |
◆ compactSplit()
static void G3D::PrefixTree::compactSplit |
( |
const String & |
s, |
|
|
Array< String > & |
result |
|
) |
| |
|
staticprotected |
◆ contains()
bool G3D::PrefixTree::contains |
( |
const String & |
s | ) |
|
◆ create() [1/2]
static shared_ptr<PrefixTree> G3D::PrefixTree::create |
( |
const String & |
s = "" , |
|
|
bool |
cleanUpInput = false |
|
) |
| |
|
inlinestatic |
◆ create() [2/2]
template<class T >
static shared_ptr<PrefixTree> G3D::PrefixTree::create |
( |
const Array< T > & |
elements, |
|
|
bool |
cleanUpInput = false |
|
) |
| |
|
inlinestatic |
◆ createShared()
template<class T , class ... ArgTypes>
static shared_ptr<T> G3D::ReferenceCountedObject::createShared |
( |
ArgTypes &&... |
args | ) |
|
|
inlinestaticprotectedinherited |
Like std::make_shared, but works for protected constructors.
Call as createShared<myclass>.
◆ fillComponents()
Perform input clean up on string s while converting to component array.
◆ getPathToBranch()
String G3D::PrefixTree::getPathToBranch |
( |
shared_ptr< PrefixTree > & |
branchPoint | ) |
|
◆ insert()
void G3D::PrefixTree::insert |
( |
String |
s | ) |
|
◆ isLeaf()
bool G3D::PrefixTree::isLeaf |
( |
| ) |
const |
|
inline |
If the node is a leaf, then its value is the full inserted value.
Roughly, the result of joining all the prefixes on the path to the leaf; specifically, the String that was passed to PrefixTree::insert()
◆ rejectEmptyString()
static void G3D::PrefixTree::rejectEmptyString |
( |
Array< String > & |
elements | ) |
|
|
staticprotected |
Mutates array, omitting elements that are the empty string.
◆ size()
int G3D::PrefixTree::size |
( |
| ) |
const |
|
inline |
◆ value()
const String& G3D::PrefixTree::value |
( |
| ) |
const |
|
inline |
◆ DELIMITER
constexpr char G3D::PrefixTree::DELIMITER = '\31' |
|
staticprotected |
ANSI "item separator".
Referenced by create().
◆ m_children
◆ m_cleanUpInput
bool G3D::PrefixTree::m_cleanUpInput |
|
protected |
If set to true, then we will treat special characters as spaces when creating PrefixTree.
◆ m_size
int G3D::PrefixTree::m_size = 0 |
|
protected |
Number of leaf nodes.
Referenced by size().
◆ m_value
const String G3D::PrefixTree::m_value |
|
protected |