octave-maintainers
[Top][All Lists]
Advanced

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

Re: "save" to and "load" from file descriptor


From: David Bateman
Subject: Re: "save" to and "load" from file descriptor
Date: Tue, 12 Jun 2007 09:37:09 +0200
User-agent: Thunderbird 1.5.0.7 (X11/20060921)

John W. Eaton wrote:
> On 11-Jun-2007, Olaf Till wrote:
>
> | So this probably will solve the problem. Still IMHO it is worth
> | considering to make octaves "save" and "load" code work on strings
> | (like octave-xmltools) or, better, on file descriptors (or
> | sockets). It would be more straightforward than producing XML strings
> | with an external tool and feeding them through the pipe by hand.
>
> If you want to discuss a change like this, then please open a thread
> on the maintainers list.  A proposed patch would also help...
>
> jwe
>   
In fact a change like that wouldn't be too difficult as the prototypes
for octave's binary format

extern bool
save_binary_data (std::ostream& os, const octave_value& tc,
                  const std::string& name, const std::string& doc,
                  bool mark_as_global, bool save_as_floats);

extern std::string
read_binary_data (std::istream& is, bool swap,
                  oct_mach_info::float_format fmt,
                  const std::string& filename, bool& global,
                  octave_value& tc, std::string& doc);

would tell you. You just need a wrapper to setup the iostreams on both
sides and then install the variables into memory on the reader's side...
Should be relatively easy..

D.

-- 
David Bateman                                address@hidden
Motorola Labs - Paris                        +33 1 69 35 48 04 (Ph) 
Parc Les Algorithmes, Commune de St Aubin    +33 6 72 01 06 33 (Mob) 
91193 Gif-Sur-Yvette FRANCE                  +33 1 69 35 77 01 (Fax) 

The information contained in this communication has been classified as: 

[x] General Business Information 
[ ] Motorola Internal Use Only 
[ ] Motorola Confidential Proprietary



reply via email to

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