Classes | Defines | Enumerations | Functions | Variables

ov-base.h File Reference

#include <cstdlib>
#include <iosfwd>
#include <list>
#include <string>
#include "Range.h"
#include "data-conv.h"
#include "mxarray.h"
#include "mx-base.h"
#include "str-vec.h"
#include "error.h"
#include "oct-hdf5.h"
Include dependency graph for ov-base.h:

Go to the source code of this file.

Classes

struct  class_to_btyp< T >
class  octave_base_value
class  octave_base_value::type_conv_info

Defines

#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)

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

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)
 DEF_CLASS_TO_BTYP (bool, btyp_bool)
 DEF_CLASS_TO_BTYP (octave_uint8, btyp_uint8)
 DEF_CLASS_TO_BTYP (octave_int64, btyp_int64)
 DEF_CLASS_TO_BTYP (octave_int32, btyp_int32)
 DEF_CLASS_TO_BTYP (octave_int16, btyp_int16)
 DEF_CLASS_TO_BTYP (octave_int8, btyp_int8)
 DEF_CLASS_TO_BTYP (FloatComplex, btyp_float_complex)
 DEF_CLASS_TO_BTYP (Complex, btyp_complex)
 DEF_CLASS_TO_BTYP (float, btyp_float)
 DEF_CLASS_TO_BTYP (double, btyp_double)
 DEF_CLASS_TO_BTYP (octave_uint64, btyp_uint64)
 DEF_CLASS_TO_BTYP (char, btyp_char)
 DEF_CLASS_TO_BTYP (octave_uint16, btyp_uint16)
 DEF_CLASS_TO_BTYP (octave_uint32, btyp_uint32)
OCTINTERP_API string_vector get_builtin_classes (void)

Variables

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

Define Documentation

#define DECLARE_OV_BASE_TYPEID_FUNCTIONS_AND_DATA   DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA2(virtual)

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

#define DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA   DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA2 (OCTAVE_EMPTY_CPP_ARG)

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

#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); \
 \
  private: \
    static int t_id; \
    static const std::string t_name; \
    static const std::string c_name;

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

#define DEF_CLASS_TO_BTYP (   CLASS,
  BTYP 
)
Value:
template <> \
struct class_to_btyp<CLASS> \
{ static const builtin_type_t btyp = BTYP; }

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

#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) \
    { \
      static t exemplar; \
      octave_value v (&exemplar, true); \
      t_id = octave_value_typeinfo::register_type (t::t_name, t::c_name, v); \
    }

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


Enumeration Type Documentation

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 59 of file ov-base.h.


Function Documentation

bool btyp_isarray ( builtin_type_t  btyp  )  [inline]

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

Referenced by build_sup_table().

bool btyp_isfloat ( builtin_type_t  btyp  )  [inline]

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

bool btyp_isinteger ( builtin_type_t  btyp  )  [inline]

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

References btyp_int8.

Referenced by build_sup_table().

bool btyp_isnumeric ( builtin_type_t  btyp  )  [inline]

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

OCTINTERP_API builtin_type_t btyp_mixed_numeric ( builtin_type_t  x,
builtin_type_t  y 
)
DEF_CLASS_TO_BTYP ( bool  ,
btyp_bool   
)
DEF_CLASS_TO_BTYP ( octave_uint8  ,
btyp_uint8   
)
DEF_CLASS_TO_BTYP ( octave_int64  ,
btyp_int64   
)
DEF_CLASS_TO_BTYP ( octave_int32  ,
btyp_int32   
)
DEF_CLASS_TO_BTYP ( octave_int16  ,
btyp_int16   
)
DEF_CLASS_TO_BTYP ( octave_int8  ,
btyp_int8   
)
DEF_CLASS_TO_BTYP ( FloatComplex  ,
btyp_float_complex   
)
DEF_CLASS_TO_BTYP ( Complex  ,
btyp_complex   
)
DEF_CLASS_TO_BTYP ( float  ,
btyp_float   
)
DEF_CLASS_TO_BTYP ( double  ,
btyp_double   
)
DEF_CLASS_TO_BTYP ( octave_uint64  ,
btyp_uint64   
)
DEF_CLASS_TO_BTYP ( char  ,
btyp_char   
)
DEF_CLASS_TO_BTYP ( octave_uint16  ,
btyp_uint16   
)
DEF_CLASS_TO_BTYP ( octave_uint32  ,
btyp_uint32   
)
OCTINTERP_API string_vector get_builtin_classes ( void   ) 

Variable Documentation

OCTINTERP_API std::string btyp_class_name[btyp_num_types]

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

Referenced by get_builtin_classes(), get_dispatch_type(), and make_fcn_handle().

OCTINTERP_API bool Vsparse_auto_mutate
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines