ELVE  1
ELVE Logic Visualization Explorer
/home/travis/build/stdgregwar/elve/Core/CommandHistory.h
00001 #pragma once
00002 
00003 #include <string>
00004 #include <vector>
00005 #include <QJsonValue>
00006 
00007 namespace Elve {
00008 
00009 class CommandHistory
00010 {
00011 public:
00012     CommandHistory();
00013     CommandHistory(const QJsonValue& json);
00014     CommandHistory(const CommandHistory& before);
00015     void add(const std::string& cmd);
00016     void pop();
00017     const std::string& last() const;
00018     QJsonValue json() const;
00019 private:
00020     void _addToJson(QJsonArray& jarr) const;
00021     std::vector<std::string> mCmds;
00022 };
00023 
00024 }
 All Classes Functions