Main Page | Modules | Class Hierarchy | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

DefaultLineFilter Class Reference
[Character input filters.]

#import <DefaultLineFilter.h>

Inherits CharacterLineFilter.

Inherited by ANSIDefaultLineFilter, and XTermDefaultLineFilter.

Inheritance diagram for DefaultLineFilter:

Inheritance graph
[legend]
Collaboration diagram for DefaultLineFilter:

Collaboration graph
[legend]

Detailed Description

Base class for default line filters.

This class encompasses behavior common to ANSI and xterm line filters. The default filters behave the same, but the escape and alt-char line filters differ. Subclasses just produce the proper CharacterLineFilter subclasses for those filter types.

Definition at line 15 of file DefaultLineFilter.h.

Public Member Functions

(id) - initWithTerminal:
 Initialize as the default line filter.
(id) - processCharacter:
 Process a character in the manner common to ANSI and xterm terminals.
(CharacterLineFilter *) - escapeLineFilter
 A new instance of the escape-sequence filter handler.
(CharacterLineFilter *) - altCharLineFilter
 A new instance of the alt-sequence filter handler.
(id) - processData: [implementation]
 Process many characters of input.


Member Function Documentation

- (CharacterLineFilter *) altCharLineFilter  
 

A new instance of the alt-sequence filter handler.

Return values:
nil because this class is abstract.

Reimplemented in ANSIDefaultLineFilter, and XTermDefaultLineFilter.

Definition at line 34 of file DefaultLineFilter.m.

Referenced by processCharacter:.

- (CharacterLineFilter *) escapeLineFilter  
 

A new instance of the escape-sequence filter handler.

Return values:
nil because this class is abstract.

Reimplemented in ANSIDefaultLineFilter, and XTermDefaultLineFilter.

Definition at line 33 of file DefaultLineFilter.m.

Referenced by processCharacter:.

- (id) initWithTerminal: (id)  terminal  
 

Initialize as the default line filter.

A DefaultLineFilter has no fallback, so none need be specified, but it must be told of its target terminal.

Parameters:
[in] terminal The target terminal.
Return values:
self The receiver.

Definition at line 27 of file DefaultLineFilter.m.

References CharacterLineFilter::initWithFallback:terminal:.

Here is the call graph for this function:

- (id) processCharacter: (unichar)  aCharacter  
 

Process a character in the manner common to ANSI and xterm terminals.

If an escape or start-alt-char character comes in, the result of escapeLineFilter or altCharLineFilter is returned.

Parameters:
[in] aCharacter A character (expect ISO-Latin-1) from the host.
Return values:
self if the receiver is the next-character handler.
escapeLineFilter if aCharacter was escape.
altCharLineFilter if aCharacter was 0xE.

Reimplemented from CharacterLineFilter.

Definition at line 36 of file DefaultLineFilter.m.

References altCharLineFilter, escapeLineFilter, and CharacterLineFilter::terminalDevice.

Here is the call graph for this function:

- (id) processData: (NSData *)  someData   [implementation]
 

Process many characters of input.

This method iterates through the bytes of the given NSData, sending the first in a processCharacter: message to the receiver, and the succeeding ones to whatever line filter is top.

The filter for the next character is returned, so always update the filter-stack variable with the result of this method.

Parameters:
[in] someData NSData, characters (expect ISO-Latin-1) from the host.
Return values:
self If the next character is to be fed to this filter.
CharacterLineFilter A new filter, falling back to the receiver, if the character changes interpreter state.

Reimplemented from CharacterLineFilter.

Definition at line 76 of file DefaultLineFilter.m.

References length(), and CharacterLineFilter::terminalDevice.

Here is the call graph for this function:


The documentation for this class was generated from the following files:
Generated on Fri Sep 30 12:01:13 2005 for Crescat by  doxygen 1.4.4