6 #include "assetClass.tcd" 8 #include "bookmark.tcd" 9 #include "cairoSurfaceImage.tcd" 10 #include "callableFunction.tcd" 12 #include "CSVDialog.tcd" 13 #include "CSVParser.tcd" 14 #include "constMap.tcd" 15 #include "dataSpecSchema.tcd" 18 #include "dimension.tcd" 19 #include "engNotation.tcd" 20 #include "equationDisplay.tcd" 21 #include "evalGodley.tcd" 22 #include "eventInterface.tcd" 23 #include "fontDisplay.tcd" 24 #include "godleyIcon.tcd" 25 #include "godleyTable.tcd" 26 #include "godleyTableWindow.tcd" 29 #include "handleLockInfo.tcd" 30 #include "hypercube.tcd" 37 #include "noteBase.tcd" 38 #include "operation.tcd" 39 #include "operationBase.tcd" 40 #include "operationType.tcd" 42 #include "pannableTab.tcd" 43 #include "phillipsDiagram.tcd" 45 #include "plotOptions.tcd" 46 #include "plotWidget.tcd" 47 #include "polyRESTProcessBase.tcd" 50 #include "publication.tcd" 52 #include "ravelState.tcd" 53 #include "renderNativeWindow.tcd" 54 #include "ravelWrap.tcd" 55 #include "rungeKutta.tcd" 56 #include "selection.tcd" 58 #include "simulation.tcd" 60 #include "SVGItem.tcd" 61 #include "switchIcon.tcd" 62 #include "tensorInterface.tcd" 63 #include "tensorVal.tcd" 66 #include "userFunction.tcd" 68 #include "variableInstanceList.tcd" 69 #include "variable.tcd" 70 #include "variablePane.tcd" 71 #include "variableType.tcd" 72 #include "variableValue.tcd" 73 #include "variableValues.tcd" 75 #include "xvector.tcd" 82 public classdesc::NullDescriptor<classdesc::typescriptAPI_t> {};
86 public classdesc::NullDescriptor<classdesc::typescriptAPI_t> {};
90 public classdesc::NullDescriptor<classdesc::typescriptAPI_t> {};
94 public classdesc::NullDescriptor<classdesc::typescriptAPI_t> {};
98 public classdesc::NullDescriptor<classdesc::typescriptAPI_t> {};
110 static string name() {
return "minsky__dummy";}
113 struct tn<
boost::geometry::model::d2::point_xy<T>>
115 static string name() {
return "minsky__dummy";}
118 struct tn<RESTProcess_t>
120 static string name() {
return "minsky__dummy";}
122 template <
class C,
class D>
123 struct tn<
std::chrono::time_point<C,D>>
125 static string name() {
return "minsky__dummy";}
130 static string name() {
return "minsky__dummy";}
137 static string name() {
return "EquationDisplay";}
146 template <
class T,
class Base>
147 typename enable_if<Not<is_map<Base>>,
void>::T
151 if (typescriptType<Base>()==t[typescriptType<T>()].super)
return;
158 operator[](typescriptType<T>()).super=typescriptType<Base>();
159 typescriptAPI<T,T>(*
this,
"");
182 void exportClass(
const std::string& name,
const minsky::typescriptAPI_ns::ClassType& klass)
184 cout <<
"export class "+name+
" extends "+(klass.super.empty()?
"CppClass": klass.super)+
" {\n";
187 for (
auto& prop: klass.properties)
188 cout <<
" "<<prop.first <<
": "<<prop.second.type<<
";\n";
191 if (!klass.super.empty())
193 cout <<
" constructor(prefix: string|"<<klass.super<<
"){\n";
194 cout <<
" if (typeof prefix==='string')\n";
195 cout <<
" super(prefix";
196 if (!klass.valueType.empty())
197 cout <<
","<<klass.valueType;
200 cout <<
" super(prefix.$prefix()";
201 if (!klass.valueType.empty())
202 cout <<
","<<klass.valueType;
207 cout <<
" constructor(prefix: string){\n";
208 cout <<
" super(prefix);\n";
210 for (
auto& prop: klass.properties)
212 if (!prop.second.construction.empty())
213 cout <<
" this."<<prop.first<<
"="<<prop.second.construction<<
"\n";
215 cout <<
" this."<<prop.first<<
"=new "<<prop.second.type<<
"(this.$prefix()+'."<<prop.first<<
"');\n";
220 for (
auto& method: klass.methods)
222 cout <<
" async "<<method.first<<
"(";
223 for (
size_t i=0; i<method.second.args.size(); ++i)
226 cout<<method.second.args[i].name<<
": "<<method.second.args[i].type;
228 cout <<
"): Promise<"<<method.second.returnType<<
"> {return this.$callMethod('"<<method.first<<
"'";
229 for (
auto& arg: method.second.args)
250 api.
addClass<ecolab::Plot::LineStyle>();
263 api[
"VariableValues"].valueType=
"VariableValue";
290 api[
"Group"].properties.erase(
"parent");
292 cout <<
"/*\nThis is a built file, please do not edit.\n";
293 cout <<
"See RESTService/typescriptAPI for more information.\n*/\n\n";
294 cout <<
"import {CppClass, Sequence, Container, Map, Pair} from './backend';\n\n";
297 cout <<
"class minsky__dummy {}\n";
298 cout <<
"class minsky__EventInterface__KeyPressArgs {}\n";
299 cout <<
"class minsky__GodleyIcon__MoveCellArgs {}\n";
300 cout <<
"class minsky__RenderNativeWindow__RenderFrameArgs {}\n";
301 cout <<
"class minsky__VariableType__TypeT {}\n";
302 cout <<
"class civita__ITensor__Args {}\n";
303 cout <<
"class classdesc__json_pack_t {}\n";
304 cout <<
"class classdesc__pack_t {}\n";
305 cout <<
"class classdesc__RESTProcess_t {}\n";
306 cout <<
"class ecolab__cairo__Surface {}\n";
310 vector<string> exportFirst{
"EventInterface",
"Item",
"OperationBase",
"RenderNativeWindow",
"VariableBase"};
313 cout <<
"class minsky__Variable<T> extends VariableBase {}\n";
317 if (find(exportFirst.begin(), exportFirst.end(), i.first)==exportFirst.end())
320 cout <<
"export var minsky=new Minsky('minsky');\n";
void doOneEvent(bool idleTasksOnly)
checks if any GUI events are waiting, and proces an event if so
string typeName< cairo_surface_t >()
convenience class to omit writing XML records when data absent or empty
enable_if< Not< is_map< B > >, void >::T typescriptAPI(typescriptAPI_t &, const std::string &)
Mixin implementing common panning functionality in tabs.
represents the units (in sense of dimensional analysis) of a variable.
string typeName< cairo_t >()
void exportClass(const std::string &name, const minsky::typescriptAPI_ns::ClassType &klass)
legacy data importer object
Minsky & minsky()
global minsky object