9 template<class T
, class A
> T
join(const A
& begin
, const A
& end
, const T
&sep
) {
15 for (++it
; it
!= end
; ++it
) {
16 result
.append(sep
).append(*it
);
23 std::string
TypePath::toString() const {
24 return join(begin(), end(), std::string("->"));
27 const std::string
Store::TYPENAME("Stores.Store^");
28 const TypeProxy
<Store
> Store::PROXY
;
30 Store::Store(INTEGER id
): d_id(id
) {}
32 INTEGER
Store::getId() {
36 const std::string
&Store::getType() {
37 return Store::TYPENAME
;
40 const std::string
*Store::getSuper() {
44 const std::string
&Store::getTypeName() const {
45 return Store::getType();
48 void Store::getTypePath(TypePath
*out
) const {
49 return calcTypePath(out
, getTypeName());
52 void Store::calcTypePath(TypePath
*path
, const std::string
&name
) const {
53 const std::string
*super
= TypeRegister::getInstance().get(name
)->getSuper();
55 calcTypePath(path
, *super
);
57 path
->push_back(name
);
60 void Store::internalize(Reader
&reader
) {
61 reader
.readVersion(0, 0);
64 std::string
Store::toString() {
68 const std::string
Elem::TYPENAME("Stores.Elem^");
69 const TypeProxy
<Elem
> Elem::PROXY
;
71 Elem::Elem(INTEGER id
) : Store(id
) {}
73 const std::string
&Elem::getType() {
77 const std::string
*Elem::getSuper() {
78 return &Store::getType();
81 const std::string
&Elem::getTypeName() const {
85 void Elem::internalize(Reader
&reader
) {
86 Store::internalize(reader
);
87 if (reader
.isCancelled()) return;
88 reader
.readVersion(0, 0);
91 const std::string
Model::TYPENAME("Models.Model^");
92 const TypeProxy
<Model
> Model::PROXY
;
94 Model::Model(INTEGER id
) : Elem(id
) {}
96 const std::string
&Model::getType() {
100 const std::string
*Model::getSuper() {
101 return &Elem::getType();
104 const std::string
&Model::getTypeName() const {
108 void Model::internalize(Reader
&reader
) {
109 Elem::internalize(reader
);
110 if (reader
.isCancelled()) return;
111 reader
.readVersion(0, 0);
114 const std::string
ContainerModel::TYPENAME("Containers.Model^");
115 const TypeProxy
<ContainerModel
> ContainerModel::PROXY
;
117 ContainerModel::ContainerModel(INTEGER id
) : Model(id
) {}
119 const std::string
&ContainerModel::getType() {
123 const std::string
*ContainerModel::getSuper() {
124 return &Model::getType();
127 const std::string
&ContainerModel::getTypeName() const {
131 void ContainerModel::internalize(Reader
&reader
) {
132 Model::internalize(reader
);
133 if (reader
.isCancelled()) return;
134 reader
.readVersion(0, 0);