This is an example of how to use the inheriters of the KDSME::AbstractExporter class.
#include "config-examples.h"
#include <state.h>
#include <qmlexporter.h>
#include <scxmlexporter.h>
#include <QTextStream>
int main()
{
machine.
setLabel(
"root");
s1.setLabel("s1");
s2.setLabel("s2");
s1.
addSignalTransition(&s2);
qErr <<
"Failed to export to QML:" << qmlExporter.
errorString();
return 1;
}
qOut << "=== Output [QML] ===" << endl;
qOut << qmlOutput << endl;
qOut << endl;
qErr <<
"Failed to export to SCXML:" << scxmlExporter.
errorString();
return 1;
}
qOut << "=== Output [SCXML] ===" << endl;
qOut << scxmlOutput << endl;
qOut << endl;
}