From 35f63f671e51b23dd1e2209725fa41c9d8ca08fa Mon Sep 17 00:00:00 2001 From: Gert van Valkenhoef Date: Wed, 16 Nov 2011 20:05:35 +0000 Subject: [PATCH] Split store --- store/Make.inc | 2 +- store/containerModel.cc | 20 ++++++++++++++++++ store/elem.cc | 20 ++++++++++++++++++ store/model.cc | 20 ++++++++++++++++++ store/store.cc | 45 ----------------------------------------- 5 files changed, 61 insertions(+), 46 deletions(-) create mode 100644 store/containerModel.cc create mode 100644 store/elem.cc create mode 100644 store/model.cc diff --git a/store/Make.inc b/store/Make.inc index 0316a57..f77bb5f 100644 --- a/store/Make.inc +++ b/store/Make.inc @@ -1 +1 @@ -SRCS += store/store.cc +SRCS += $(wildcard store/*.cc) diff --git a/store/containerModel.cc b/store/containerModel.cc new file mode 100644 index 0000000..6ae0196 --- /dev/null +++ b/store/containerModel.cc @@ -0,0 +1,20 @@ +#include "store/module.ih" + +namespace odc { + +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 diff --git a/store/elem.cc b/store/elem.cc new file mode 100644 index 0000000..f1495d9 --- /dev/null +++ b/store/elem.cc @@ -0,0 +1,20 @@ +#include "store/module.ih" + +namespace odc { + +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); +} + +} // namespace odc diff --git a/store/model.cc b/store/model.cc new file mode 100644 index 0000000..9a689d0 --- /dev/null +++ b/store/model.cc @@ -0,0 +1,20 @@ +#include "store/module.ih" + +namespace odc { + +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); +} + +} // namespace odc diff --git a/store/store.cc b/store/store.cc index e9dbb93..69ca4f8 100644 --- a/store/store.cc +++ b/store/store.cc @@ -39,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 -- 2.29.2