#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 "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 (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") | |
DEFUN (class, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} class (@var{expr})\n\ @deftypefnx {Built-in Function} {} class (@var{s}, @var{id})\n\ @deftypefnx {Built-in Function} {} class (@var{s}, @var{id}, @var{p}, @dots{})\n\ Return the class of the expression @var{expr} 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\ @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 (__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, nargout,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} methods (@var{x})\n\ @deftypefnx {Built-in Function} {} methods (\"classname\")\n\ Return a cell array containing the names of the methods for the\n\ object @var{x} or the named class.\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) |
static bool called_from_builtin | ( | void | ) | [static] |
Definition at line 397 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 | ( | inferiorto | , | |
args | ||||
) |
Definition at line 2229 of file ov-class.cc.
References octave_call_stack::caller(), octave_class::class_name(), error(), error_state, is_built_in_class(), octave_function::is_class_constructor(), octave_function::name(), and symbol_table::set_class_relationship().
DEFUN | ( | class | , | |
args | ||||
) |
Definition at line 1921 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_base_value::octave_value, and print_usage().
DEFUN | ( | superiorto | , | |
args | ||||
) |
Definition at line 2177 of file ov-class.cc.
References octave_call_stack::caller(), octave_class::class_name(), error(), error_state, is_built_in_class(), octave_function::is_class_constructor(), octave_function::name(), and symbol_table::set_class_relationship().
DEFUN | ( | __isa_parent__ | , | |
args | ||||
) |
Definition at line 1998 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 2025 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 2046 of file ov-class.cc.
References octave_value::is_object(), and print_usage().
DEFUN | ( | ismethod | , | |
args | ||||
) |
Definition at line 2063 of file ov-class.cc.
References arg(), 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 | , | |||
nargout | ||||
) |
Definition at line 2105 of file ov-class.cc.
References arg(), octave_value::class_name(), error(), error_state, octave_value::is_object(), octave_value::is_string(), string_vector::list_in_columns(), load_path::methods(), octave_stdout, print_usage(), and octave_value::string_value().
static void gripe_failed_assignment | ( | void | ) | [static] |
Definition at line 261 of file ov-class.cc.
References error().
Referenced by octave_class::subsasgn_common().
static void gripe_invalid_index1 | ( | void | ) | [static] |
Definition at line 243 of file ov-class.cc.
References error().
Referenced by octave_class::dotref(), and octave_class::subsref().
static void gripe_invalid_index_for_assignment | ( | void | ) | [static] |
Definition at line 249 of file ov-class.cc.
References error().
Referenced by octave_class::numeric_conv(), and octave_class::subsasgn_common().
static void gripe_invalid_index_type | ( | const std::string & | nm, | |
char | t | |||
) | [static] |
Definition at line 255 of file ov-class.cc.
References error().
Referenced by octave_class::subsasgn_common(), and octave_class::subsref().
static bool is_built_in_class | ( | const std::string & | cn | ) | [static] |
Definition at line 2151 of file ov-class.cc.
Referenced by DEFUN().
static octave_value make_idx_args | ( | const std::string & | type, | |
const std::list< octave_value_list > & | idx, | |||
const std::string & | who | |||
) | [inline, static] |
Definition at line 281 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().
static octave_value_list sanitize | ( | const octave_value_list & | ovl | ) | [inline, static] |
Definition at line 267 of file ov-class.cc.
References octave_value_list::length().
Referenced by make_idx_args().