How are those wrapper code under scripting\ecmaapi\ generated?
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files, scripts and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files, scripts and screenshots.
Post one question per topic.
How are those wrapper code under scripting\ecmaapi\ generated?
I also wonder how are those wrapper code under scripting\ecmaapi\ generated?
Re: How are those wrapper code under scripting\ecmaapi\ generated?
We're currently using a combination of src2srcml and XSLT to create script bindings automatically.
Re: How are those wrapper code under scripting\ecmaapi\ generated?
Thanks, andrew, awesome work!
So, can I get more details about the method to create script bindings automatically? Maybe when I make some changes to the interfaces, I don't need to change those bindings manually.
So, can I get more details about the method to create script bindings automatically? Maybe when I make some changes to the interfaces, I don't need to change those bindings manually.
Re: How are those wrapper code under scripting\ecmaapi\ generated?
The ECMA script bindings generator can be found at:
https://github.com/qcad/qcad/tree/maste ... agenerator
It's probably not for the faint-hearted... However, you could keep an XML file with your interface up to date like those in https://github.com/qcad/qcad/tree/maste ... or/src/xml and then use xml2cpp.xsl to generate C++ source code. That should be straightforward and does not involve the srcml tools.
https://github.com/qcad/qcad/tree/maste ... agenerator
It's probably not for the faint-hearted... However, you could keep an XML file with your interface up to date like those in https://github.com/qcad/qcad/tree/maste ... or/src/xml and then use xml2cpp.xsl to generate C++ source code. That should be straightforward and does not involve the srcml tools.
Re: How are those wrapper code under scripting\ecmaapi\ generated?
Thanks,Andrew.
I tried to run the 'generate.sh' and the 'cpp2srcml.sh', and got the message 'src2srcml not found'. My question is, is src2srcml the earlier version of srcml tool?
I tried to run the 'generate.sh' and the 'cpp2srcml.sh', and got the message 'src2srcml not found'. My question is, is src2srcml the earlier version of srcml tool?
Re: How are those wrapper code under scripting\ecmaapi\ generated?
Possibly.
Our version reports:
Our version reports:
Code: Select all
$ src2srcml --version
src2srcml Version Beta Nov-09-2006 Libxml2 enabled
Copyright (C) 2006 SDML