OutputStreamclassoutput.t[197]

Output Stream. This class provides a stream-oriented interface to displaying text on the console. "Stream-oriented" means that we write text as a sequential string of characters.

Output streams are always transient, since they track the system user interface in the interpreter. The interpreter does not save its UI state with a saved position, so objects such as output streams that track the UI state should not be saved either.

class OutputStream :   PreinitObject

Superclass Tree   (in declaration order)

OutputStream
        PreinitObject
                ModuleExecObject
                        object

Subclass Tree  

OutputStream
        BannerOutputStream
        LogConsole
        WebWinOutputStream

Global Objects  

mainOutputStream  menuOutputStream  statusLeftOutputStream  statusRightOutputStream  statusTagOutputStream 

Summary of Properties  

filterList_  justDidPara  justDidParaSuppressor  myInputManager  prefix 

Inherited from PreinitObject :
execBeforeMe  reverseGlobalSymbols 

Inherited from ModuleExecObject :
execAfterMe  hasInitialized_  isDoingExec_  isExecuted_ 

Summary of Methods  

addOutputFilter  addOutputFilterBelow  applyFilters  applyTextFilters  captureOutput  captureOutputIgnoreExit  construct  execute  inputLineEnd  removeOutputFilter  setPrefix  watchForOutput  writeFromStream  writeToStream 

Inherited from ModuleExecObject :
_execute  classExec 

Properties  

filterList_output.t[414]

The list of active filters on this stream, in the order in which they are to be called. This should normally be initialized to a Vector in each instance.

justDidParaoutput.t[534]
Internal state: we just wrote a paragraph break, and there has not yet been any intervening text. By default, we set this to true initially, so that we suppress any paragraph breaks at the very start of the text.

justDidParaSuppressoroutput.t[542]
Internal state: we just wrote a character that suppresses paragraph breaks that immediately follow. In this state, we'll suppress any paragraph marker that immediately follows, but we won't suppress any other characters.

myInputManageroutput.t[373]
my associated input manager, if I have one

prefixoutput.t[545]
Text to be output before anything else

Methods  

addOutputFilter (filter)output.t[424]

Add an output filter. The argument is an object of class OutputFilter, or any object implementing the filterText() method.

Filters are always arranged in a "stack": the last output filter added is the first one called during output. This method thus adds the new filter at the "top" of the stack.

addOutputFilterBelow (newFilter, existingFilter)output.t[439]
Add an output filter at a given point in the filter stack: add the filter so that it is "below" the given existing filter in the stack. This means that the new filter will be called just after the existing filter during output.

If 'existingFilter' isn't in the stack of existing filters, we'll add the new filter at the "top" of the stack.

applyFilters (val)output.t[479]
call the filters

applyTextFilters (val)output.t[499]
Apply the current set of text transformation filters to a string. This applies only the non-capturing filters; we skip any capture filters.

captureOutput (func, [args])output.t[303]
Call the given function, capturing all text output to this stream in the course of the function call. Return a string containing the captured text.

captureOutputIgnoreExit (func, [args])output.t[332]
A Version of captureOutput that ignores an Exit Exception. This can be used to attempt to retrieve the string value of an output filter that threw an exit exeption.

construct ( )output.t[376]
dynamic construction

execute ( )OVERRIDDENoutput.t[386]
execute pre-initialization

inputLineEnd ( )output.t[522]
Receive notification from the input manager that we have just ended reading a line of input from the keyboard.

removeOutputFilter (filter)output.t[465]
Remove an output filter. Since filters are arranged in a stack, only the LAST output filter added may be removed. It's an error to remove a filter other than the last one.

setPrefix (txt)output.t[548]
Set the prefix to txt

watchForOutput (func)output.t[260]
Watch the stream for output. It's sometimes useful to be able to call out to some code and determine whether or not the code generated any text output. This routine invokes the given callback function, monitoring the stream for output; if any occurs, we'll return true, otherwise we'll return nil.

writeFromStream (txt)output.t[407]
Write text out from this stream; this writes to the lower-level stream underlying this stream. This routine is intended to be called only from within this class.

Each output stream is conceptually "stacked" on top of another, lower-level stream. At the bottom of the stack is usually some kind of physical device, such as the display, or a file on disk.

This method must be defined in each subclass to write to the appropriate underlying stream. Most subclasses are specifically designed to sit atop a system-level stream, such as the display output stream, so most implementations of this method will call directly to a system-level output function.

writeToStream (val)output.t[204]
Write a value to the stream. If the value is a string, we'll display the text of the string; if it's nil, we'll ignore it; if it's anything else, we'll try to convert it to a string (with the toString() function) and display the resulting text.

Adv3Lite Library Reference Manual
Generated on 03/07/2024 from adv3Lite version 2.1