forked from highperformancecoder/minsky
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathminsky_epilogue.h
232 lines (198 loc) · 6.58 KB
/
minsky_epilogue.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
/*
@copyright Steve Keen 2019
@author Russell Standish
This file is part of Minsky.
Minsky is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Minsky is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Minsky. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MINSKY_EPILOGUE_H
#define MINSKY_EPILOGUE_H
#if defined(RESTPROCESS_H)
namespace classdesc
{
#ifdef CAIRO_H
template <>
struct tn<cairo_t>
{
static string name() {return "cairo_t";}
};
template <>
struct tn<cairo_surface_t>
{
static string name() {return "cairo_surface_t";}
};
#endif
// needed for MXE
template <>
struct tn<typename std::vector<unsigned long long>::const_iterator>
{
static string name() {return "std::vector<unsigned long long>::const_iterator";}
};
#ifdef BOOST_GEOMETRY_GEOMETRIES_POINT_XY_HPP
template <>
struct tn<boost::geometry::model::d2::point_xy<float>>
{
static string name() {return "boost::geometry::model::d2::point_xy<float>";}
};
#endif
}
namespace classdesc_access
{
namespace cd=classdesc;
#ifdef ACCESSOR_H
template <class T, class G, class S>
struct access_RESTProcess<ecolab::Accessor<T,G,S>>
{
template <class U>
void operator()(cd::RESTProcess_t& r, const cd::string& d, U& a)
{
::RESTProcess(r,d,a.g);
::RESTProcess(r,d,a.s);
}
};
template <class T, class V, int N>
struct access_RESTProcess<ecolab::TCLAccessor<T,V,N>>: public cd::NullDescriptor<cd::RESTProcess_t> {};
#endif
#ifdef ARRAYS_H
template <class T>
struct access_RESTProcess<ecolab::array<T>>
{
template <class U>
void operator()(cd::RESTProcess_t& r, const cd::string& d, U& a)
{
r.add(d,new cd::RESTProcessSequence<ecolab::array<T>>(a));
}
};
#endif
template <> struct access_json_pack<cd::TCL_obj_t>:
public cd::NullDescriptor<cd::json_pack_t> {};
template <> struct access_json_unpack<cd::TCL_obj_t>:
public cd::NullDescriptor<cd::json_unpack_t> {};
#ifdef CAIRO_H
template <> struct access_json_pack<ecolab::cairo::Surface>:
public cd::NullDescriptor<cd::json_pack_t> {};
template <> struct access_json_unpack<ecolab::cairo::Surface>:
public cd::NullDescriptor<cd::json_unpack_t> {};
template <> struct access_RESTProcess<ecolab::cairo::Surface>:
public cd::NullDescriptor<cd::RESTProcess_t> {};
#endif
#ifdef XVECTOR_H
template <>
struct access_RESTProcess<minsky::XVector>: public classdesc::NullDescriptor<cd::RESTProcess_t> {};
template <>
struct access_json_pack<minsky::XVector>: public classdesc::NullDescriptor<cd::json_pack_t> {};
template <>
struct access_json_unpack<minsky::XVector>: public classdesc::NullDescriptor<cd::json_unpack_t> {};
#endif
template <>
struct access_json_pack<cd::RESTProcess_t>: public classdesc::NullDescriptor<cd::json_pack_t> {};
template <>
struct access_json_unpack<cd::RESTProcess_t>: public classdesc::NullDescriptor<cd::json_unpack_t> {};
#ifdef BOOST_GEOMETRY_GEOMETRIES_POINT_XY_HPP
template <>
struct access_json_pack<boost::geometry::model::d2::point_xy<float>>: public classdesc::NullDescriptor<cd::json_pack_t> {};
template <>
struct access_json_unpack<boost::geometry::model::d2::point_xy<float>>: public classdesc::NullDescriptor<cd::json_unpack_t> {};
template <>
struct access_RESTProcess<boost::geometry::model::d2::point_xy<float>>: public classdesc::NullDescriptor<cd::RESTProcess_t> {};
#endif
}
#endif
#ifdef CIVITA_DIMENSION_H
#include "dimension.cd"
#include "dimension.xcd"
#endif
#ifdef CIVITA_INDEX_H
#include "index.cd"
#endif
#ifdef CIVITA_TENSORINTERFACE_H
#include "tensorInterface.cd"
#endif
#ifdef CIVITA_TENSORVAL_H
#include "tensorVal.cd"
#endif
#ifdef CIVITA_HYPERCUBE_H
#include "hypercube.cd"
#endif
#ifdef JSON_PACK_BASE_H
namespace classdesc_access
{
#ifdef ACCESSOR_H
template <class T, class G, class S>
struct access_json_pack<ecolab::Accessor<T,G,S>>
{
template <class U>
void operator()(cd::json_pack_t& j, const cd::string& d, U& a)
{
j<<a();
}
};
template <class T, class G, class S>
struct access_json_unpack<ecolab::Accessor<T,G,S>>
{
template <class U>
void operator()(cd::json_unpack_t& j, const cd::string& d, U& a)
{
T x;
j>>x;
a(x);
}
};
template <class T, class V, int N>
struct access_json_pack<ecolab::TCLAccessor<T,V,N>>: public cd::NullDescriptor<cd::json_pack_t> {};
template <class T, class V, int N>
struct access_json_unpack<ecolab::TCLAccessor<T,V,N>>: public cd::NullDescriptor<cd::json_unpack_t> {};
#endif
template <>
struct access_json_pack<ecolab::TCL_args>: public cd::NullDescriptor<cd::json_pack_t> {};
template <>
struct access_json_unpack<ecolab::TCL_args>: public cd::NullDescriptor<cd::json_unpack_t> {};
}
#endif
namespace classdesc
{
class json_pack_t;
struct RESTProcess_t;
}
namespace classdesc_access
{
#ifdef JSON_PACK_NO_FALL_THROUGH_TO_STREAMING
template <class T> struct access_json_pack
{
template <class U>
void operator()(classdesc::json_pack_t& targ, const classdesc::string& desc,U& arg);
};
template <class T> struct access_json_unpack
{
template <class U>
void operator()(classdesc::json_pack_t& targ, const classdesc::string& desc,U& arg);
};
#endif
template <class T> struct access_RESTProcess
{
template <class U>
void operator()(classdesc::RESTProcess_t& targ, const classdesc::string& desc,U& arg);
};
}
#ifdef CIVITA_XVECTOR_H
#include "xvector.xcd"
#endif
#include <ecolab_epilogue.h>
/*(json_pack_t&,const std::string&,type&); \*/
#define CLASSDESC_ACCESS_EXPLICIT_INSTANTIATION(type) \
namespace classdesc_access \
{ \
template void access_json_pack<type>::operator()(classdesc::json_pack_t&,const std::string&,type&); \
template void access_json_unpack<type>::operator()(classdesc::json_pack_t&,const std::string&,type&); \
template void access_RESTProcess<type>::operator()(classdesc::RESTProcess_t&,const std::string&,type&); \
template void access_RESTProcess<type>::operator()(classdesc::RESTProcess_t&,const std::string&,const type&); \
}
#endif