Lucian Smith wrote:
I am just starting to use the CellML DOM API in C++, and am running into
problems. Everything compiled fine (I'm using v1.6), but I seem to be
unable to declare 'Model' objects because they contain pure virtual
functions:
This code:
cellml_api::Model model;
Hi Lucian,
Model is an interface, not a concrete class. The way the API works is
that you always work with interfaces, but you never directly create them
directly. Instead, you need to use one of the bootstrap methods to get
access to an interface for the first object, and then from there use the
interfaces to get to everything else you need (working with pointers).
See the test programs like the unit tests, and CellML2C, to get an idea
of how to call the API from C++.
Best wishes,
Andrew
gives me the error:
src/module.cpp:1570: error: cannot declare variable 'model' to be of
abstract type 'iface::cellml_api::Model'
/usr/local/include/IfaceCellML_APISPEC.hxx:163: note: because the
following virtual functions are pure within 'iface::cellml_api::Model':
/usr/local/include/Ifacexpcom.hxx:25: note: virtual void
iface::XPCOM::IObject::add_ref()
/usr/local/include/Ifacexpcom.hxx:26: note: virtual void
iface::XPCOM::IObject::release_ref()
(etc. etc.)
Is there a subclass of 'Model' that I need to use instead? The example
seems to just use 'Model', but it's in Java.
-Lucian
(Also, the 'Issue tracker' and 'Support' links on
http://www.cellml.org/tools/downloads/cellml_api are broken.)
(Also also, all mailman links are also broken, though mailman itself seems
to be running.)
_______________________________________________
cellml-discussion mailing list
[email protected]
http://www.cellml.org/mailman/listinfo/cellml-discussion
_______________________________________________
cellml-discussion mailing list
[email protected]
http://www.cellml.org/mailman/listinfo/cellml-discussion