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

#include "load-save.h"

Collaboration diagram for octave::load_save_system:

Public Types

enum  format_options {
  MAT_ASCII_LONG = 1 , MAT_ASCII_TABS = 2 , MAT_BINARY_V5 = 1 , MAT_BINARY_V7 ,
  NO_OPTION = 0
}
 
enum  format_type {
  TEXT , BINARY , MAT_ASCII , MAT_BINARY ,
  MAT5_BINARY , MAT7_BINARY , HDF5 , UNKNOWN
}
 

Public Member Functions

 load_save_system (const load_save_system &)=delete
 
 load_save_system (interpreter &interp)
 
 ~load_save_system (void)
 
bool crash_dumps_octave_core (bool flag)
 
octave_value crash_dumps_octave_core (const octave_value_list &args, int nargout)
 
bool crash_dumps_octave_core (void) const
 
void dump_octave_core (void)
 
octave_value_list load (const octave_value_list &args=octave_value_list(), int nargout=0)
 
octave_value load_vars (std::istream &stream, const std::string &orig_fname, const load_save_format &fmt, mach_info::float_format flt_fmt, bool list_only, bool swap, bool verbose, const string_vector &argv, int argv_idx, int argc, int nargout)
 
octave_value octave_core_file_limit (const octave_value_list &args, int nargout)
 
double octave_core_file_limit (double limit)
 
double octave_core_file_limit (void) const
 
octave_value octave_core_file_name (const octave_value_list &args, int nargout)
 
std::string octave_core_file_name (const std::string &file)
 
std::string octave_core_file_name (void) const
 
octave_value octave_core_file_options (const octave_value_list &args, int nargout)
 
std::string octave_core_file_options (const std::string &options)
 
std::string octave_core_file_options (void) const
 
load_save_systemoperator= (const load_save_system &)=delete
 
octave_value_list save (const octave_value_list &args=octave_value_list(), int nargout=0)
 
octave_value save_default_options (const octave_value_list &args, int nargout)
 
std::string save_default_options (const std::string &options)
 
std::string save_default_options (void) const
 
octave_value save_header_format_string (const octave_value_list &args, int nargout)
 
std::string save_header_format_string (const std::string &format)
 
std::string save_header_format_string (void) const
 
void save_vars (const string_vector &argv, int argv_idx, int argc, std::ostream &os, const load_save_format &fmt, bool save_as_floats, bool write_header_info)
 

Static Public Member Functions

static load_save_format get_file_format (const std::string &fname, const std::string &orig_fname, bool &use_zlib, bool quiet=false)
 
static string_vector parse_save_options (const std::string &arg, load_save_format &fmt, bool &append, bool &save_as_floats, bool &use_zlib)
 
static string_vector parse_save_options (const string_vector &argv, load_save_format &fmt, bool &append, bool &save_as_floats, bool &use_zlib)
 

Private Member Functions

void do_save (std::ostream &os, const octave_value &tc, const std::string &name, const std::string &help, bool global, const load_save_format &fmt, bool save_as_floats)
 
void do_save (std::ostream &os, const symbol_info &syminfo, const load_save_format &fmt, bool save_as_floats)
 
void dump_octave_core (std::ostream &os, const char *fname, const load_save_format &fmt, bool save_as_floats)
 
void install_loaded_variable (const std::string &name, const octave_value &val, bool global, const std::string &)
 
size_t save_fields (std::ostream &os, const octave_scalar_map &m, const std::string &pattern, const load_save_format &fmt, bool save_as_floats)
 
size_t save_vars (std::ostream &os, const std::string &pattern, const load_save_format &fmt, bool save_as_floats)
 
template<typename T >
set (T &var, const T &new_val)
 
void write_header (std::ostream &os, const load_save_format &fmt)
 

Static Private Member Functions

static load_save_format get_file_format (std::istream &file, const std::string &filename)
 
static std::string init_save_header_format (void)
 

Private Attributes

bool m_crash_dumps_octave_core
 
interpreterm_interpreter
 
double m_octave_core_file_limit
 
std::string m_octave_core_file_name
 
std::string m_octave_core_file_options
 
std::string m_save_default_options
 
std::string m_save_header_format_string
 

Detailed Description

Definition at line 44 of file load-save.h.

Member Enumeration Documentation

◆ format_options

Enumerator
MAT_ASCII_LONG 
MAT_ASCII_TABS 
MAT_BINARY_V5 
MAT_BINARY_V7 
NO_OPTION 

Definition at line 64 of file load-save.h.

◆ format_type

Enumerator
TEXT 
BINARY 
MAT_ASCII 
MAT_BINARY 
MAT5_BINARY 
MAT7_BINARY 
HDF5 
UNKNOWN 

Definition at line 52 of file load-save.h.

Constructor & Destructor Documentation

◆ load_save_system() [1/2]

octave::load_save_system::load_save_system ( interpreter interp)

Definition at line 259 of file load-save.cc.

◆ ~load_save_system()

octave::load_save_system::~load_save_system ( void  )

Definition at line 273 of file load-save.cc.

◆ load_save_system() [2/2]

octave::load_save_system::load_save_system ( const load_save_system )
delete

Member Function Documentation

◆ crash_dumps_octave_core() [1/3]

bool octave::load_save_system::crash_dumps_octave_core ( bool  flag)
inline

Definition at line 92 of file load-save.h.

References m_crash_dumps_octave_core, and set().

◆ crash_dumps_octave_core() [2/3]

octave_value octave::load_save_system::crash_dumps_octave_core ( const octave_value_list args,
int  nargout 
)

◆ crash_dumps_octave_core() [3/3]

bool octave::load_save_system::crash_dumps_octave_core ( void  ) const
inline

Definition at line 87 of file load-save.h.

References m_crash_dumps_octave_core.

◆ do_save() [1/2]

void octave::load_save_system::do_save ( std::ostream &  os,
const octave_value tc,
const std::string &  name,
const std::string &  help,
bool  global,
const load_save_format fmt,
bool  save_as_floats 
)
private

◆ do_save() [2/2]

void octave::load_save_system::do_save ( std::ostream &  os,
const symbol_info syminfo,
const load_save_format fmt,
bool  save_as_floats 
)
private

◆ dump_octave_core() [1/2]

void octave::load_save_system::dump_octave_core ( std::ostream &  os,
const char *  fname,
const load_save_format fmt,
bool  save_as_floats 
)
private

◆ dump_octave_core() [2/2]

◆ get_file_format() [1/2]

load_save_format octave::load_save_system::get_file_format ( const std::string &  fname,
const std::string &  orig_fname,
bool &  use_zlib,
bool  quiet = false 
)
static

◆ get_file_format() [2/2]

load_save_format octave::load_save_system::get_file_format ( std::istream &  file,
const std::string &  filename 
)
staticprivate

◆ init_save_header_format()

std::string octave::load_save_system::init_save_header_format ( void  )
staticprivate

◆ install_loaded_variable()

void octave::load_save_system::install_loaded_variable ( const std::string &  name,
const octave_value val,
bool  global,
const std::string &   
)
private

Definition at line 1062 of file load-save.cc.

References octave::interpreter::install_variable(), m_interpreter, and name.

Referenced by load_vars().

◆ load()

◆ load_vars()

◆ octave_core_file_limit() [1/3]

octave_value octave::load_save_system::octave_core_file_limit ( const octave_value_list args,
int  nargout 
)

Definition at line 289 of file load-save.cc.

References m_octave_core_file_limit, and set_internal_variable().

Referenced by Foctave_core_file_limit().

◆ octave_core_file_limit() [2/3]

double octave::load_save_system::octave_core_file_limit ( double  limit)
inline

Definition at line 105 of file load-save.h.

References m_octave_core_file_limit, and set().

◆ octave_core_file_limit() [3/3]

double octave::load_save_system::octave_core_file_limit ( void  ) const
inline

Definition at line 100 of file load-save.h.

References m_octave_core_file_limit.

◆ octave_core_file_name() [1/3]

octave_value octave::load_save_system::octave_core_file_name ( const octave_value_list args,
int  nargout 
)

Definition at line 297 of file load-save.cc.

References m_octave_core_file_name, and set_internal_variable().

Referenced by Foctave_core_file_name().

◆ octave_core_file_name() [2/3]

std::string octave::load_save_system::octave_core_file_name ( const std::string &  file)
inline

Definition at line 118 of file load-save.h.

References m_octave_core_file_name, and set().

◆ octave_core_file_name() [3/3]

std::string octave::load_save_system::octave_core_file_name ( void  ) const
inline

Definition at line 113 of file load-save.h.

References m_octave_core_file_name.

◆ octave_core_file_options() [1/3]

octave_value octave::load_save_system::octave_core_file_options ( const octave_value_list args,
int  nargout 
)

Definition at line 313 of file load-save.cc.

References m_octave_core_file_options, and set_internal_variable().

Referenced by Foctave_core_file_options().

◆ octave_core_file_options() [2/3]

std::string octave::load_save_system::octave_core_file_options ( const std::string &  options)
inline

Definition at line 144 of file load-save.h.

References m_octave_core_file_options, and set().

◆ octave_core_file_options() [3/3]

std::string octave::load_save_system::octave_core_file_options ( void  ) const
inline

Definition at line 139 of file load-save.h.

References m_octave_core_file_options.

◆ operator=()

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

◆ parse_save_options() [1/2]

string_vector octave::load_save_system::parse_save_options ( const std::string &  arg,
load_save_format fmt,
bool &  append,
bool &  save_as_floats,
bool &  use_zlib 
)
static

Definition at line 652 of file load-save.cc.

References string_vector::append(), and parse_save_options().

◆ parse_save_options() [2/2]

string_vector octave::load_save_system::parse_save_options ( const string_vector argv,
load_save_format fmt,
bool &  append,
bool &  save_as_floats,
bool &  use_zlib 
)
static

◆ save()

◆ save_default_options() [1/3]

octave_value octave::load_save_system::save_default_options ( const octave_value_list args,
int  nargout 
)

◆ save_default_options() [2/3]

std::string octave::load_save_system::save_default_options ( const std::string &  options)
inline

Definition at line 131 of file load-save.h.

References m_save_default_options, and set().

◆ save_default_options() [3/3]

std::string octave::load_save_system::save_default_options ( void  ) const
inline

Definition at line 126 of file load-save.h.

References m_save_default_options.

Referenced by save().

◆ save_fields()

size_t octave::load_save_system::save_fields ( std::ostream &  os,
const octave_scalar_map m,
const std::string &  pattern,
const load_save_format fmt,
bool  save_as_floats 
)
private

Definition at line 996 of file load-save.cc.

References do_save(), m, and glob_match::match().

Referenced by save_vars().

◆ save_header_format_string() [1/3]

octave_value octave::load_save_system::save_header_format_string ( const octave_value_list args,
int  nargout 
)

Definition at line 321 of file load-save.cc.

References m_save_header_format_string, and set_internal_variable().

Referenced by Fsave_header_format_string().

◆ save_header_format_string() [2/3]

std::string octave::load_save_system::save_header_format_string ( const std::string &  format)
inline

Definition at line 157 of file load-save.h.

References octave::format(), m_save_header_format_string, and set().

◆ save_header_format_string() [3/3]

std::string octave::load_save_system::save_header_format_string ( void  ) const
inline

Definition at line 152 of file load-save.h.

References m_save_header_format_string.

◆ save_vars() [1/2]

void octave::load_save_system::save_vars ( const string_vector argv,
int  argv_idx,
int  argc,
std::ostream &  os,
const load_save_format fmt,
bool  save_as_floats,
bool  write_header_info 
)

◆ save_vars() [2/2]

size_t octave::load_save_system::save_vars ( std::ostream &  os,
const std::string &  pattern,
const load_save_format fmt,
bool  save_as_floats 
)
private

◆ set()

template<typename T >
T octave::load_save_system::set ( T &  var,
const T &  new_val 
)
inlineprivate

◆ write_header()

Member Data Documentation

◆ m_crash_dumps_octave_core

bool octave::load_save_system::m_crash_dumps_octave_core
private

Definition at line 207 of file load-save.h.

Referenced by crash_dumps_octave_core(), and dump_octave_core().

◆ m_interpreter

interpreter& octave::load_save_system::m_interpreter
private

Definition at line 203 of file load-save.h.

Referenced by dump_octave_core(), install_loaded_variable(), and save_vars().

◆ m_octave_core_file_limit

double octave::load_save_system::m_octave_core_file_limit
private

Definition at line 211 of file load-save.h.

Referenced by dump_octave_core(), and octave_core_file_limit().

◆ m_octave_core_file_name

std::string octave::load_save_system::m_octave_core_file_name
private

Definition at line 214 of file load-save.h.

Referenced by dump_octave_core(), and octave_core_file_name().

◆ m_octave_core_file_options

std::string octave::load_save_system::m_octave_core_file_options
private

Definition at line 221 of file load-save.h.

Referenced by dump_octave_core(), and octave_core_file_options().

◆ m_save_default_options

std::string octave::load_save_system::m_save_default_options
private

Definition at line 218 of file load-save.h.

Referenced by save_default_options().

◆ m_save_header_format_string

std::string octave::load_save_system::m_save_header_format_string
private

Definition at line 226 of file load-save.h.

Referenced by save_header_format_string(), and write_header().


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