octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OOP and load/save


From: Robert T. Short
Subject: Re: OOP and load/save
Date: Fri, 24 Apr 2009 12:52:07 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.21) Gecko/20090402 SeaMonkey/1.1.16

John W. Eaton wrote:
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


Ahh! I did say I hadn't looked at this closely enough. It was just a thought. Maybe a bad thought.

I am perfectly willing to toss ideas around, but please understand that I am really nervous about actually making changes without a lot of digging and checking. That is part of why I am so slow.

Bob


reply via email to

[Prev in Thread] Current Thread [Next in Thread]