On 24-Apr-2009, Robert T. Short wrote:
| Also, the notion of returning a struct if the class is
| not reconstructable seems easier, since you just take the map and
| return the base class rather than the derived class.
Please look at a function like octave_class::load_ascii. It returns a
status code, not a class object, so "fixing" this problem is not that
simple a change to make. Again, by the time there is enough
information to determine that a conversion should happen, it is too
late to simply return a differnt kind of object. At that point, the
object has already been constructed.
This is not a problem for the MAT file reader, but then the MAT file
format can't be extended to handle new user-defined types that are
implemented in C++ (like the fixed class from Octave Forge, for
example).
jwe