Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifdef HAVE_CONFIG_H
00024 #include <config.h>
00025 #endif
00026
00027 #include <cstdio>
00028
00029 #include "oct-prcstrm.h"
00030 #include "sysdep.h"
00031
00032 octave_stream
00033 octave_iprocstream::create (const std::string& n, std::ios::openmode arg_md,
00034 oct_mach_info::float_format ff)
00035 {
00036 return octave_stream (new octave_iprocstream (n, arg_md, ff));
00037 }
00038
00039 octave_iprocstream::octave_iprocstream (const std::string& n,
00040 std::ios::openmode arg_md,
00041 oct_mach_info::float_format ff)
00042 : octave_stdiostream (n, octave_popen (n.c_str (), "r"),
00043 arg_md, ff, octave_pclose)
00044 {
00045 }
00046
00047 octave_iprocstream::~octave_iprocstream (void)
00048 {
00049 do_close ();
00050 }
00051
00052 octave_stream
00053 octave_oprocstream::create (const std::string& n, std::ios::openmode arg_md,
00054 oct_mach_info::float_format ff)
00055 {
00056 return octave_stream (new octave_oprocstream (n, arg_md, ff));
00057 }
00058
00059 octave_oprocstream::octave_oprocstream (const std::string& n,
00060 std::ios::openmode arg_md,
00061 oct_mach_info::float_format ff)
00062 : octave_stdiostream (n, octave_popen (n.c_str (), "w"),
00063 arg_md, ff, octave_pclose)
00064 {
00065 }
00066
00067 octave_oprocstream::~octave_oprocstream (void)
00068 {
00069 do_close ();
00070 }