#include "octave-config.h"
#include <limits>
#include <sstream>
#include <string>
#include "str-vec.h"
#include "ls-ascii-helper.h"
Go to the source code of this file.
Macros | |
#define | CELL_ELT_TAG "<cell-element>" |
#define | OCT_RBV (std::numeric_limits<double>::max () / 100.0) |
Functions | |
OCTINTERP_API std::string | extract_keyword (std::istream &is, const char *keyword, const bool next_only=false) |
template<typename T > | |
bool | extract_keyword (std::istream &is, const char *keyword, T &value, const bool next_only=false) |
template<typename T > | |
bool | extract_keyword (std::istream &is, const std::string &kw, T &value, const bool next_only=false) |
template<typename T > | |
bool | extract_keyword (std::istream &is, const string_vector &keywords, std::string &kw, T &value, const bool next_only=false) |
OCTINTERP_API std::string | read_text_data (std::istream &is, const std::string &filename, bool &global, octave_value &tc, octave_idx_type count, const bool do_name_validation=true) |
OCTINTERP_API bool | save_text_data (std::ostream &os, const octave_value &val_arg, const std::string &name, bool mark_global, int precision) |
OCTINTERP_API bool | save_text_data_for_plotting (std::ostream &os, const octave_value &t, const std::string &name) |
OCTINTERP_API bool | save_three_d (std::ostream &os, const octave_value &t, bool parametric=false) |
#define CELL_ELT_TAG "<cell-element>" |
Definition at line 42 of file ls-oct-text.h.
#define OCT_RBV (std::numeric_limits<double>::max () / 100.0) |
Definition at line 47 of file ls-oct-text.h.
OCTINTERP_API std::string extract_keyword | ( | std::istream & | is, |
const char * | keyword, | ||
const bool | next_only = false |
||
) |
Definition at line 84 of file ls-oct-text.cc.
References len, read_until_newline(), Array< T >::resize(), retval, skip_until_newline(), and strlen().
Referenced by extract_keyword(), octave::load_save_system::get_file_format(), octave_base_diag< DMT, MT >::load_ascii(), octave_base_int_matrix< T >::load_ascii(), octave_base_sparse< T >::load_ascii(), octave_bool_matrix::load_ascii(), octave_cell::load_ascii(), octave_class::load_ascii(), octave_complex_matrix::load_ascii(), octave::anonymous_fcn_handle::load_ascii(), octave_fcn_handle::load_ascii(), octave_float_complex_matrix::load_ascii(), octave_float_matrix::load_ascii(), octave_perm_matrix::load_ascii(), octave_matrix::load_ascii(), octave_char_matrix_str::load_ascii(), octave_struct::load_ascii(), octave_scalar_struct::load_ascii(), load_inline_fcn(), and read_text_data().
bool extract_keyword | ( | std::istream & | is, |
const char * | keyword, | ||
T & | value, | ||
const bool | next_only = false |
||
) |
Definition at line 80 of file ls-oct-text.h.
References skip_until_newline(), and strlen().
bool extract_keyword | ( | std::istream & | is, |
const std::string & | kw, | ||
T & | value, | ||
const bool | next_only = false |
||
) |
Definition at line 127 of file ls-oct-text.h.
References extract_keyword().
bool extract_keyword | ( | std::istream & | is, |
const string_vector & | keywords, | ||
std::string & | kw, | ||
T & | value, | ||
const bool | next_only = false |
||
) |
Definition at line 143 of file ls-oct-text.h.
References string_vector::numel(), and skip_until_newline().
OCTINTERP_API std::string read_text_data | ( | std::istream & | is, |
const std::string & | filename, | ||
bool & | global, | ||
octave_value & | tc, | ||
octave_idx_type | count, | ||
const bool | do_name_validation = true |
||
) |
Definition at line 287 of file ls-oct-text.cc.
References octave::__get_type_info__(), CELL_ELT_TAG, error(), extract_keyword(), octave_value::load_ascii(), load_inline_fcn(), octave::type_info::lookup_type(), name, SUBSTRING_COMPARE_EQ, and octave::valid_identifier().
Referenced by octave_cell::load_ascii(), octave_class::load_ascii(), octave::anonymous_fcn_handle::load_ascii(), octave_lazy_index::load_ascii(), octave_struct::load_ascii(), octave_scalar_struct::load_ascii(), and octave::load_save_system::load_vars().
OCTINTERP_API bool save_text_data | ( | std::ostream & | os, |
const octave_value & | val_arg, | ||
const std::string & | name, | ||
bool | mark_global, | ||
int | precision | ||
) |
Definition at line 363 of file ls-oct-text.cc.
References name, octave_value::save_ascii(), octave_value::type_name(), and Vsave_precision.
Referenced by octave::load_save_system::do_save(), octave_cell::save_ascii(), octave_class::save_ascii(), octave::anonymous_fcn_handle::save_ascii(), octave_lazy_index::save_ascii(), octave_struct::save_ascii(), octave_scalar_struct::save_ascii(), and save_text_data_for_plotting().
OCTINTERP_API bool save_text_data_for_plotting | ( | std::ostream & | os, |
const octave_value & | t, | ||
const std::string & | name | ||
) |
Definition at line 397 of file ls-oct-text.cc.
References name, and save_text_data().
OCTINTERP_API bool save_three_d | ( | std::ostream & | os, |
const octave_value & | t, | ||
bool | parametric = false |
||
) |
Definition at line 410 of file ls-oct-text.cc.
References octave_value::columns(), error(), Matrix::extract(), octave_value::is_real_matrix(), octave_value::matrix_value(), octave_value::rows(), Array< T >::rows(), and warning().