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> {};
84 template <
class T,
class V,
int N>
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> {};
102 public classdesc::NullDescriptor<classdesc::typescriptAPI_t> {};
114 static string name() {
return "minsky__dummy";}
117 struct tn<
boost::geometry::model::d2::point_xy<T>>
119 static string name() {
return "minsky__dummy";}
122 struct tn<RESTProcess_t>
124 static string name() {
return "minsky__dummy";}
126 template <
class C,
class D>
127 struct tn<
std::chrono::time_point<C,D>>
129 static string name() {
return "minsky__dummy";}
134 static string name() {
return "minsky__dummy";}
141 static string name() {
return "EquationDisplay";}
150 template <
class T,
class Base>
151 typename enable_if<Not<is_map<Base>>,
void>::T
155 if (typescriptType<Base>()==t[typescriptType<T>()].super)
return;
162 operator[](typescriptType<T>()).super=typescriptType<Base>();
163 typescriptAPI<T,T>(*
this,
"");
186 void exportClass(
const std::string& name,
const minsky::typescriptAPI_ns::ClassType& klass)
188 cout <<
"export class "+name+
" extends "+(klass.super.empty()?
"CppClass": klass.super)+
" {\n";
191 for (
auto& prop: klass.properties)
192 cout <<
" "<<prop.first <<
": "<<prop.second.type<<
";\n";
195 if (!klass.super.empty())
197 cout <<
" constructor(prefix: string|"<<klass.super<<
"){\n";
198 cout <<
" if (typeof prefix==='string')\n";
199 cout <<
" super(prefix";
200 if (!klass.valueType.empty())
201 cout <<
","<<klass.valueType;
204 cout <<
" super(prefix.$prefix()";
205 if (!klass.valueType.empty())
206 cout <<
","<<klass.valueType;
211 cout <<
" constructor(prefix: string){\n";
212 cout <<
" super(prefix);\n";
214 for (
auto& prop: klass.properties)
216 if (!prop.second.construction.empty())
217 cout <<
" this."<<prop.first<<
"="<<prop.second.construction<<
"\n";
219 cout <<
" this."<<prop.first<<
"=new "<<prop.second.type<<
"(this.$prefix()+'."<<prop.first<<
"');\n";
224 for (
auto& method: klass.methods)
226 cout <<
" async "<<method.first<<
"(";
227 for (
size_t i=0; i<method.second.args.size(); ++i)
230 cout<<method.second.args[i].name<<
": "<<method.second.args[i].type;
232 cout <<
"): Promise<"<<method.second.returnType<<
"> {return this.$callMethod('"<<method.first<<
"'";
233 for (
auto& arg: method.second.args)
254 api.
addClass<ecolab::Plot::LineStyle>();
267 api[
"VariableValues"].valueType=
"VariableValue";
294 api[
"Group"].properties.erase(
"parent");
296 cout <<
"/*\nThis is a built file, please do not edit.\n";
297 cout <<
"See RESTService/typescriptAPI for more information.\n*/\n\n";
298 cout <<
"import {CppClass, Sequence, Container, Map, Pair} from './backend';\n\n";
301 cout <<
"class minsky__dummy {}\n";
302 cout <<
"class minsky__EventInterface__KeyPressArgs {}\n";
303 cout <<
"class minsky__GodleyIcon__MoveCellArgs {}\n";
304 cout <<
"class minsky__RenderNativeWindow__RenderFrameArgs {}\n";
305 cout <<
"class minsky__VariableType__TypeT {}\n";
306 cout <<
"class civita__ITensor__Args {}\n";
307 cout <<
"class classdesc__json_pack_t {}\n";
308 cout <<
"class classdesc__pack_t {}\n";
309 cout <<
"class classdesc__RESTProcess_t {}\n";
310 cout <<
"class classdesc__TCL_obj_t {}\n";
311 cout <<
"class ecolab__cairo__Surface {}\n";
315 vector<string> exportFirst{
"EventInterface",
"Item",
"OperationBase",
"RenderNativeWindow",
"VariableBase"};
318 cout <<
"class minsky__Variable<T> extends VariableBase {}\n";
322 if (find(exportFirst.begin(), exportFirst.end(), i.first)==exportFirst.end())
325 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
Creation and access to the minskyTCL_obj object, which has code to record whenever Minsky's state cha...
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