DEADSOFTWARE

Rename .ih files to module.ih for simplicity
[odcread.git] / store / store.cc
1 #include "store/module.ih"
3 namespace odc {
5 const std::string Store::TYPENAME("Stores.Store^");
6 const TopTypeProxy<Store> Store::PROXY;
8 Store::Store(INTEGER id): d_id(id) {}
10 INTEGER Store::getId() {
11 return d_id;
12 }
14 const std::string &Store::getTypeName() const {
15 return Store::TYPENAME;
16 }
18 TypePath Store::getTypePath() const {
19 TypePath out;
20 calcTypePath(&out, getTypeName());
21 return out;
22 }
24 void Store::calcTypePath(TypePath *path, const std::string &name) const {
25 const std::string *super = TypeRegister::getInstance().get(name)->getSuper();
26 if (super != 0) {
27 calcTypePath(path, *super);
28 }
29 path->push_back(name);
30 }
32 void Store::internalize(Reader &reader) {
33 reader.readVersion(0, 0);
34 }
36 std::string Store::toString() {
37 return getTypeName();
38 }
40 void Store::accept(Visitor &visitor) const {}
42 const std::string Elem::TYPENAME("Stores.Elem^");
43 const TypeProxy<Elem, Store> Elem::PROXY;
45 Elem::Elem(INTEGER id) : Store(id) {}
47 const std::string &Elem::getTypeName() const {
48 return TYPENAME;
49 }
51 void Elem::internalize(Reader &reader) {
52 Store::internalize(reader);
53 if (reader.isCancelled()) return;
54 reader.readVersion(0, 0);
55 }
57 const std::string Model::TYPENAME("Models.Model^");
58 const TypeProxy<Model, Elem> Model::PROXY;
60 Model::Model(INTEGER id) : Elem(id) {}
62 const std::string &Model::getTypeName() const {
63 return TYPENAME;
64 }
66 void Model::internalize(Reader &reader) {
67 Elem::internalize(reader);
68 if (reader.isCancelled()) return;
69 reader.readVersion(0, 0);
70 }
72 const std::string ContainerModel::TYPENAME("Containers.Model^");
73 const TypeProxy<ContainerModel, Model> ContainerModel::PROXY;
75 ContainerModel::ContainerModel(INTEGER id) : Model(id) {}
77 const std::string &ContainerModel::getTypeName() const {
78 return TYPENAME;
79 }
81 void ContainerModel::internalize(Reader &reader) {
82 Model::internalize(reader);
83 if (reader.isCancelled()) return;
84 reader.readVersion(0, 0);
85 }
87 } // namespace odc