summaryrefslogtreecommitdiffstats
path: root/src/uscxml/plugins/datamodel/ecmascript/Storage.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/uscxml/plugins/datamodel/ecmascript/Storage.h')
-rw-r--r--src/uscxml/plugins/datamodel/ecmascript/Storage.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/uscxml/plugins/datamodel/ecmascript/Storage.h b/src/uscxml/plugins/datamodel/ecmascript/Storage.h
new file mode 100644
index 0000000..7caeb76
--- /dev/null
+++ b/src/uscxml/plugins/datamodel/ecmascript/Storage.h
@@ -0,0 +1,30 @@
+#ifndef STORAGE_H_L672TNX
+#define STORAGE_H_L672TNX
+
+#include <string>
+#include <map>
+#include <fstream>
+#include <istream>
+
+namespace uscxml {
+
+class Storage {
+public:
+ Storage(const std::string& filename);
+ ~Storage();
+
+ unsigned long getLength();
+ std::string key(unsigned long index);
+ std::string getItem(const std::string& key);
+ void setItem(const std::string& key, const std::string& value);
+ void removeItem(const std::string& key);
+ void clear();
+
+protected:
+ std::map<std::string, std::string> _data;
+ std::string _filename;
+};
+
+}
+
+#endif /* end of include guard: STORAGE_H_L672TNX */