Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

WordBreakTable Class Reference

This class implements a state transition table. More...

#include <wdbktbl.h>

List of all members.

Public Types

typedef TextBoundaryData::Node Node
typedef TextBoundaryData::Type Type

Public Methods

 WordBreakTable (int32_t cols, const Node data[], int32_t data_length)
 Construct a table from the provided data. More...

Node get (Node oldState, Type input) const
 Get the resulting state moving from oldState accepting input. More...

UBool isMarkState (Node state) const
 Checks to see if the transition into the specified state was "marked.". More...

UBool isEndState (Node state) const
 Check to see if the state is the end state. More...

Node initialState (void) const
 Get the initial state. More...


Detailed Description

This class implements a state transition table.

After each transition, using the get method, the new state is returned along with information about the state change (ex. was it a "marked" transition"). For efficiency, none of the arguments to any of these methods are validated.

Definition at line 35 of file wdbktbl.h.


Member Typedef Documentation

typedef TextBoundaryData::Node WordBreakTable::Node
 

Definition at line 38 of file wdbktbl.h.

typedef TextBoundaryData::Type WordBreakTable::Type
 

Definition at line 39 of file wdbktbl.h.


Constructor & Destructor Documentation

WordBreakTable::WordBreakTable ( int32_t cols,
const Node data[],
int32_t data_length )
 

Construct a table from the provided data.

See CharacterBreakData or the other TextBoundaryData subclasses for examples. Each row represents a state, each column within a row represents a transition. The values in the table represent the new state and mark information.

Parameters:
cols   number of columns in the table (transitions)
data   an encoded byte array containing state and transition data
data_length   the length of the byte array data


Member Function Documentation

WordBreakTable::Node WordBreakTable::get ( WordBreakTable::Node oldState,
WordBreakTable::Type input ) const [inline]
 

Get the resulting state moving from oldState accepting input.

Parameters:
oldState   current state
input   input
Returns:
resulting state and transition data

Definition at line 95 of file wdbktbl.h.

WordBreakTable::Node WordBreakTable::initialState ( void ) const [inline]
 

Get the initial state.

Returns:
the initial state

Definition at line 113 of file wdbktbl.h.

UBool WordBreakTable::isEndState ( WordBreakTable::Node state ) const [inline]
 

Check to see if the state is the end state.

Parameters:
state   the state to check
Returns:
true if state is an end state

Definition at line 107 of file wdbktbl.h.

UBool WordBreakTable::isMarkState ( WordBreakTable::Node state ) const [inline]
 

Checks to see if the transition into the specified state was "marked.".

Parameters:
state   the state as returned by get, initialState, or endState
Returns:
true if transition into state was marked.

Definition at line 101 of file wdbktbl.h.


The documentation for this class was generated from the following file:
Generated at Tue Dec 5 17:56:37 2000 for ICU by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000