libbbb  1.2.1
Groups common code used in some applications and libraries.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
bbb::Markup Class Reference

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
 

Detailed Description

Class that manages the conversion of marked-up files.

Member Function Documentation

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.

Parameters
s_file_inputpath to the input file
s_file_outputpath to the output file
s_errorthe error that was generated
Returns
true if succesful, false otherwise
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.

Parameters
s_inputinput string
s_outputoutput string
s_errorthe error that was generated, if any
Returns
true if succesful, false otherwise
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.

Parameters
sThe text to convert
Returns
Converted text

The documentation for this class was generated from the following files: