DEADSOFTWARE

Convert typepaths from SHORTCHAR** to TypePath class
[odcread.git] / store.cc
index 51729e1414e56a667e9d3a8c12eb7df32b242788..82e20e67c7c1e0dac7cb4a1358706e811057af19 100644 (file)
--- a/store.cc
+++ b/store.cc
@@ -2,6 +2,30 @@
 
 namespace odc {
 
+template<class T, class A> T join(const A & begin, const A & end, const T &sep) {
+       T result;
+
+       if (begin != end) {
+               A it = begin;
+               result.append(*it);
+               for (++it; it != end; ++it) {
+                       result.append(sep).append(*it);
+               }
+       }
+
+       return result;
+}
+
+std::string TypePath::toString() const {
+       return join(begin(), end(), std::string("->"));
+}
+
+Store::Store(INTEGER id): d_id(id) {}
+
+INTEGER Store::getId() {
+       return d_id;
+}
+
 Domain* Store::getDomain() {
        return 0;
 }