aboutsummaryrefslogtreecommitdiffstats
path: root/src/io
diff options
context:
space:
mode:
authorNao Pross <naopross@thearcway.org>2018-01-01 18:44:35 +0100
committerNao Pross <naopross@thearcway.org>2018-01-01 18:44:35 +0100
commit7ea534dd1c8bf72200a999cae554d842d9035ba9 (patch)
tree6b2438ea6f7c27c8069458d599bfbf2ba5534ce7 /src/io
parentImplement basic ui (diff)
downloadOrbitingYeti-7ea534dd1c8bf72200a999cae554d842d9035ba9.tar.gz
OrbitingYeti-7ea534dd1c8bf72200a999cae554d842d9035ba9.zip
New StatementDialog, rename diagram classes
Other changes: - Use raw pointer instead of smart pointers to manage resources - Initial Painter implementation
Diffstat (limited to '')
-rw-r--r--src/io/serializer.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/io/serializer.cpp b/src/io/serializer.cpp
index 6ebfa44..82e0f5a 100644
--- a/src/io/serializer.cpp
+++ b/src/io/serializer.cpp
@@ -1,4 +1,7 @@
#include "io/serializer.h"
+#include "diagram/statement.h"
+
+#include "debugtools.h"
Serializer::Serializer()
{
@@ -9,3 +12,31 @@ Serializer::~Serializer()
{
}
+
+bool Serializer::write(const samb::Structogram &structogram, const QFileInfo &into)
+{
+ for (auto it = structogram.begin(); it != structogram.end(); ++it) {
+ switch (it->type) {
+ case samb::Statement::Type::PROCESS:
+ break;
+
+ case samb::Statement::Type::DECISION:
+ case samb::Statement::Type::SWITCH:
+ case samb::Statement::Type::PARALLEL:
+ break;
+
+ case samb::Statement::Type::WHILE:
+ case samb::Statement::Type::UNTIL:
+ break;
+
+ case samb::Statement::Type::SCOPE:
+ break;
+
+ default:
+ debug_err("invalid statement type");
+ break;
+ }
+ }
+
+ return true;
+}