10 template<class T
, class A
> T
join(const A
& begin
, const A
& end
, const T
&sep
) {
16 for (++it
; it
!= end
; ++it
) {
17 result
.append(sep
).append(*it
);
24 std::string
TypePath::toString() const {
25 return join(begin(), end(), std::string("->"));
28 const std::string
Store::TYPENAME("Stores.Store^");
29 const TopTypeProxy
<Store
> Store::PROXY
;
31 Store::Store(INTEGER id
): d_id(id
) {}
33 INTEGER
Store::getId() {
37 const std::string
&Store::getTypeName() const {
38 return Store::TYPENAME
;
41 TypePath
Store::getTypePath() const {
43 calcTypePath(&out
, getTypeName());
47 void Store::calcTypePath(TypePath
*path
, const std::string
&name
) const {
48 const std::string
*super
= TypeRegister::getInstance().get(name
)->getSuper();
50 calcTypePath(path
, *super
);
52 path
->push_back(name
);
55 void Store::internalize(Reader
&reader
) {
56 reader
.readVersion(0, 0);
59 std::string
Store::toString() {
63 void Store::accept(Visitor
&visitor
) const {}
65 const std::string
Elem::TYPENAME("Stores.Elem^");
66 const TypeProxy
<Elem
, Store
> Elem::PROXY
;
68 Elem::Elem(INTEGER id
) : Store(id
) {}
70 const std::string
&Elem::getTypeName() const {
74 void Elem::internalize(Reader
&reader
) {
75 Store::internalize(reader
);
76 if (reader
.isCancelled()) return;
77 reader
.readVersion(0, 0);
80 const std::string
Model::TYPENAME("Models.Model^");
81 const TypeProxy
<Model
, Elem
> Model::PROXY
;
83 Model::Model(INTEGER id
) : Elem(id
) {}
85 const std::string
&Model::getTypeName() const {
89 void Model::internalize(Reader
&reader
) {
90 Elem::internalize(reader
);
91 if (reader
.isCancelled()) return;
92 reader
.readVersion(0, 0);
95 const std::string
ContainerModel::TYPENAME("Containers.Model^");
96 const TypeProxy
<ContainerModel
, Model
> ContainerModel::PROXY
;
98 ContainerModel::ContainerModel(INTEGER id
) : Model(id
) {}
100 const std::string
&ContainerModel::getTypeName() const {
104 void ContainerModel::internalize(Reader
&reader
) {
105 Model::internalize(reader
);
106 if (reader
.isCancelled()) return;
107 reader
.readVersion(0, 0);