GNU Octave  3.8.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
Functions
ov-class.cc File Reference
#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"
Include dependency graph for ov-class.cc:

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)

Function Documentation

static bool called_from_builtin ( void  )
static
DEFINE_OCTAVE_ALLOCATOR ( octave_class  )
DEFUN ( class  ,
args   
)
DEFUN ( __isa_parent__  ,
args   
)
DEFUN ( __parent_classes__  ,
args   
)
DEFUN ( isobject  ,
args   
)

Definition at line 2067 of file ov-class.cc.

References octave_value::is_object(), and print_usage().

DEFUN ( ismethod  ,
args   
)
DEFUN ( __methods__  ,
args   
)
DEFUN ( superiorto  ,
args   
)
DEFUN ( inferiorto  ,
args   
)
static void gripe_failed_assignment ( void  )
static

Definition at line 266 of file ov-class.cc.

References error().

Referenced by octave_class::subsasgn_common().

static void gripe_invalid_index1 ( void  )
static

Definition at line 248 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 254 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 260 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 2158 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 
)
inlinestatic
static octave_value_list sanitize ( const octave_value_list ovl)
inlinestatic

Definition at line 272 of file ov-class.cc.

References octave_value_list::length(), and ovl().

Referenced by make_idx_args().