Minsky: 3.17.0
minsky_epilogue.h
Go to the documentation of this file.
1 /*
2  @copyright Steve Keen 2019
3  @author Russell Standish
4  This file is part of Minsky.
5 
6  Minsky is free software: you can redistribute it and/or modify it
7  under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  Minsky is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with Minsky. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 #ifndef MINSKY_EPILOGUE_H
21 #define MINSKY_EPILOGUE_H
22 
23 #include "cairoSurfaceImage.h"
24 #if defined(CLASSDESC_RESTPROCESS_BASE_H)
25 
26 namespace classdesc
27 {
28  // needed for MXE
29  template <>
30  struct tn<typename std::vector<unsigned long long>::const_iterator>
31  {
32  static string name() {return "std::vector<unsigned long long>::const_iterator";}
33  };
34 
35 #ifdef BOOST_GEOMETRY_GEOMETRIES_POINT_XY_HPP
36  template <>
37  struct tn<boost::geometry::model::d2::point_xy<float>>
38  {
39  static string name() {return "boost::geometry::model::d2::point_xy<float>";}
40  };
41 #endif
42 
43 
44 }
45 
46 namespace classdesc_access
47 {
48  namespace cd=classdesc;
49 #ifdef ACCESSOR_H
50  template <class T, class G, class S>
51  struct access_RESTProcess<ecolab::Accessor<T,G,S>>
52  {
53  template <class U>
54  void operator()(cd::RESTProcess_t& r, const cd::string& d, U& a)
55  {
56  ::RESTProcess(r,d,a.g);
57  ::RESTProcess(r,d,a.s);
58  }
59  };
60 
61  template <class T, class V, int N>
62  struct access_RESTProcess<ecolab::TCLAccessor<T,V,N>>: public cd::NullDescriptor<cd::RESTProcess_t> {};
63 #endif
64 
65 #ifdef ARRAYS_H
66  template <class T>
67  struct access_RESTProcess<ecolab::array<T>>
68  {
69  template <class U>
70  void operator()(cd::RESTProcess_t& r, const cd::string& d, U& a)
71  {
72  r.add(d,new cd::RESTProcessSequence<ecolab::array<T>>(a));
73  }
74  };
75 #endif
76 
77 //#ifdef CAIRO_H
78 // template <> struct access_json_pack<ecolab::cairo::Surface>:
79 // public cd::NullDescriptor<cd::json_pack_t> {};
80 // template <> struct access_json_unpack<ecolab::cairo::Surface>:
81 // public cd::NullDescriptor<cd::json_unpack_t> {};
82 // template <> struct access_RESTProcess<ecolab::cairo::Surface>:
83 // public cd::NullDescriptor<cd::RESTProcess_t> {};
84 //#endif
85 
86 #ifdef BOOST_GEOMETRY_GEOMETRIES_POINT_XY_HPP
87  template <>
88  struct access_json_pack<boost::geometry::model::d2::point_xy<float>>: public classdesc::NullDescriptor<cd::json_pack_t> {};
89  template <>
90  struct access_json_unpack<boost::geometry::model::d2::point_xy<float>>: public classdesc::NullDescriptor<cd::json_unpack_t> {};
91  template <>
92  struct access_RESTProcess<boost::geometry::model::d2::point_xy<float>>: public classdesc::NullDescriptor<cd::RESTProcess_t> {};
93 #endif
94 }
95 
96 #endif
97 
98 #ifdef CIVITA_DIMENSION_H
99 #include "dimension.cd"
100 #include "dimension.xcd"
101 #endif
102 #ifdef CIVITA_INDEX_H
103 #include "index.cd"
104 #endif
105 #ifdef CIVITA_TENSORINTERFACE_H
106 #include "tensorInterface.cd"
107 #endif
108 #ifdef CIVITA_TENSORVAL_H
109 #include "tensorVal.cd"
110 #endif
111 #ifdef CIVITA_HYPERCUBE_H
112 #include "hypercube.cd"
113 #endif
114 
115 namespace classdesc
116 {
117  class json_pack_t;
118  struct RESTProcess_t;
119 }
120 
121 #include "dimension.h"
122 
123 namespace classdesc_access
124 {
125 #ifdef JSON_PACK_NO_FALL_THROUGH_TO_STREAMING
126  template <class T,class E> struct access_json_pack
127  {
128  template <class U>
129  void operator()(classdesc::json_pack_t& targ, const classdesc::string& desc,U& arg);
130  };
131 
132  template <class T, class E> struct access_json_unpack
133  {
134  template <class U>
135  void operator()(classdesc::json_pack_t& targ, const classdesc::string& desc,U& arg);
136  };
137 #endif
138 
139  template <class T, class E> struct access_RESTProcess
140  {
141  template <class U>
142  void operator()(classdesc::RESTProcess_t& targ, const classdesc::string& desc,U& arg);
143  };
144 
145  template <>
146  struct access_RESTProcess<civita::any,void>: public classdesc::NullDescriptor<classdesc::RESTProcess_t> {};
147 }
148 
149 #ifdef CIVITA_XVECTOR_H
150 #include "xvector.xcd"
151 #endif
152 
153 #include <ecolab_epilogue.h>
154 
155 /*(json_pack_t&,const std::string&,type&); \*/
156 #define CLASSDESC_ACCESS_EXPLICIT_INSTANTIATION(type) \
157  namespace classdesc_access \
158  { \
159  template void access_json_pack<type>::operator()(classdesc::json_pack_t&,const std::string&,type&); \
160  template void access_json_unpack<type>::operator()(classdesc::json_pack_t&,const std::string&,type&); \
161  template void access_RESTProcess<type>::operator()(classdesc::RESTProcess_t&,const std::string&,type&); \
162  template void access_RESTProcess<type>::operator()(classdesc::RESTProcess_t&,const std::string&,const type&); \
163  }
164 
165 #endif
STL namespace.
void RESTProcess(RESTProcess_t &t, const string &d, minsky::VariableValues &a)
Definition: minsky.cc:1823
void operator()(classdesc::RESTProcess_t &targ, const classdesc::string &desc, U &arg)