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

#include "load-save.h"

Collaboration diagram for 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
 
OCTINTERP_API load_save_system (interpreter &interp)
 
OCTINTERP_API ~load_save_system (void)
 
bool crash_dumps_octave_core (bool flag)
 
OCTINTERP_API octave_value crash_dumps_octave_core (const octave_value_list &args, int nargout)
 
bool crash_dumps_octave_core (void) const
 
OCTINTERP_API void dump_octave_core (void)
 
OCTINTERP_API octave_value_list load (const octave_value_list &args=octave_value_list(), int nargout=0)
 
OCTINTERP_API 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
 
OCTINTERP_API 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
 
OCTINTERP_API 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
 
OCTINTERP_API octave_value_list save (const octave_value_list &args=octave_value_list(), int nargout=0)
 
OCTINTERP_API 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
 
OCTINTERP_API 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
 
OCTINTERP_API 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 OCTINTERP_API load_save_format get_file_format (const std::string &fname, const std::string &orig_fname, bool &use_zlib, bool quiet=false)
 
static OCTINTERP_API string_vector parse_save_options (const std::string &arg, load_save_format &fmt, bool &append, bool &save_as_floats, bool &use_zlib)
 
static OCTINTERP_API 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

OCTINTERP_API 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)
 
OCTINTERP_API void do_save (std::ostream &os, const symbol_info &syminfo, const load_save_format &fmt, bool save_as_floats)
 
OCTINTERP_API void dump_octave_core (std::ostream &os, const char *fname, const load_save_format &fmt, bool save_as_floats)
 
OCTINTERP_API void install_loaded_variable (const std::string &name, const octave_value &val, bool global, const std::string &)
 
OCTINTERP_API std::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)
 
OCTINTERP_API std::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)
 
OCTINTERP_API void write_header (std::ostream &os, const load_save_format &fmt)
 

Static Private Member Functions

static OCTINTERP_API load_save_format get_file_format (std::istream &file, const std::string &filename)
 
static OCTINTERP_API 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]

load_save_system::load_save_system ( interpreter interp)

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

◆ ~load_save_system()

load_save_system::~load_save_system ( void  )

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

◆ load_save_system() [2/2]

load_save_system::load_save_system ( const load_save_system )
delete

Member Function Documentation

◆ crash_dumps_octave_core() [1/3]

bool 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 load_save_system::crash_dumps_octave_core ( const octave_value_list args,
int  nargout 
)

◆ crash_dumps_octave_core() [3/3]

bool 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 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 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 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 load_save_system::get_file_format ( const std::string &  fname,
const std::string &  orig_fname,
bool &  use_zlib,
bool  quiet = false 
)
static

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

References check_gzip_magic(), gzifstream::close(), err_file_open(), get_ASCII_filename(), HDF5, ifstream(), and UNKNOWN.

Referenced by load().

◆ get_file_format() [2/2]

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

◆ init_save_header_format()

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

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

References OCTAVE_VERSION.

◆ install_loaded_variable()

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

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

References interpreter::install_variable(), and m_interpreter.

Referenced by load_vars().

◆ load()

◆ load_vars()

◆ octave_core_file_limit() [1/3]

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

Definition at line 287 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 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 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 load_save_system::octave_core_file_name ( const octave_value_list args,
int  nargout 
)

Definition at line 295 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 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 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 load_save_system::octave_core_file_options ( const octave_value_list args,
int  nargout 
)

Definition at line 311 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 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 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& load_save_system::operator= ( const load_save_system )
delete

◆ parse_save_options() [1/2]

string_vector 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 658 of file load-save.cc.

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

◆ parse_save_options() [2/2]

string_vector 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 load_save_system::save_default_options ( const octave_value_list args,
int  nargout 
)

◆ save_default_options() [2/3]

std::string 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 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()

std::size_t 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 1003 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 load_save_system::save_header_format_string ( const octave_value_list args,
int  nargout 
)

Definition at line 319 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 load_save_system::save_header_format_string ( const std::string &  format)
inline

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

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

◆ save_header_format_string() [3/3]

std::string 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 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]

std::size_t 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 load_save_system::set ( T &  var,
const T &  new_val 
)
inlineprivate

◆ write_header()

void load_save_system::write_header ( std::ostream &  os,
const load_save_format fmt 
)
private

Member Data Documentation

◆ m_crash_dumps_octave_core

bool load_save_system::m_crash_dumps_octave_core
private

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

Referenced by crash_dumps_octave_core(), and dump_octave_core().

◆ m_interpreter

interpreter& load_save_system::m_interpreter
private

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

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

◆ m_octave_core_file_limit

double load_save_system::m_octave_core_file_limit
private

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

Referenced by dump_octave_core(), and octave_core_file_limit().

◆ m_octave_core_file_name

std::string load_save_system::m_octave_core_file_name
private

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

Referenced by dump_octave_core(), and octave_core_file_name().

◆ m_octave_core_file_options

std::string load_save_system::m_octave_core_file_options
private

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

Referenced by dump_octave_core(), and octave_core_file_options().

◆ m_save_default_options

std::string load_save_system::m_save_default_options
private

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

Referenced by save_default_options().

◆ m_save_header_format_string

std::string load_save_system::m_save_header_format_string
private

Definition at line 224 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: