[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Audio playback and classes
From: |
Carnë Draug |
Subject: |
Re: Audio playback and classes |
Date: |
Wed, 19 Jun 2013 00:45:10 +0100 |
On 18 June 2013 23:01, Michael Goffioul <address@hidden> wrote:
> On Tue, Jun 18, 2013 at 4:00 PM, Mike Miller <address@hidden> wrote:
>>
>> On Tue, Jun 18, 2013 at 15:15:23 -0400, Jordi Gutiérrez Hermoso wrote:
>> > On 17 June 2013 16:08, Vytautas Jancauskas <address@hidden> wrote:
>> >
>> >> I have a question relating to octave classes. For the moment player is
>> >> implemented as a C++ class that inherits from octave_base_value. What
>> >> is required to convert it to proper octave class?
>> >
>> > There are two ways. One that is implemented in default and another in
>> > the classdef branch. The one in default is documented in the manual:
>>
>> That is the implementation we are targeting, we don't need classdef
>> for this project.
>>
>> If I can try to rephrase part of the original question that hasn't
>> been addressed, since I talked with Vytautas about this earlier and I
>> didn't know:
>>
>> >> Must I implement
>> >> wrappers in octave code for stuff such as get and set methods to work
>> >> or is it possible to do everything from C++?
>>
>> If we want to override the get() and set() functions for a new Octave
>> class, audioplayer in this case, do those functions have to exist as
>> m-files in a @audioplayer directory or can they be done in one or more
>> C++ oct-files?
>
>
> You will need a get and set method defined in a @audioplayer directory, but
> they can be simple wrappers around some internal functions, which can then
> exist anywhere in octave path (even as an autoloaded function).
This is exactly what happens with the ftp class. See scripts/@ftp,
these functions are pretty much 1 liners, wrappers to the __ftp_*.
Carnë
- Audio playback and classes, Vytautas Jancauskas, 2013/06/17
- Re: Audio playback and classes, Michael Goffioul, 2013/06/17
- Re: Audio playback and classes, Jordi Gutiérrez Hermoso, 2013/06/18
- Re: Audio playback and classes, Mike Miller, 2013/06/18
- Re: Audio playback and classes, Michael Goffioul, 2013/06/18
- Re: Audio playback and classes,
Carnë Draug <=
- Re: Audio playback and classes, Vytautas Jancauskas, 2013/06/19
- Re: Audio playback and classes, Jordi Gutiérrez Hermoso, 2013/06/19
- Re: Audio playback and classes, Mike Miller, 2013/06/21
- Re: Audio playback and classes, Vytautas Jancauskas, 2013/06/28
- Re: Audio playback and classes, Michael Goffioul, 2013/06/28
- Re: Audio playback and classes, Mike Miller, 2013/06/28