|
Bond 0.9
Bond Standard Library API Documentation
|
API for performing I/O operations. More...
Namespaces | |
| namespace | Bond::IO |
Classes | |
| struct | Bond::InputStream |
| An abstract interface for performing both unformatted and formatted input operations. More... | |
| struct | Bond::OutputStream |
| An abstract interface for performing both unformatted and formatted output operations. More... | |
Functions | |
| InputStream * | Bond::StdIn () |
| Returns the virtual machine's standard input stream. | |
| OutputStream * | Bond::StdOut () |
| Returns the virtual machine's standard output stream. | |
| OutputStream * | Bond::StdErr () |
| Returns the virtual machine's standard error stream. | |
| InputStream * | Bond::CreateInputStream (const char *fileName) |
| Opens a file for reading. The stream must be freed manually. | |
| InputStream * | Bond::CreateInputStreamCollected (const char *fileName) |
| Opens a file for reading. The stream is closed and freed automatically when the calling function returns. | |
| InputStream * | Bond::CreateInputStreamWithCollector (Collector *collector, const char *fileName) |
| Opens a file for reading. The stream is closed and freed automatically along with a given Collector. | |
| void | Bond::FreeInputStream (InputStream *stream) |
| Closes and frees a stream returned by CreateInputStream. | |
| OutputStream * | Bond::CreateOutputStream (const char *fileName, bool append) |
| Opens a file for writing. The stream must be freed manually. | |
| OutputStream * | Bond::CreateOutputStreamCollected (const char *fileName, bool append) |
| Opens a file for writing. The stream is flushed, closed and freed automatically when the calling function returns. | |
| OutputStream * | Bond::CreateOutputStreamWithCollector (Collector *collector, const char *fileName, bool append) |
| Opens a file for writing. The stream is flushed, closed and freed automatically along with a given Collector. | |
| void | Bond::FreeOutputStream (OutputStream *stream) |
| Flushes, closes and frees a stream returned by CreateOutputStream. | |
API for performing I/O operations.
| InputStream * Bond::CreateInputStream | ( | const char * | fileName | ) |
Opens a file for reading. The stream must be freed manually.
| fileName | The name of the file to open, which is resolved by the virtual machine's stream factory. |
| InputStream * Bond::CreateInputStreamCollected | ( | const char * | fileName | ) |
Opens a file for reading. The stream is closed and freed automatically when the calling function returns.
| fileName | The name of the file to open, which is resolved by the virtual machine's stream factory. |
| InputStream * Bond::CreateInputStreamWithCollector | ( | Collector * | collector, |
| const char * | fileName ) |
Opens a file for reading. The stream is closed and freed automatically along with a given Collector.
| collector | The Collector with which the stream is registered. If null, the Collector of the calling function is used. |
| fileName | The name of the file to open, which is resolved by the virtual machine's stream factory. |
| OutputStream * Bond::CreateOutputStream | ( | const char * | fileName, |
| bool | append ) |
Opens a file for writing. The stream must be freed manually.
| fileName | The name of the file to open, which is resolved by the virtual machine's stream factory. |
| append | Whether output is appended to the end of an existing file. Otherwise, an existing file is truncated. |
| OutputStream * Bond::CreateOutputStreamCollected | ( | const char * | fileName, |
| bool | append ) |
Opens a file for writing. The stream is flushed, closed and freed automatically when the calling function returns.
| fileName | The name of the file to open, which is resolved by the virtual machine's stream factory. |
| append | Whether output is appended to the end of an existing file. Otherwise, an existing file is truncated. |
| OutputStream * Bond::CreateOutputStreamWithCollector | ( | Collector * | collector, |
| const char * | fileName, | ||
| bool | append ) |
Opens a file for writing. The stream is flushed, closed and freed automatically along with a given Collector.
| collector | The Collector with which the stream is registered. If null, the Collector of the calling function is used. |
| fileName | The name of the file to open, which is resolved by the virtual machine's stream factory. |
| append | Whether output is appended to the end of an existing file. Otherwise, an existing file is truncated. |
| void Bond::FreeInputStream | ( | InputStream * | stream | ) |
Closes and frees a stream returned by CreateInputStream.
The stream must not have been returned by StdIn or by one of the collected creation functions.
| stream | The stream to free. |
| void Bond::FreeOutputStream | ( | OutputStream * | stream | ) |
Flushes, closes and frees a stream returned by CreateOutputStream.
The stream must not have been returned by StdOut, StdErr or by one of the collected creation functions.
| stream | The stream to free. |
| OutputStream * Bond::StdErr | ( | ) |
Returns the virtual machine's standard error stream.
This stream must not be passed to the FreeOutputStream function.
| InputStream * Bond::StdIn | ( | ) |
Returns the virtual machine's standard input stream.
This stream must not be passed to the FreeInputStream function.
| OutputStream * Bond::StdOut | ( | ) |
Returns the virtual machine's standard output stream.
This stream must not be passed to the FreeOutputStream function.