dastrie::trie< value_tmpl, doublearray_traits > Class Template Reference
[DASTrie API]


Detailed Description

template<class value_tmpl, class doublearray_traits = doublearray5_traits>
class dastrie::trie< value_tmpl, doublearray_traits >

Double Array Trie (read-only).

Parameters:
value_tmpl A type that represents a record value.
doublearray_traits A class in which various properties of double-array elements are described.


Public Types

typedef value_tmpl value_type
 A type that represents a record value.
typedef doublearray_traits::element_type element_type
 A type that represents an element of a double array.
typedef doublearray_traits::base_type base_type
 A type that represents a base value in a double array.
typedef doublearray_traits::check_type check_type
 A type that represents a check value in a double array.
typedef array< element_typedoublearray_type
 A type that implements a container of double-array elements.
typedef doublearray_type::size_type size_type
 A type that represents a size.

Public Member Functions

 trie ()
 Constructs an instance.
virtual ~trie ()
 Destructs an instance.
size_type size () const
 Gets the number of records in the trie.
bool in (const char *key)
 Tests if the trie contains a key.
bool find (const char *key, value_type &value)
 Finds a record.
value_type get (const char *key, const value_type &def)
 Gets the value for a key.
prefix_cursor prefix (const char *str)
 Constructs a cursor for prefix match.
void assign (const std::vector< element_type > &da, const otail &tail, const uint8_t *table)
 Assigns a double-array trie from a builder.
size_type assign (const char *block, size_type size)
 Assigns a double-array trie from a memory image.
size_type read (std::istream &is)
 Read a double-array trie from an input stream.

Data Structures

class  exception
 Exception class. More...
class  prefix_cursor
 A cursor clsss for prefix match. More...


Copyright (c) 2002-2008 by Naoaki Okazaki
Mon Nov 10 12:28:35 2008