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

#include "oct-stream.h"

Collaboration diagram for octave::stream_list:

Public Member Functions

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

Private Types

typedef std::map< int, streamostrl_map
 

Private Attributes

ostrl_map list
 
ostrl_map::const_iterator lookup_cache
 
int m_stderr_file
 
int m_stdin_file
 
int m_stdout_file
 

Detailed Description

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

Member Typedef Documentation

◆ ostrl_map

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

Constructor & Destructor Documentation

◆ stream_list() [1/2]

octave::stream_list::stream_list ( interpreter interp)

◆ stream_list() [2/2]

octave::stream_list::stream_list ( const stream_list )
delete

◆ ~stream_list()

octave::stream_list::~stream_list ( void  )

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

References clear().

Member Function Documentation

◆ clear()

void octave::stream_list::clear ( bool  flush = true)

◆ get_file_number()

int octave::stream_list::get_file_number ( const octave_value fid) const

◆ get_info() [1/2]

string_vector octave::stream_list::get_info ( int  fid) const

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

References fid, list, os, and retval.

Referenced by if().

◆ get_info() [2/2]

string_vector octave::stream_list::get_info ( const octave_value fid) const

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

References octave::convert_to_valid_int(), error(), and fid.

◆ insert()

int octave::stream_list::insert ( stream os)

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

References error(), octave::stream::file_number(), list, and os.

Referenced by stream_list().

◆ list_open_files()

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

◆ lookup() [1/2]

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

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

References octave::err_invalid_file_id(), fid, list, lookup_cache, and retval.

Referenced by Fdup2(), Ffrewind(), and Ffwrite().

◆ lookup() [2/2]

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

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

References fid, i, and lookup().

◆ open_file_numbers()

octave_value octave::stream_list::open_file_numbers ( void  ) const

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

References list, octave_value::resize(), and retval.

Referenced by if().

◆ operator=()

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

◆ remove() [1/2]

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

◆ remove() [2/2]

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

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

References fid, i, and retval.

◆ stderr_file()

octave_value octave::stream_list::stderr_file ( void  ) const

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

References octave_value().

◆ stdin_file()

octave_value octave::stream_list::stdin_file ( void  ) const

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

References octave_value().

◆ stdout_file()

octave_value octave::stream_list::stdout_file ( void  ) const

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

References octave_value().

Member Data Documentation

◆ list

ostrl_map octave::stream_list::list
private

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

Referenced by insert(), and lookup().

◆ lookup_cache

ostrl_map::const_iterator octave::stream_list::lookup_cache
mutableprivate

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

Referenced by lookup().

◆ m_stderr_file

int octave::stream_list::m_stderr_file
private

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

Referenced by stream_list().

◆ m_stdin_file

int octave::stream_list::m_stdin_file
private

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

Referenced by stream_list().

◆ m_stdout_file

int octave::stream_list::m_stdout_file
private

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

Referenced by stream_list().


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