Wiki_Streams

Stephane Carrez edited this page Mar 6, 2016 · 3 revisions

Wiki input and output streams

Input and Output streams

The Wiki.Streams package defines the interfaces used by the parser or renderer to read and write their outputs.

The Input_Stream interface defines the interface that must be implemented to read the source Wiki content. The Read procedure is called by the parser repeatedly while scanning the Wiki content.

The Output_Stream interface is the interface used by the renderer to write their outpus. It defines the Write procedure to write a single character or a string.

HTML Output Stream

The Wiki.Writers package defines the interfaces used by the renderer to write their outputs.

The Input_Stream interface defines the interface that must be implemented to read the source Wiki content. The Read procedure is called by the parser repeatedly while scanning the Wiki content.

Output Builder Stream

The Output_Builder_Stream is a concrete in-memory output stream. It collects the output in a Wiki.Strings.Bstring object and the content can be retrieved at the end by using the To_String or Iterate operation.

HTML Output Builder Stream

The Html_Output_Builder_Stream type defines a HTML output stream that collects the HTML into expandable buffers. Once the complete HTML document is rendered, the content is retrieved either by the To_String or the Iterate operations.

Text_IO Input and Output streams

The Wiki.Streams.Text_IO package defines the File_Input_Stream and the File_Output_StreamAda.Wide_Wide_Text_IO package to read or write the output streams.

By default the File_Input_Stream is configured to read the standard input. The Open procedure can be used to read from a file knowing its name.

The File_Output_Stream is configured to write on the standard output. The Open and Create procedure can be used to write on a file.

HTML Output Stream

The Wiki.Writers package defines the interfaces used by the renderer to write their outputs.

The Input_Stream interface defines the interface that must be implemented to read the source Wiki content. The Read procedure is called by the parser repeatedly while scanning the Wiki content.


Generated by Dynamo from wiki-streams.ads