The symbolicstream class is a child class of both the stream and readerprinter classes. The name symbolicstream comes from symbolic stream. The combination of the readerprinter class with the stream class allows reading from a stream and printing to a stream with the parsing and formatting capabilities of the readerprinter . A wwlisp process can hence read and store information or communicate with another process via a pipe with its native syntax. The parser can be customized to interpret specific syntaxes like for example xml or html. Besides the method documented hereafter, all the methods defined in the ancestors stream and readerprinter are available. |
Function Type | subr |
Arguments | the symbol symbolicstream, a mandatory string, a series of optional keywords some followed by values |
Return Value | a stream object |
Description | never call symbolicstream-constructor directly but always through make-instance ; the first argument is the symbol symbolicstream; the second argument is mandatory and gives the filename of the stream; the rest of the arguments are optional keywords: the keyword 'read indicates that the file will be opened in read mode, which is the default mode if the mode is not specified; the keyword 'write specifies write mode; the keyword 'append specifies append mode; if more than one mode keyword is supplied, only the last one is used; the keyword 'update allows updating the file; the keyword 'maxstring followed by an integer gives the size of the input buffer; the keyword 'historysize followed by an integer indicates the length of the keyboard history to be used when the file is a terminal; all the keywords must evaluate to the expected symbols or be quoted to prevent evaluation; symbolicstream-constructor calls the methods stream-constructor and readerprinter-constructor |
Example | (make-instance symbolicstream "myfile.txt" 'read 'update 'maxstring 2048) |
Function Type | subr |
Arguments | a symbolicstream object |
Return Value | t |
Description | never call symbolicstream-destructor directly but always through destroy-instance ; the destructor closes the stream and releases the structures lfile, lreaderprinter and their buffers, by calling stream-destructor and readerprinter-destructor |
Example | (destroy-instance myfile) |