public void AppendChild(byte childGlyph, bool is_leaf, IList <byte> word) { if (nodtype != SearchType_FLAT) { throw new Exception("node type must be FLAT for this operation"); } if (child_glyphs == null) { child_glyphs = new List <GlyphNode>(); } GlyphNode pNewChildNode = GlyphNode.Prepare(childGlyph); child_glyphs.Add(pNewChildNode); if (is_leaf) { pNewChildNode.leaf_word_ref = word; if (leaf_nodes == null) { leaf_nodes = new List <GlyphNode>(); } leaf_nodes.Add(pNewChildNode); } }
public static GlyphNode Prepare(byte newGlyph) { return(GlyphNode.Prepare(newGlyph, ushort.MaxValue, ushort.MaxValue)); }