X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=store.cc;h=6f44e8525457c8135b7eafc9c773753fc93a545f;hb=7a97d981de20c2e9e9fa27d06f5b2c69ea09de16;hp=c2fd5b4d8696e62da10f8b04b6d4e08488a2a003;hpb=9b0fce2b8ea23e4eb23485421e1d80a774c912b3;p=odcread.git diff --git a/store.cc b/store.cc index c2fd5b4..6f44e85 100644 --- a/store.cc +++ b/store.cc @@ -1,5 +1,6 @@ #include #include +#include #include @@ -25,7 +26,7 @@ std::string TypePath::toString() const { } const std::string Store::TYPENAME("Stores.Store^"); -const TypeProxy Store::PROXY; +const TopTypeProxy Store::PROXY; Store::Store(INTEGER id): d_id(id) {} @@ -33,20 +34,14 @@ INTEGER Store::getId() { return d_id; } -const std::string &Store::getType() { - return Store::TYPENAME; -} - -const std::string *Store::getSuper() { - return 0; -} - const std::string &Store::getTypeName() const { - return Store::getType(); + return Store::TYPENAME; } -void Store::getTypePath(TypePath *out) const { - return calcTypePath(out, getTypeName()); +TypePath Store::getTypePath() const { + TypePath out; + calcTypePath(&out, getTypeName()); + return out; } void Store::calcTypePath(TypePath *path, const std::string &name) const { @@ -65,21 +60,15 @@ std::string Store::toString() { return getTypeName(); } +void Store::accept(Visitor &visitor) const {} + const std::string Elem::TYPENAME("Stores.Elem^"); -const TypeProxy Elem::PROXY; +const TypeProxy Elem::PROXY; Elem::Elem(INTEGER id) : Store(id) {} -const std::string &Elem::getType() { - return TYPENAME; -} - -const std::string *Elem::getSuper() { - return &Store::getType(); -} - const std::string &Elem::getTypeName() const { - return getType(); + return TYPENAME; } void Elem::internalize(Reader &reader) { @@ -89,20 +78,12 @@ void Elem::internalize(Reader &reader) { } const std::string Model::TYPENAME("Models.Model^"); -const TypeProxy Model::PROXY; +const TypeProxy Model::PROXY; Model::Model(INTEGER id) : Elem(id) {} -const std::string &Model::getType() { - return TYPENAME; -} - -const std::string *Model::getSuper() { - return &Elem::getType(); -} - const std::string &Model::getTypeName() const { - return getType(); + return TYPENAME; } void Model::internalize(Reader &reader) { @@ -112,20 +93,12 @@ void Model::internalize(Reader &reader) { } const std::string ContainerModel::TYPENAME("Containers.Model^"); -const TypeProxy ContainerModel::PROXY; +const TypeProxy ContainerModel::PROXY; ContainerModel::ContainerModel(INTEGER id) : Model(id) {} -const std::string &ContainerModel::getType() { - return TYPENAME; -} - -const std::string *ContainerModel::getSuper() { - return &Model::getType(); -} - const std::string &ContainerModel::getTypeName() const { - return getType(); + return TYPENAME; } void ContainerModel::internalize(Reader &reader) {