aboutsummaryrefslogtreecommitdiffstats
path: root/src/io
diff options
context:
space:
mode:
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;
+}