Defines | Functions

op-str-str.cc File Reference

#include "gripes.h"
#include "oct-obj.h"
#include "ov.h"
#include "ov-str-mat.h"
#include "ov-typeinfo.h"
#include "ov-null-mat.h"
#include "ops.h"
Include dependency graph for op-str-str.cc:

Go to the source code of this file.

Defines

#define DEFCHARNDBINOP_FN(name, op, t1, t2, e1, e2, f)

Functions

 DEFASSIGNOP (assign, char_matrix_str, char_matrix_str)
 DEFUNOP (transpose, char_matrix_str)
void install_str_str_ops (void)

Define Documentation

#define DEFCHARNDBINOP_FN (   name,
  op,
  t1,
  t2,
  e1,
  e2,
  f 
)
Value:
BINOPDECL (name, a1, a2) \
  { \
    dim_vector a1_dims = a1.dims (); \
    dim_vector a2_dims = a2.dims (); \
 \
    bool a1_is_scalar = a1_dims.all_ones (); \
    bool a2_is_scalar = a2_dims.all_ones (); \
 \
    CAST_BINOP_ARGS (const octave_ ## t1&, const octave_ ## t2&); \
 \
    if (a1_is_scalar) \
      { \
        if (a2_is_scalar) \
          return octave_value ((v1.e1 ## _value ())(0) op (v2.e2 ## _value ())(0)); \
        else \
          return octave_value (f ((v1.e1 ## _value ())(0), v2.e2 ## _value ())); \
      } \
    else \
      { \
        if (a2_is_scalar) \
          return octave_value (f (v1.e1 ## _value (), (v2.e2 ## _value ())(0))); \
        else \
          return octave_value (f (v1.e1 ## _value (), v2.e2 ## _value ())); \
      } \
  }

Definition at line 53 of file op-str-str.cc.


Function Documentation

DEFASSIGNOP ( assign  ,
char_matrix_str  ,
char_matrix_str   
)

Definition at line 87 of file op-str-str.cc.

References CAST_BINOP_ARGS(), and octave_value().

DEFUNOP ( transpose  ,
char_matrix_str   
)

Definition at line 37 of file op-str-str.cc.

References CAST_UNOP_ARG, error(), and octave_value().

void install_str_str_ops ( void   ) 

Definition at line 100 of file op-str-str.cc.

References INSTALL_ASSIGNOP, INSTALL_BINOP, INSTALL_CATOP, INSTALL_UNOP, and transpose().

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines