4bbabf83591858e3106d1a1fd5cd4767240d3362
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 TypeProxy
<Store
> Store::PROXY
;
31 Store::Store(INTEGER id
): d_id(id
) {}
33 INTEGER
Store::getId() {
37 const std::string
&Store::getType() {
38 return Store::TYPENAME
;
41 const std::string
*Store::getSuper() {
45 const std::string
&Store::getTypeName() const {
46 return Store::getType();
49 void Store::getTypePath(TypePath
*out
) const {
50 return calcTypePath(out
, getTypeName());
53 void Store::calcTypePath(TypePath
*path
, const std::string
&name
) const {
54 const std::string
*super
= TypeRegister::getInstance().get(name
)->getSuper();
56 calcTypePath(path
, *super
);
58 path
->push_back(name
);
61 void Store::internalize(Reader
&reader
) {
62 reader
.readVersion(0, 0);
65 std::string
Store::toString() {
69 void Store::accept(Visitor
&visitor
) const {}
71 const std::string
Elem::TYPENAME("Stores.Elem^");
72 const TypeProxy
<Elem
> Elem::PROXY
;
74 Elem::Elem(INTEGER id
) : Store(id
) {}
76 const std::string
&Elem::getType() {
80 const std::string
*Elem::getSuper() {
81 return &Store::getType();
84 const std::string
&Elem::getTypeName() const {
88 void Elem::internalize(Reader
&reader
) {
89 Store::internalize(reader
);
90 if (reader
.isCancelled()) return;
91 reader
.readVersion(0, 0);
94 const std::string
Model::TYPENAME("Models.Model^");
95 const TypeProxy
<Model
> Model::PROXY
;
97 Model::Model(INTEGER id
) : Elem(id
) {}
99 const std::string
&Model::getType() {
103 const std::string
*Model::getSuper() {
104 return &Elem::getType();
107 const std::string
&Model::getTypeName() const {
111 void Model::internalize(Reader
&reader
) {
112 Elem::internalize(reader
);
113 if (reader
.isCancelled()) return;
114 reader
.readVersion(0, 0);
117 const std::string
ContainerModel::TYPENAME("Containers.Model^");
118 const TypeProxy
<ContainerModel
> ContainerModel::PROXY
;
120 ContainerModel::ContainerModel(INTEGER id
) : Model(id
) {}
122 const std::string
&ContainerModel::getType() {
126 const std::string
*ContainerModel::getSuper() {
127 return &Model::getType();
130 const std::string
&ContainerModel::getTypeName() const {
134 void ContainerModel::internalize(Reader
&reader
) {
135 Model::internalize(reader
);
136 if (reader
.isCancelled()) return;
137 reader
.readVersion(0, 0);