/// <summary>default constructor</summary>
 public TernaryTreeIterator(TernaryTree tt)
 {
     this.tt = tt;
     cur     = -1;
     ns      = new Stack();
     ks      = new StringBuilder();
     Reset();
 }
Ejemplo n.º 2
0
 /// <summary>Default constructor.</summary>
 public HyphenationTree()
 {
     stoplist = new Dictionary <String, IList>(23);
     classmap = new TernaryTree();
     vspace   = new ByteVector();
     // this reserves index 0, which we don't use
     vspace.Alloc(1);
 }
Ejemplo n.º 3
0
        /// <summary>Read hyphenation patterns from an XML file.</summary>
        /// <param name="stream">the InputSource for the file</param>
        /// <param name="name">unique key representing country-language combination</param>
        /// <exception cref="HyphenationException">In case the parsing fails</exception>
        /// <exception cref="iText.Layout.Hyphenation.HyphenationException"/>
        public virtual void LoadPatterns(Stream stream, String name)
        {
            PatternParser pp = new PatternParser(this);

            ivalues = new TernaryTree();
            pp.Parse(stream, name);
            // patterns/values should be now in the tree
            // let's optimize a bit
            TrimToSize();
            vspace.TrimToSize();
            classmap.TrimToSize();
            // get rid of the auxiliary map
            ivalues = null;
        }