GNU Octave  4.4.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
ov-base.h File Reference
#include "octave-config.h"
#include <cstdlib>
#include <iosfwd>
#include <list>
#include <string>
#include "Range.h"
#include "data-conv.h"
#include "mx-base.h"
#include "str-vec.h"
#include "error.h"
#include "oct-hdf5-types.h"
#include "oct-stream.h"
Include dependency graph for ov-base.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  class_to_btyp< T >
 
struct  class_to_btyp< bool >
 
struct  class_to_btyp< char >
 
struct  class_to_btyp< Complex >
 
struct  class_to_btyp< double >
 
struct  class_to_btyp< float >
 
struct  class_to_btyp< FloatComplex >
 
struct  class_to_btyp< octave_int16 >
 
struct  class_to_btyp< octave_int32 >
 
struct  class_to_btyp< octave_int64 >
 
struct  class_to_btyp< octave_int8 >
 
struct  class_to_btyp< octave_uint16 >
 
struct  class_to_btyp< octave_uint32 >
 
struct  class_to_btyp< octave_uint64 >
 
struct  class_to_btyp< octave_uint8 >
 
class  octave_base_value
 
class  octave_base_value::type_conv_info
 

Namespaces

 octave
 

Macros

#define DECLARE_OV_BASE_TYPEID_FUNCTIONS_AND_DATA   DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA2(virtual)
 
#define DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA   DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA2 (OCTAVE_EMPTY_CPP_ARG)
 
#define DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA2(VIRTUAL)
 
#define DEF_CLASS_TO_BTYP(CLASS, BTYP)
 
#define DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA(t, n, c)
 
#define OCTAVE_EMPTY_CPP_ARG   /* empty */
 

Enumerations

enum  builtin_type_t {
  btyp_double, btyp_float, btyp_complex, btyp_float_complex,
  btyp_int8, btyp_int16, btyp_int32, btyp_int64,
  btyp_uint8, btyp_uint16, btyp_uint32, btyp_uint64,
  btyp_bool, btyp_char, btyp_struct, btyp_cell,
  btyp_func_handle, btyp_unknown, btyp_num_types = btyp_unknown
}
 

Functions

type_info & octave::__get_type_info__ (const std::string &who)
 
bool btyp_isarray (builtin_type_t btyp)
 
bool btyp_isfloat (builtin_type_t btyp)
 
bool btyp_isinteger (builtin_type_t btyp)
 
bool btyp_isnumeric (builtin_type_t btyp)
 
OCTINTERP_API builtin_type_t btyp_mixed_numeric (builtin_type_t x, builtin_type_t y)
 Determine the resulting type for a possible mixed-type operation. More...
 
OCTINTERP_API bool called_from_builtin (void)
 
OCTINTERP_API octave_value make_idx_args (const std::string &type, const std::list< octave_value_list > &idx, const std::string &who)
 

Variables

OCTINTERP_API std::string btyp_class_name [btyp_num_types]
 
OCTINTERP_API bool Vsparse_auto_mutate
 

Macro Definition Documentation

◆ DECLARE_OV_BASE_TYPEID_FUNCTIONS_AND_DATA

#define DECLARE_OV_BASE_TYPEID_FUNCTIONS_AND_DATA   DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA2(virtual)

Definition at line 161 of file ov-base.h.

◆ DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA

#define DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA   DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA2 (OCTAVE_EMPTY_CPP_ARG)

Definition at line 158 of file ov-base.h.

◆ DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA2

#define DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA2 (   VIRTUAL)
Value:
public: \
VIRTUAL int type_id (void) const { return t_id; } \
VIRTUAL std::string type_name (void) const { return t_name; } \
VIRTUAL std::string class_name (void) const { return c_name; } \
static int static_type_id (void) { return t_id; } \
static std::string static_type_name (void) { return t_name; } \
static std::string static_class_name (void) { return c_name; } \
static void register_type (void); \
static void register_type (octave::type_info&); \
\
private: \
static int t_id; \
static const std::string t_name; \
static const std::string c_name;
int register_type(const std::string &t_name, const std::string &c_name, const octave_value &val)
Definition: ov-typeinfo.cc:762
If this string is the system will ring the terminal sometimes it is useful to be able to print the original representation of the string
Definition: utils.cc:888

Definition at line 164 of file ov-base.h.

◆ DEF_CLASS_TO_BTYP

#define DEF_CLASS_TO_BTYP (   CLASS,
  BTYP 
)
Value:
template <> \
{ \
static const builtin_type_t btyp = BTYP; \
}
builtin_type_t
Definition: ov-base.h:71

Definition at line 131 of file ov-base.h.

◆ DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA

#define DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (   t,
  n,
  c 
)
Value:
int t::t_id (-1); \
const std::string t::t_name (n); \
const std::string t::c_name (c); \
void t::register_type (void) \
{ \
octave::type_info& type_info \
= octave::__get_type_info__ (#t "::register_type"); \
register_type (type_info); \
} \
{ \
octave_value v (new t ()); \
t_id = ti.register_type (t::t_name, t::c_name, v); \
}
OCTAVE_EXPORT octave_value_list return the number of command line arguments passed to Octave If called with the optional argument the function t
Definition: ov-usr-fcn.cc:997
nd example oindent opens the file binary numeric values will be read assuming they are stored in IEEE format with the least significant bit and then converted to the native representation Opening a file that is already open simply opens it again and returns a separate file id It is not an error to open a file several though writing to the same file through several different file ids may produce unexpected results The possible values of text mode reading and writing automatically converts linefeeds to the appropriate line end character for the you may append a you must also open the file in binary mode The parameter conversions are currently only supported for and permissions will be set to and then everything is written in a single operation This is very efficient and improves performance c
Definition: file-io.cc:587
type_info & __get_type_info__(const std::string &who)
int register_type(const std::string &t_name, const std::string &c_name, const octave_value &val)
Definition: ov-typeinfo.cc:762
If this string is the system will ring the terminal sometimes it is useful to be able to print the original representation of the string
Definition: utils.cc:888

Definition at line 180 of file ov-base.h.

◆ OCTAVE_EMPTY_CPP_ARG

#define OCTAVE_EMPTY_CPP_ARG   /* empty */

Definition at line 156 of file ov-base.h.

Enumeration Type Documentation

◆ builtin_type_t

Enumerator
btyp_double 
btyp_float 
btyp_complex 
btyp_float_complex 
btyp_int8 
btyp_int16 
btyp_int32 
btyp_int64 
btyp_uint8 
btyp_uint16 
btyp_uint32 
btyp_uint64 
btyp_bool 
btyp_char 
btyp_struct 
btyp_cell 
btyp_func_handle 
btyp_unknown 
btyp_num_types 

Definition at line 71 of file ov-base.h.

Function Documentation

◆ btyp_isarray()

bool btyp_isarray ( builtin_type_t  btyp)
inline

Definition at line 106 of file ov-base.h.

References btyp_char.

Referenced by octave::build_sup_table().

◆ btyp_isfloat()

bool btyp_isfloat ( builtin_type_t  btyp)
inline

Definition at line 103 of file ov-base.h.

References btyp_float_complex.

◆ btyp_isinteger()

bool btyp_isinteger ( builtin_type_t  btyp)
inline

Definition at line 100 of file ov-base.h.

References btyp_int8, and btyp_uint64.

Referenced by octave::build_sup_table().

◆ btyp_isnumeric()

bool btyp_isnumeric ( builtin_type_t  btyp)
inline

Definition at line 97 of file ov-base.h.

References btyp_uint64.

◆ btyp_mixed_numeric()

OCTINTERP_API builtin_type_t btyp_mixed_numeric ( builtin_type_t  x,
builtin_type_t  y 
)

Determine the resulting type for a possible mixed-type operation.

Rules for the resulting type:

  • bool -> double
  • single + double -> single
  • real + complex -> complex
  • integer + real -> integer
  • uint + uint -> uint (the bigger one)
  • sint + sint -> sint (the bigger one)
Returns
The resulting type or "unknown type", if the resulting type cannot be determined.

Definition at line 63 of file ov-base.cc.

References btyp_bool, btyp_double, btyp_float, btyp_float_complex, btyp_int64, btyp_int8, btyp_uint64, btyp_uint8, btyp_unknown, retval, x, and y.

Referenced by do_minmax_body().

◆ called_from_builtin()

◆ make_idx_args()

Variable Documentation

◆ btyp_class_name

OCTINTERP_API std::string btyp_class_name[btyp_num_types]

Definition at line 87 of file ov-base.cc.

Referenced by octave::get_dispatch_type(), and make_fcn_handle().

◆ Vsparse_auto_mutate