X-Git-Url: http://deadsoftware.ru/gitweb?p=odcread.git;a=blobdiff_plain;f=store.cc;h=82e20e67c7c1e0dac7cb4a1358706e811057af19;hp=d7db23be164b68e41a7da87834f50e951aed801f;hb=32b22b42cd974e98e8a56f5ac39a51c8990ef57c;hpb=d1698791effc588bc36cf85a28b5131e25ba5a49 diff --git a/store.cc b/store.cc index d7db23b..82e20e6 100644 --- a/store.cc +++ b/store.cc @@ -2,6 +2,24 @@ namespace odc { +template 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() {