Alter the method for generation of the "display()" methods
|Reported by:||hpwalton||Owned by:||hpwalton|
Description (last modified by hpwalton)
Motivation: It is not always desirable to see output to the screen. The display methods always use cout.
create a toString() method for all the public interface classes. These would print whatever information is attached and valid at the time of invocation. Note that some data may not be completely attached yet. In those cases it should report as such.
Calling toString() on the Model should cascade.
Create a toMathML() method such that if the user wishes to get a browser render-able version of the formulation.
Note: no need to interrupt the display() methods. They can leverage toString() to generate the text.
Note: Also add "Named" as a base class to many other classes. This allows for more "human readable" debugging.
Note: With many items as "Named" subclasses, and having "Named" as the "owner" of the toString() method, it should be relatively easy to produce left shift operators into an ostream for convenience of printing (e.g. std::ostream &operator<<(std::ostream &os, const MP_model &model); will allow a call like: