octave-maintainers
[Top][All Lists]
Advanced

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

Re: Objects and OOP


From: Robert T. Short
Subject: Re: Objects and OOP
Date: Tue, 27 Jan 2009 17:39:29 -0800
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.19) Gecko/20081204 SeaMonkey/1.1.14

Sorry to be so slow. There is a lot of code to understand before I try to make any changes. I am probably a little overcautious. Also, like everybody, somewhat time-constrained.

I am building a test case by stripping down a very complex MATLAB system that I have been building for a client. The result will be a somewhat contrived but fairly complete test suite. Attached is a very preliminary version - just single inheritance. The next step will be to add the appropriate support in "isa()". Multiple and multi-level inheritance will come as I am able to get it done. There are some things that I haven't figured out how to do yet but since basic class support is present I don't really think this is a hard problem - or at least wouldn't be if I was more familiar with the sources. I think aggregation will be easier than inheritance.

The way I am approaching this is to implement the "old-style" OOP interface first; class methods are all in a directory with name @ClassName. There are two reasons for this. First, my MATLAB is a little long in the tooth and doesn't have classdef-style OOP support, and second I don't have to muck about with the parser much (not at all?). I think classdef support will be able to build on the old-style stuff without much code support - just parser support. In the end, I would like to have a very complete MATLAB style OOP system. I have done some modification to ov-class.{h,cc}, and hope to have something functional to post by the weekend. I certainly won't have the complete solution that soon, but you did ask me to do small chunks. I really want to get this to work so I can quit using Windows and back to my linux system.


Bob
--
Robert T. Short
PhaseLocked Systems

John W. Eaton wrote:
On  8-Jan-2009, Robert T. Short wrote:

| I am new to this list, so forgive me if I am rehashing old topics.
| | I downloaded the 3.1.51+ sources and have been experimenting with the | OOP facilities. I have two questions. | | It seems that support for basic objects is present, but support for | inheritance is not. True?

Can you post an example of what you expect to work?

| If true, then my second question is: can I help implement the | inheritance features?

Yes.

jwe



Attachment: classtest.tgz
Description: GNU Unix tar archive


reply via email to

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