d03467cf64df6a8736cdc81ba86d34462293aeb9
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 std::string
Store::toPlainText() {
72 const std::string
Elem::TYPENAME("Stores.Elem^");
73 const TypeProxy
<Elem
> Elem::PROXY
;
75 Elem::Elem(INTEGER id
) : Store(id
) {}
77 const std::string
&Elem::getType() {
81 const std::string
*Elem::getSuper() {
82 return &Store::getType();
85 const std::string
&Elem::getTypeName() const {
89 void Elem::internalize(Reader
&reader
) {
90 Store::internalize(reader
);
91 if (reader
.isCancelled()) return;
92 reader
.readVersion(0, 0);
95 const std::string
Model::TYPENAME("Models.Model^");
96 const TypeProxy
<Model
> Model::PROXY
;
98 Model::Model(INTEGER id
) : Elem(id
) {}
100 const std::string
&Model::getType() {
104 const std::string
*Model::getSuper() {
105 return &Elem::getType();
108 const std::string
&Model::getTypeName() const {
112 void Model::internalize(Reader
&reader
) {
113 Elem::internalize(reader
);
114 if (reader
.isCancelled()) return;
115 reader
.readVersion(0, 0);
118 const std::string
ContainerModel::TYPENAME("Containers.Model^");
119 const TypeProxy
<ContainerModel
> ContainerModel::PROXY
;
121 ContainerModel::ContainerModel(INTEGER id
) : Model(id
) {}
123 const std::string
&ContainerModel::getType() {
127 const std::string
*ContainerModel::getSuper() {
128 return &Model::getType();
131 const std::string
&ContainerModel::getTypeName() const {
135 void ContainerModel::internalize(Reader
&reader
) {
136 Model::internalize(reader
);
137 if (reader
.isCancelled()) return;
138 reader
.readVersion(0, 0);