GNU Octave
3.8.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
|
#include <iostream>
#include "Array-util.h"
#include "byte-swap.h"
#include "oct-locbuf.h"
#include "lo-mappers.h"
#include "Cell.h"
#include "defun.h"
#include "error.h"
#include "file-ops.h"
#include "gripes.h"
#include "load-path.h"
#include "ls-hdf5.h"
#include "ls-oct-ascii.h"
#include "ls-oct-binary.h"
#include "ls-utils.h"
#include "mxarray.h"
#include "oct-lvalue.h"
#include "ov-class.h"
#include "ov-fcn.h"
#include "ov-usr-fcn.h"
#include "pager.h"
#include "parse.h"
#include "pr-output.h"
#include "toplev.h"
#include "unwind-prot.h"
#include "variables.h"
Go to the source code of this file.
Functions | |
static bool | called_from_builtin (void) |
DEFINE_OCTAVE_ALLOCATOR (octave_class) | |
DEFUN (class, args,,"-*- texinfo -*-\n\ @deftypefn {Function File} {@var{classname} =} class (@var{obj})\n\ @deftypefnx {Function File} {} class (@var{s}, @var{id})\n\ @deftypefnx {Function File} {} class (@var{s}, @var{id}, @var{p}, @dots{})\n\ Return the class of the object @var{obj} or create a class with\n\ fields from structure @var{s} and name (string) @var{id}. Additional\n\ arguments name a list of parent classes from which the new class is\n\ derived.\n\ @seealso{typeinfo, isa}\n\ @end deftypefn") | |
DEFUN (__isa_parent__, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} __isa_parent__ (@var{class}, @var{name})\n\ Undocumented internal function.\n\ @end deftypefn") | |
DEFUN (__parent_classes__, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} __parent_classes__ (@var{x})\n\ Undocumented internal function.\n\ @end deftypefn") | |
DEFUN (isobject, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} isobject (@var{x})\n\ Return true if @var{x} is a class object.\n\ @seealso{class, typeinfo, isa, ismethod}\n\ @end deftypefn") | |
DEFUN (ismethod, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} ismethod (@var{x}, @var{method})\n\ Return true if @var{x} is a class object and the string @var{method}\n\ is a method of this class.\n\ @seealso{isobject}\n\ @end deftypefn") | |
DEFUN (__methods__, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} __methods__ (@var{x})\n\ @deftypefnx {Built-in Function} {} __methods__ (\"classname\")\n\ Internal function.\n\ \n\ Implements @code{methods} for Octave class objects and classnames.\n\ @seealso{methods}\n\ @end deftypefn") | |
DEFUN (superiorto, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} superiorto (@var{class_name}, @dots{})\n\ When called from a class constructor, mark the object currently\n\ constructed as having a higher precedence than @var{class_name}.\n\ More that one such class can be specified in a single call.\n\ This function may only be called from a class constructor.\n\ @end deftypefn") | |
DEFUN (inferiorto, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} inferiorto (@var{class_name}, @dots{})\n\ When called from a class constructor, mark the object currently\n\ constructed as having a lower precedence than @var{class_name}.\n\ More that one such class can be specified in a single call.\n\ This function may only be called from a class constructor.\n\ @end deftypefn") | |
static void | gripe_failed_assignment (void) |
static void | gripe_invalid_index1 (void) |
static void | gripe_invalid_index_for_assignment (void) |
static void | gripe_invalid_index_type (const std::string &nm, char t) |
static bool | is_built_in_class (const std::string &cn) |
static octave_value | make_idx_args (const std::string &type, const std::list< octave_value_list > &idx, const std::string &who) |
static octave_value_list | sanitize (const octave_value_list &ovl) |
Definition at line 402 of file ov-class.cc.
References octave_call_stack::caller(), and octave_function::name().
Referenced by octave_class::numel(), octave_class::size(), octave_class::subsasgn_common(), and octave_class::subsref().
DEFINE_OCTAVE_ALLOCATOR | ( | octave_class | ) |
DEFUN | ( | class | , |
args | |||
) |
Definition at line 1927 of file ov-class.cc.
References octave_call_stack::caller(), octave_value::class_name(), error(), error_state, octave_function::is_class_constructor(), octave_function::is_class_method(), octave_value::length(), octave_base_value::octave_value, print_usage(), and octave_value_list::slice().
DEFUN | ( | __isa_parent__ | , |
args | |||
) |
Definition at line 2019 of file ov-class.cc.
References error(), error_state, octave_value::find_parent_class(), print_usage(), and octave_value::string_value().
DEFUN | ( | __parent_classes__ | , |
args | |||
) |
Definition at line 2046 of file ov-class.cc.
References arg(), octave_value::is_object(), octave_value::parent_class_names(), and print_usage().
DEFUN | ( | isobject | , |
args | |||
) |
Definition at line 2067 of file ov-class.cc.
References octave_value::is_object(), and print_usage().
DEFUN | ( | ismethod | , |
args | |||
) |
Definition at line 2084 of file ov-class.cc.
References arg(), octave_class::class_name(), octave_value::class_name(), error(), error_state, load_path::find_method(), octave_value::is_object(), octave_value::is_string(), print_usage(), and octave_value::string_value().
DEFUN | ( | __methods__ | , |
args | |||
) |
Definition at line 2126 of file ov-class.cc.
References arg(), octave_class::class_name(), octave_value::class_name(), error_state, octave_value::is_object(), octave_value::is_string(), load_path::methods(), and octave_value::string_value().
DEFUN | ( | superiorto | , |
args | |||
) |
Definition at line 2184 of file ov-class.cc.
References octave_call_stack::caller(), error(), error_state, is_built_in_class(), octave_function::is_class_constructor(), octave_function::name(), symbol_table::set_class_relationship(), and octave_value::string_value().
DEFUN | ( | inferiorto | , |
args | |||
) |
Definition at line 2228 of file ov-class.cc.
References octave_call_stack::caller(), error(), error_state, is_built_in_class(), octave_function::is_class_constructor(), octave_function::name(), symbol_table::set_class_relationship(), and octave_value::string_value().
Definition at line 266 of file ov-class.cc.
References error().
Referenced by octave_class::subsasgn_common().
Definition at line 248 of file ov-class.cc.
References error().
Referenced by octave_class::dotref(), and octave_class::subsref().
Definition at line 254 of file ov-class.cc.
References error().
Referenced by octave_class::numeric_conv(), and octave_class::subsasgn_common().
Definition at line 260 of file ov-class.cc.
References error().
Referenced by octave_class::subsasgn_common(), and octave_class::subsref().
|
static |
Definition at line 2158 of file ov-class.cc.
Referenced by DEFUN().
|
inlinestatic |
Definition at line 286 of file ov-class.cc.
References octave_map::assign(), error(), octave_value::is_string(), octave_value_list::length(), octave_value::length(), panic_impossible, and sanitize().
Referenced by octave_class::subsasgn_common(), and octave_class::subsref().
|
inlinestatic |
Definition at line 272 of file ov-class.cc.
References octave_value_list::length(), and ovl().
Referenced by make_idx_args().