Mercurial > octave
diff libinterp/corefcn/oct-iostrm.cc @ 29991:3988112c7116
move i/o stream classes inside octave namespace
* c-file-ptr-stream.h, c-file-ptr-stream.cc, file-io.cc, oct-fstrm.cc,
oct-fstrm.h, oct-iostrm.cc, oct-iostrm.h, oct-prcstrm.cc,
oct-prcstrm.h, oct-procbuf.cc, oct-procbuf.h, oct-stdstrm.h,
oct-stream.cc, oct-strstrm.cc, oct-strstrm.h, procstream.cc,
procstream.h: Move classes inside octave namespace. Change all
uses. Provide deprecated typedefs to preserve old names where
possible.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 17 Aug 2021 11:17:36 -0400 |
parents | 0a5b15007766 |
children | 796f54d4ddbf |
line wrap: on
line diff
--- a/libinterp/corefcn/oct-iostrm.cc Mon Aug 16 22:28:30 2021 -0400 +++ b/libinterp/corefcn/oct-iostrm.cc Tue Aug 17 11:17:36 2021 -0400 @@ -33,10 +33,12 @@ #include "error.h" #include "oct-iostrm.h" +OCTAVE_NAMESPACE_BEGIN + // Position a stream at OFFSET relative to ORIGIN. int -octave_base_iostream::seek (off_t, int) +base_iostream::seek (off_t, int) { invalid_operation (); return -1; @@ -45,7 +47,7 @@ // Return current stream position. off_t -octave_base_iostream::tell (void) +base_iostream::tell (void) { invalid_operation (); return -1; @@ -54,14 +56,14 @@ // Return nonzero if EOF has been reached on this stream. bool -octave_base_iostream::eof (void) const +base_iostream::eof (void) const { invalid_operation (); return false; } void -octave_base_iostream::invalid_operation (void) const +base_iostream::invalid_operation (void) const { // Note: use ::error to get error from error.h which halts operation. ::error ("%s: invalid operation", stream_type ()); @@ -70,27 +72,29 @@ // Return nonzero if EOF has been reached on this stream. bool -octave_istream::eof (void) const +istream::eof (void) const { return m_istream && m_istream->eof (); } octave::stream -octave_istream::create (std::istream *arg, const std::string& n) +istream::create (std::istream *arg, const std::string& n) { - return octave::stream (new octave_istream (arg, n)); + return octave::stream (new istream (arg, n)); } // Return nonzero if EOF has been reached on this stream. bool -octave_ostream::eof (void) const +ostream::eof (void) const { return m_ostream && m_ostream->eof (); } octave::stream -octave_ostream::create (std::ostream *arg, const std::string& n) +ostream::create (std::ostream *arg, const std::string& n) { - return octave::stream (new octave_ostream (arg, n)); + return octave::stream (new ostream (arg, n)); } + +OCTAVE_NAMESPACE_END