X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=store%2Fstore.cc;h=69ca4f8c2bb1586a32c3d794a776af8a5b7ac36d;hb=20af5cf9d0da462e5ac34a8512f22107dc8d302c;hp=6f44e8525457c8135b7eafc9c773753fc93a545f;hpb=7c27903f08ee6069172f92415888a825512cba01;p=odcread.git diff --git a/store/store.cc b/store/store.cc index 6f44e85..69ca4f8 100644 --- a/store/store.cc +++ b/store/store.cc @@ -1,30 +1,7 @@ -#include -#include -#include - -#include - +#include "store/module.ih" 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("->")); -} - const std::string Store::TYPENAME("Stores.Store^"); const TopTypeProxy Store::PROXY; @@ -62,49 +39,4 @@ std::string Store::toString() { void Store::accept(Visitor &visitor) const {} -const std::string Elem::TYPENAME("Stores.Elem^"); -const TypeProxy Elem::PROXY; - -Elem::Elem(INTEGER id) : Store(id) {} - -const std::string &Elem::getTypeName() const { - return TYPENAME; -} - -void Elem::internalize(Reader &reader) { - Store::internalize(reader); - if (reader.isCancelled()) return; - reader.readVersion(0, 0); -} - -const std::string Model::TYPENAME("Models.Model^"); -const TypeProxy Model::PROXY; - -Model::Model(INTEGER id) : Elem(id) {} - -const std::string &Model::getTypeName() const { - return TYPENAME; -} - -void Model::internalize(Reader &reader) { - Elem::internalize(reader); - if (reader.isCancelled()) return; - reader.readVersion(0, 0); -} - -const std::string ContainerModel::TYPENAME("Containers.Model^"); -const TypeProxy ContainerModel::PROXY; - -ContainerModel::ContainerModel(INTEGER id) : Model(id) {} - -const std::string &ContainerModel::getTypeName() const { - return TYPENAME; -} - -void ContainerModel::internalize(Reader &reader) { - Model::internalize(reader); - if (reader.isCancelled()) return; - reader.readVersion(0, 0); -} - } // namespace odc