dastrie::itail Class Reference
[DASTrie API]


Detailed Description

A reader class for a tail array.


Public Types

typedef uint8_t element_type
 The type that represents an element of a tail array.
typedef array< element_typecontainer_type
 The container for the tail array.
typedef container_type::size_type size_type
 The type that representing the size of the tail array.

Public Member Functions

 itail ()
 Constructs an instance.
virtual ~itail ()
 Destructs an instance.
 operator bool () const
 Checks whether a tail array is allocated.
void assign (const element_type *ptr, size_type size, bool own=false)
 Initializes the tail array from an existing memory block.
void seekg (size_type offset)
 Moves the read position in the tail array.
size_type tellg () const
 Reports the current read position in the tail array.
size_type strlen () const
 Counts the number of letters in the string from the current position.
bool match_string (const char *str)
 Exact match for the string from the current position.
bool match_string_partial (const char *str)
 Prefix match for the string from the current position.
itailread (void *data, size_t size)
 Gets a byte stream to the tail array.
template<typename value_type>
itailread (value_type &value)
 Gets a value of a basic type from the tail array.

Protected Attributes

container_type m_cont
 The tail array.
size_type m_offset
 The current reading position.


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