#include <TransformEngine.h>
Public Member Functions | |
| bool | setTemplateString (QString templateString) |
| set the current template string | |
| TransformEngine () | |
| Constructor set up the date and time. | |
| TransformEngine (QDate currentDate, QTime currentTime) | |
| Use this constructor for test purpose only (to fix the date and be able to compare output). | |
| bool | transformToFile (const QJsonObject &data, const QString &filename, bool overwrite=true) |
| transform the current template string using the given data and save it to filename | |
| QString | transformToString (const QString &templateString, const QJsonObject &data) |
| transform the given template using the given data to a string. | |
| TransformEngine::TransformEngine | ( | ) |
Constructor set up the date and time.
Referenced by TransformEngine().
| TransformEngine::TransformEngine | ( | QDate | currentDate, |
| QTime | currentTime ) |
Use this constructor for test purpose only (to fix the date and be able to compare output).
References TransformEngine().
| bool TransformEngine::setTemplateString | ( | QString | templateString | ) |
set the current template string
| bool TransformEngine::transformToFile | ( | const QJsonObject & | data, |
| const QString & | filename, | ||
| bool | overwrite = true ) |
transform the current template string using the given data and save it to filename
| data | QJsonObject that contains the data used to transform the template |
| filename | the filename to use |
| overwrite | if false, the file is not overwritten if it already exists (default: true) |
References transformToString().
| QString TransformEngine::transformToString | ( | const QString & | templateString, |
| const QJsonObject & | data ) |
transform the given template using the given data to a string.
You can use this method as a utility function it does not modify the class attributes apart from temporary loop counters
Referenced by camitk::CppHotPlugAction::CppHotPlugAction(), camitk::HotPlugAction::HotPlugAction(), camitk::HotPlugActionExtension::HotPlugActionExtension(), and transformToFile().