Skip site navigation (1)Skip section navigation (2)

  
 
  

home | help
dnsjit.lib.trie.iter(3)     Library Functions Manual	 dnsjit.lib.trie.iter(3)

NAME
     dnsjit.lib.trie.iter - Iterator of the trie.

SYNOPSIS
   Iterate over all trie's key-value pairs
       local trie = require("dnsjit.lib.trie").new("uint64_t")
       local iter = trie:iter()
       local node = iter:node()
       while node ~= nil do
	   local key = node:key()
	   local value = tonumber(node:get())
	   print(key..": "..value)
	   iter:next()
	   node = iter:node()
       end

DESCRIPTION
     Beware  that  iterator  is only valid as long as the trie's key-set remains
     unchanged.

   Functions
     TrieIter.new(trie)
	    Create a new iterator pointing to the first element (if any).

     TrieIter:log()
	    Return the Log object to control logging of this instance or module.

     TrieIter:node()
	    Return the node pointer to by the iterator.  Returns nil when itera-
	    tor has gone past the last element.

     TrieIter:next()
	    Advance the iterator to the next element.

	    Iteration is in ascending lexicographical order.  Empty string would
	    be considered as the very first.

	    You may not use this function if the trie's key-set has  been  modi-
	    fied  during  the lifetime of the iterator (modifying only values is
	    OK).

SEE ALSO
     dnsjit.lib.trie(3),dnsjit.lib.trie.node(3)

AUTHORS and CONTRIBUTORS
     Jerry LundstrA<paragraph>m (DNS-OARC),  TomA!A!  KAAA3/4ek  (CZ.NIC),  Petr
     A paAek (ISC)

     Maintained by DNS-OARC

	    https://www.dns-oarc.net/

BUGS
     For issues and feature requests please use:

	    https://github.com/DNS-OARC/dnsjit/issues

     For question and help please use:

	    admin@dns-oarc.net

dnsjit				      1.4.0		 dnsjit.lib.trie.iter(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=dnsjit.lib.trie.iter&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help