GNU Octave  4.0.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Macros | Functions
ov-type-conv.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define OCTAVE_TYPE_CONV_BODY(NAME)
 
#define OCTAVE_TYPE_CONV_BODY3(NAME, MATRIX_RESULT_T, SCALAR_RESULT_T)
 

Functions

static octave_value octave_type_conv_body (const octave_value &arg, const std::string &name, int t_result)
 

Macro Definition Documentation

#define OCTAVE_TYPE_CONV_BODY (   NAME)
Value:
OCTAVE_TYPE_CONV_BODY3 (NAME, octave_ ## NAME ## _matrix, \
octave_ ## NAME ## _scalar)
Definition: oct-parse.h:98
#define OCTAVE_TYPE_CONV_BODY3(NAME, MATRIX_RESULT_T, SCALAR_RESULT_T)
Definition: ov-type-conv.h:77

Definition at line 106 of file ov-type-conv.h.

Referenced by Fint16(), Fint32(), Fint64(), Fint8(), Fuint16(), Fuint32(), Fuint64(), and Fuint8().

#define OCTAVE_TYPE_CONV_BODY3 (   NAME,
  MATRIX_RESULT_T,
  SCALAR_RESULT_T 
)
Value:
octave_value retval; \
\
int nargin = args.length (); \
\
if (nargin == 1) \
{ \
const octave_value arg = args(0); \
\
int t_result = MATRIX_RESULT_T::static_type_id (); \
\
retval = octave_type_conv_body (arg, #NAME, t_result); \
if (retval.is_undefined ()) \
{ \
std::string arg_tname = arg.type_name (); \
\
std::string result_tname = arg.numel () == 1 \
? SCALAR_RESULT_T::static_type_name () \
: MATRIX_RESULT_T::static_type_name (); \
gripe_invalid_conversion (arg_tname, result_tname); \
} \
} \
\
return retval
OCTINTERP_API void print_usage(void)
Definition: defun.cc:51
Definition: oct-parse.h:98
double arg(double x)
Definition: lo-mappers.h:37
void gripe_invalid_conversion(const std::string &from, const std::string &to)
Definition: gripes.cc:99
static octave_value octave_type_conv_body(const octave_value &arg, const std::string &name, int t_result)
Definition: ov-type-conv.h:28
return octave_value(v1.char_array_value().concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string())? '\'': '"'))

Definition at line 77 of file ov-type-conv.h.

Referenced by Fdouble(), and Fsingle().

Function Documentation

static octave_value octave_type_conv_body ( const octave_value arg,
const std::string &  name,
int  t_result 
)
static