Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

LineScanner Class Reference

Inheritance diagram for LineScanner:

Scanner IReadable List of all members.

Public Member Functions

void read (IReader r)
bool next (IBuffer buffer)

Private Member Functions

bool next (IBuffer buffer, uint(*scan)(char[]))
uint notFound (Token token, char[] content)

Detailed Description

Eat everything until we reach a newline. Use this with a Reader, where you wish to discard everything else in the current line.

Definition at line 352 of file Tokenizer.d.


Member Function Documentation

void read IReader  r  )  [inline]
 

IReadable interface to support Reader.get()

Reimplemented from IReadable.

Definition at line 360 of file Tokenizer.d.

References IReader::getBuffer(), and next().

bool next IBuffer  buffer  )  [inline]
 

Eat all content until we see a '
' character. The content is simply discarded.

Definition at line 372 of file Tokenizer.d.

References buffer, and IConduit.

Referenced by read().

bool next IBuffer  buffer,
uint(*)(char[])  scan
[inline, inherited]
 

Scan the given IBuffer for another token, and place the results in the provided token. Note that this should be completely thread-safe so one can instantiate singleton tokenizers without issue.

Each Token is expected to be stripped of the delimiter. An end-of-file condition causes trailing content to be placed into the token. Requests made beyond Eof result in empty tokens (length == zero).

Returns true if a token was isolated, false otherwise.

Definition at line 78 of file Tokenizer.d.

References buffer, and IConduit.

uint notFound Token  token,
char[]  content
[inline, inherited]
 

Clean up after we fail to find a token. Trailing content is placed into the token, and the scanner is told to try and load some more content (where available).

Definition at line 120 of file Tokenizer.d.

References IConduit, and Token::set().

Referenced by LineTokenizer::next(), PunctTokenizer::next(), SpaceTokenizer::next(), and SimpleTokenizer::next().


The documentation for this class was generated from the following file:
Generated on Sat Dec 24 17:28:40 2005 for Mango by  doxygen 1.4.0