- From: ak.miller at auckland.ac.nz (Andrew Miller)
- Subject: [cellml-dev] telicems throw in some cases
- Date: Wed, 12 Jan 2011 08:09:32 +1300
On 06/01/11 08:28, Lucian Smith wrote:
>
So, there's a bit of my code that reads:
>
>
RETURN_INTO_OBJREF(nodes, iface::dom::NodeList, mathel->childNodes());
>
uint32_t length = nodes->length();
>
for (uint32_t i=0; i<length; i++) {
>
RETURN_INTO_OBJREF(node, iface::dom::Node, nodes->item(i));
>
DECLARE_QUERY_INTERFACE_OBJREF(input, node,
>
mathml_dom::MathMLApplyElement);
>
if (input != NULL) {
>
RETURN_INTO_WSTRING(wmath, ts->showMaths(input));
>
std::string infix(makeUTF8(wmath));
>
>
//cout<< infix<< endl;
>
>
>
(from module-cellml.cpp)
>
>
For many models, this code runs through just fine. However, when reading
>
the file cardiovascular_circulation_dvad/MainDVad.cellml, the
>
'ts->showMaths(input)' line throws, from your code:
>
>
wchar_t*
>
CDA_TeLICeMService::showMaths(iface::mathml_dom::MathMLContentElement*
>
aMaths)
>
throw()
>
{
>
std::wstring txt = ShowMathExpression(L"", aMaths, 0);
>
return CDA_wcsdup(txt.c_str());
>
}
>
>
from TeLICeMSimple.cpp.
>
>
This code is indeed being called when translating other functions (my
>
standard has been
>
adrian_chandler_hodgkin_1970/adrian_chandler_hodgkin_1970.cellml ) so I'm
>
not sure if this is intended behavior for incorrect models, and I simply
>
need to catch the result, or if something else is going on.
Hi Lucian,
It turned out to be due to a bug in the TeLICeMS code that meant it
didn't like piecewise models without an 'otherwise'. This is now fixed
in changeset 6ca2d161c8d9.
Best wishes,
Andrew
>
>
-Lucian
- [cellml-dev] telicems throw in some cases, Andrew Miller, 01/12/2011
Archive powered by MHonArc 2.6.18.