Class that manages the conversion of marked-up files. More...
#include <markup.h>
Inheritance diagram for bbb::Markup:Public Member Functions | |
| Markup (void) | |
| constructor; | |
| virtual | ~Markup (void) |
| destructor; | |
| bool | executeFile (const QString &s_file_script, QString &s_error) |
| executes a script file | |
| bool | convertFile (const QString &s_file_input, const QString &s_file_output, QString &s_error) |
| creates a file from the marked-up source More... | |
| bool | convertString (const QString &s_input, QString &s_output, QString &s_error) |
| creates a file output from the marked-up source input More... | |
| QString | transform (const QString &s_input) |
| converts a marked-up text into a script text More... | |
| void | appendToOutput (const QString &s) |
| append text to the current output buffer | |
| const QString & | output (void) const |
| get current output buffer | |
| void | clearOutput (void) |
| clear current output buffer | |
Protected Attributes | |
| QString | s_temp_output_ |
| temporary storage for output | |
Class that manages the conversion of marked-up files.
| bool Markup::convertFile | ( | const QString & | s_file_input, |
| const QString & | s_file_output, | ||
| QString & | s_error | ||
| ) |
creates a file from the marked-up source
Output file is overwritten if it exists.
| s_file_input | path to the input file |
| s_file_output | path to the output file |
| s_error | the error that was generated |
| bool Markup::convertString | ( | const QString & | s_input, |
| QString & | s_output, | ||
| QString & | s_error | ||
| ) |
creates a file output from the marked-up source input
The input and output are strings; convertFile() uses this method to generate output file content.
| s_input | input string |
| s_output | output string |
| s_error | the error that was generated, if any |
| QString Markup::transform | ( | const QString & | s_input | ) |
converts a marked-up text into a script text
The method simply looks for {{markers}} and places anything outside them in a print( "text" ) statement.
| s | The text to convert |