GNU Octave  8.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
stream_list Class Reference

#include "oct-stream.h"

Collaboration diagram for stream_list:

Public Member Functions

 stream_list (const stream_list &)=delete
 
OCTINTERP_API stream_list (interpreter &interp)
 
OCTINTERP_API ~stream_list (void)
 
OCTINTERP_API void clear (bool flush=true)
 
OCTINTERP_API int get_file_number (const octave_value &fid) const
 
OCTINTERP_API string_vector get_info (const octave_value &fid) const
 
OCTINTERP_API string_vector get_info (int fid) const
 
OCTINTERP_API int insert (stream &os)
 
OCTINTERP_API std::string list_open_files (void) const
 
OCTINTERP_API stream lookup (const octave_value &fid, const std::string &who="") const
 
OCTINTERP_API stream lookup (int fid, const std::string &who="") const
 
OCTINTERP_API octave_value open_file_numbers (void) const
 
stream_listoperator= (const stream_list &)=delete
 
OCTINTERP_API int remove (const octave_value &fid, const std::string &who="")
 
OCTINTERP_API int remove (int fid, const std::string &who="")
 
OCTINTERP_API octave_value stderr_file (void) const
 
OCTINTERP_API octave_value stdin_file (void) const
 
OCTINTERP_API octave_value stdout_file (void) const
 

Private Types

typedef std::map< int, streamostrl_map
 

Private Attributes

ostrl_map m_list
 
ostrl_map::const_iterator m_lookup_cache
 
int m_stderr_file
 
int m_stdin_file
 
int m_stdout_file
 

Detailed Description

Definition at line 500 of file oct-stream.h.

Member Typedef Documentation

◆ ostrl_map

typedef std::map<int, stream> stream_list::ostrl_map
private

Definition at line 540 of file oct-stream.h.

Constructor & Destructor Documentation

◆ stream_list() [1/2]

◆ stream_list() [2/2]

stream_list::stream_list ( const stream_list )
delete

◆ ~stream_list()

stream_list::~stream_list ( void  )

Definition at line 7415 of file oct-stream.cc.

References clear().

Member Function Documentation

◆ clear()

void stream_list::clear ( bool  flush = true)

Definition at line 7535 of file oct-stream.cc.

References stream::close(), stream::is_valid(), m_list, m_lookup_cache, stream::name(), and transform().

Referenced by ~stream_list(), and remove().

◆ get_file_number()

int stream_list::get_file_number ( const octave_value fid) const

◆ get_info() [1/2]

string_vector stream_list::get_info ( const octave_value fid) const

◆ get_info() [2/2]

◆ insert()

int stream_list::insert ( stream os)

Definition at line 7420 of file oct-stream.cc.

References error(), stream::file_number(), and m_list.

Referenced by stream_list(), Ffopen(), Fmkstemp(), Fpipe(), Fpopen(), Fpopen2(), and Ftmpfile().

◆ list_open_files()

std::string stream_list::list_open_files ( void  ) const

◆ lookup() [1/2]

stream stream_list::lookup ( const octave_value fid,
const std::string &  who = "" 
) const

Definition at line 7483 of file oct-stream.cc.

References get_file_number(), and lookup().

◆ lookup() [2/2]

stream stream_list::lookup ( int  fid,
const std::string &  who = "" 
) const

◆ open_file_numbers()

octave_value stream_list::open_file_numbers ( void  ) const

Definition at line 7655 of file oct-stream.cc.

References m_list, and Matrix::resize().

Referenced by Ffopen().

◆ operator=()

stream_list& stream_list::operator= ( const stream_list )
delete

◆ remove() [1/2]

int stream_list::remove ( const octave_value fid,
const std::string &  who = "" 
)

◆ remove() [2/2]

int stream_list::remove ( int  fid,
const std::string &  who = "" 
)

Definition at line 7491 of file oct-stream.cc.

References stream::close(), err_invalid_file_id(), stream::is_valid(), m_list, and m_lookup_cache.

Referenced by Ffclose(), Fpclose(), and remove().

◆ stderr_file()

octave_value stream_list::stderr_file ( void  ) const

Definition at line 7723 of file oct-stream.cc.

References m_stderr_file, and octave_value().

Referenced by Fstderr().

◆ stdin_file()

octave_value stream_list::stdin_file ( void  ) const

Definition at line 7713 of file oct-stream.cc.

References m_stdin_file, and octave_value().

Referenced by Fstdin().

◆ stdout_file()

octave_value stream_list::stdout_file ( void  ) const

Definition at line 7718 of file oct-stream.cc.

References m_stdout_file, and octave_value().

Referenced by Fstdout().

Member Data Documentation

◆ m_list

ostrl_map stream_list::m_list
private

◆ m_lookup_cache

ostrl_map::const_iterator stream_list::m_lookup_cache
mutableprivate

Definition at line 544 of file oct-stream.h.

Referenced by clear(), get_info(), lookup(), and remove().

◆ m_stderr_file

int stream_list::m_stderr_file
private

Definition at line 548 of file oct-stream.h.

Referenced by stream_list(), and stderr_file().

◆ m_stdin_file

int stream_list::m_stdin_file
private

Definition at line 546 of file oct-stream.h.

Referenced by stream_list(), and stdin_file().

◆ m_stdout_file

int stream_list::m_stdout_file
private

Definition at line 547 of file oct-stream.h.

Referenced by stream_list(), and stdout_file().


The documentation for this class was generated from the following files: