diff options
Diffstat (limited to 'src/diagram/iterator.cpp')
-rw-r--r-- | src/diagram/iterator.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/diagram/iterator.cpp b/src/diagram/iterator.cpp new file mode 100644 index 0000000..43085b4 --- /dev/null +++ b/src/diagram/iterator.cpp @@ -0,0 +1,18 @@ +#include "diagram/iterator.h" + +using namespace samb; + +Iterator::Iterator(Statement::Type t, const QString &condition, Statement::pointer next) : + Statement(t, condition, next), + _inner("") +{ + + switch (t) { + case Statement::Type::WHILE: + case Statement::Type::UNTIL: + break; + + default: + throw std::invalid_argument("IteratorStatement can only be of type WHILE or UNTIL"); + } +} |