This class is subject to change. Programs using this class may require changes with a new version of VirtualLab.
Class for writing text to a file in an optimized way. A buffer is used to reduce file accesses, which speeds up the text writing.
More...
|
|
virtual void | EndFile () |
| | Writes the buffer to the file, ends the file and closes all open ressources (e.g. the file stream).
|
| |
| | TextWriterFileHandler (string fileName, string headerInformation="") |
| | Standard constructor. More...
|
| |
| void | Write (string lineString) |
| | Method to write a string to the file specified in the constructor. If you want to write multiple lines at once, you can also use this method and separate the lines with "\r\n". More...
|
| |
| void | WriteLine (string lineString) |
| | Method to write a complete line to the file specified in the constructor. More...
|
| |
|
|
const int | BufferSize |
| | Constant that defines the size of the buffer (in bytes, approximately the number of written characters). If the buffer is full, all data in the buffer is written to the file and the buffer is cleared. In this way, file accesses are reduced which increases the performance.
|
| |
This class is subject to change. Programs using this class may require changes with a new version of VirtualLab.
Class for writing text to a file in an optimized way. A buffer is used to reduce file accesses, which speeds up the text writing.
◆ TextWriterFileHandler()
Standard constructor.
- Parameters
-
| fileName | The name of the file to which text shall be written. |
| headerInformation | Optional header information which shall be written in the text file. |
◆ Write()
| void Write |
( |
string |
lineString | ) |
|
Method to write a string to the file specified in the constructor. If you want to write multiple lines at once, you can also use this method and separate the lines with "\r\n".
- Parameters
-
| lineString | The string to write. |
◆ WriteLine()
| void WriteLine |
( |
string |
lineString | ) |
|
Method to write a complete line to the file specified in the constructor.
- Parameters
-
| lineString | The string to write. |