GNU Octave  9.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
ls-oct-text.h File Reference
#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

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)
 
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)
 
bool save_text_data (std::ostream &os, const octave_value &val_arg, const std::string &name, bool mark_global, int precision)
 
bool save_text_data_for_plotting (std::ostream &os, const octave_value &t, const std::string &name)
 
bool save_three_d (std::ostream &os, const octave_value &t, bool parametric=false)
 

Macro Definition Documentation

◆ CELL_ELT_TAG

#define CELL_ELT_TAG   "<cell-element>"

Definition at line 42 of file ls-oct-text.h.

◆ OCT_RBV

#define OCT_RBV   (std::numeric_limits<double>::max () / 100.0)

Definition at line 47 of file ls-oct-text.h.

Function Documentation

◆ extract_keyword() [1/4]

◆ extract_keyword() [2/4]

template<typename T >
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().

◆ extract_keyword() [3/4]

template<typename T >
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().

◆ extract_keyword() [4/4]

template<typename T >
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().

◆ read_text_data()

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 
)

◆ save_text_data()

bool save_text_data ( std::ostream &  os,
const octave_value val_arg,
const std::string &  name,
bool  mark_global,
int  precision 
)

◆ save_text_data_for_plotting()

bool save_text_data_for_plotting ( std::ostream &  os,
const octave_value t,
const std::string &  name 
)

Definition at line 395 of file ls-oct-text.cc.

References save_text_data().

◆ save_three_d()

bool save_three_d ( std::ostream &  os,
const octave_value t,
bool  parametric = false 
)