GNU Octave
4.2.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
|
#include <algorithm>
#include "call-stack.h"
#include "defun.h"
#include "load-path.h"
#include "ov-builtin.h"
#include "ov-classdef.h"
#include "ov-fcn-handle.h"
#include "ov-typeinfo.h"
#include "ov-usr-fcn.h"
#include "pt-assign.h"
#include "pt-classdef.h"
#include "pt-funcall.h"
#include "pt-misc.h"
#include "pt-stmt.h"
#include "pt-walk.h"
#include "singleton-cleanup.h"
#include "symtab.h"
#include "interpreter.h"
Go to the source code of this file.
Classes | |
class | ctor_analyzer |
class | octave_classdef_meta |
class | octave_classdef_superclass_ref |
Macros | |
#define | DEBUG_TRACE 0 |
#define | META_CLASS_CMP(OP, CLSA, CLSB, FUN) |
#define DEBUG_TRACE 0 |
Definition at line 48 of file ov-classdef.cc.
#define META_CLASS_CMP | ( | OP, | |
CLSA, | |||
CLSB, | |||
FUN | |||
) |
Definition at line 583 of file ov-classdef.cc.
|
static |
Definition at line 2574 of file ov-classdef.cc.
References octave_value::is_string(), string, and octave_value::string_value().
Referenced by cdef_class::make_meta_class().
|
static |
Definition at line 306 of file ov-classdef.cc.
References octave_value::cell_value(), error(), cdef_class::find_method(), cdef_class::find_property(), cdef_object::get(), get_class_context(), cdef_class::get_name(), octave_value::is_cell(), is_strict_superclass(), octave_value::is_string(), is_superclass(), m, octave_value::numel(), cdef_object::ok(), p, panic_impossible, string, octave_value::string_value(), and to_cdef().
Referenced by cdef_method::cdef_method_rep::check_access(), cdef_property::cdef_property_rep::check_get_access(), cdef_property::cdef_property_rep::check_set_access(), and cdef_method::cdef_method_rep::execute().
|
static |
Definition at line 609 of file ov-classdef.cc.
Referenced by install_classdef().
|
static |
Definition at line 535 of file ov-classdef.cc.
References error(), cdef_method::execute(), cdef_class::find_method(), cdef_method::is_static(), octave_value_list::length(), nargout(), cdef_object::ok(), octave_value_list::splice(), string, and to_cdef().
Referenced by install_classdef().
|
static |
Definition at line 520 of file ov-classdef.cc.
References error(), octave_value_list::length(), lookup_class(), name, retval, string, and to_ov().
Referenced by install_classdef().
|
static |
Definition at line 608 of file ov-classdef.cc.
Referenced by install_classdef().
|
static |
Definition at line 502 of file ov-classdef.cc.
References octave_value::cell_value(), cdef_object::get(), octave_value_list::length(), lookup_classes(), retval, to_cdef(), and to_ov().
Referenced by install_classdef().
|
static |
Definition at line 469 of file ov-classdef.cc.
References cdef_class::get_methods(), octave_value_list::length(), retval, and to_cdef().
Referenced by install_classdef().
|
static |
Definition at line 250 of file ov-classdef.cc.
References cdef_class::get_properties(), octave_value_list::length(), retval, and to_cdef().
Referenced by install_classdef().
|
static |
Definition at line 484 of file ov-classdef.cc.
References octave_value::cell_value(), cdef_object::get(), octave_value_list::length(), lookup_classes(), retval, to_cdef(), and to_ov().
Referenced by install_classdef().
|
static |
Definition at line 556 of file ov-classdef.cc.
References error(), cdef_class::find_property(), cdef_property::get_value(), cdef_property::is_constant(), octave_value_list::length(), cdef_object::ok(), retval, string, and to_cdef().
Referenced by install_classdef().
|
static |
Definition at line 607 of file ov-classdef.cc.
Referenced by install_classdef().
|
static |
Definition at line 606 of file ov-classdef.cc.
Referenced by install_classdef().
|
static |
Definition at line 605 of file ov-classdef.cc.
Referenced by install_classdef().
|
static |
Definition at line 610 of file ov-classdef.cc.
Referenced by install_classdef().
|
static |
Definition at line 2550 of file ov-classdef.cc.
References tree_classdef_attribute::expression(), tree_expression::is_identifier(), tree_expression::name(), octave_value(), tree_expression::rvalue1(), s, and string.
Referenced by cdef_class::make_meta_class().
|
static |
Definition at line 52 of file ov-classdef.cc.
References error(), cdef_object::get(), cdef_method::get_name(), octave_value::is_string(), string, and octave_value::string_value().
Referenced by cdef_method::cdef_method_rep::execute().
|
static |
Definition at line 68 of file ov-classdef.cc.
References error(), cdef_object::get(), cdef_property::get_name(), octave_value::is_string(), string, and octave_value::string_value().
Referenced by cdef_property::cdef_property_rep::get_value(), and cdef_property::cdef_property_rep::set_value().
|
inline |
Definition at line 148 of file ov-classdef.cc.
References string, octave_value::subsref(), and type.
Referenced by cdef_method::cdef_method_rep::execute(), cdef_property::cdef_property_rep::get_value(), and cdef_property::cdef_property_rep::set_value().
OCTAVE_EXPORT octave_value_list F__meta_class_query__ | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 3745 of file ov-classdef.cc.
References lookup_class(), print_usage(), string, and to_ov().
Referenced by install_ov_classdef_fcns().
OCTAVE_EXPORT octave_value_list F__meta_get_package__ | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 3722 of file ov-classdef.cc.
References lookup_package(), print_usage(), string, and to_ov().
Referenced by install_ov_classdef_fcns().
OCTAVE_EXPORT octave_value_list F__superclass_reference__ | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 3736 of file ov-classdef.cc.
References ovl().
Referenced by install_ov_classdef_fcns().
OCTAVE_EXPORT octave_value_list Fmetaclass | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 3765 of file ov-classdef.cc.
References cdef_object::get_class(), print_usage(), to_cdef(), and to_ov().
Referenced by install_ov_classdef_fcns().
|
static |
Definition at line 88 of file ov-classdef.cc.
References nm.
Referenced by make_function_of_class(), and cdef_class::cdef_class_rep::run_constructor().
|
static |
Definition at line 265 of file ov-classdef.cc.
References octave_call_stack::current(), octave_function::dispatch_class(), fcn, octave_function::is_anonymous_function_of_class(), octave_function::is_class_method(), octave_function::is_classdef_constructor(), octave_function::is_private_function(), lookup_class(), and octave_function::name().
Referenced by check_access(), octave_classdef_superclass_ref::do_multi_index_op(), get_class_context(), and in_class_method().
|
inline |
Definition at line 289 of file ov-classdef.cc.
References get_class_context(), and string.
|
static |
|
static |
Definition at line 298 of file ov-classdef.cc.
References get_class_context(), is_superclass(), and cdef_object::ok().
Referenced by octave_classdef::subsasgn(), and octave_classdef::subsref().
void install_classdef | ( | void | ) |
Definition at line 3413 of file ov-classdef.cc.
References class_eq(), class_fevalStatic(), class_fromName(), class_ge(), class_get_inferiorclasses(), class_get_methods(), class_get_properties(), class_get_superclasses(), class_getConstant(), class_gt(), class_le(), class_lt(), class_ne(), cdef_class::get_constructor_function(), handle_delete(), symbol_table::install_built_in_function(), cdef_package::install_class(), cdef_class::install_method(), cdef_class::install_property(), make_attribute(), make_class(), make_fcn_handle(), cdef_class::make_meta_class(), make_method(), make_package(), make_property(), cdef_class::meta_class(), cdef_class::meta_method(), cdef_class::meta_package(), cdef_class::meta_property(), package_fromName(), package_get_classes(), package_get_functions(), package_get_packages(), package_getAllPackages(), property_get_defaultvalue(), octave_classdef::register_type(), and cdef_object::set_class().
|
inline |
Definition at line 246 of file ov-classdef.cc.
References is_superclass().
Referenced by octave_classdef_superclass_ref::do_multi_index_op().
|
static |
Definition at line 403 of file ov-classdef.cc.
References octave_user_function::body(), octave_value::is_defined(), octave_value::is_user_function(), retval, and octave_value::user_function_value().
Referenced by cdef_method::cdef_method_rep::check_method(), and make_method().
bool is_method_executing | ( | const octave_value & | ov, |
const cdef_object & | obj | ||
) |
Definition at line 424 of file ov-classdef.cc.
References octave_call_stack::current(), octave::base_list< elt_type >::front(), octave_value::function_value(), cdef_object::is(), octave_user_function::is_classdef_constructor(), octave_value::is_defined(), tree_decl_elt::lvalue(), octave_user_function::parameter_list(), octave_user_function::return_list(), octave::base_list< elt_type >::size(), to_cdef(), octave_value::type_name(), octave_base_value::user_function_value(), and octave_lvalue::value().
Referenced by cdef_property::cdef_property_rep::get_value(), and cdef_property::cdef_property_rep::set_value().
|
inline |
Definition at line 242 of file ov-classdef.cc.
References is_superclass().
Referenced by check_access(), and octave_classdef_superclass_ref::do_multi_index_op().
|
static |
Definition at line 218 of file ov-classdef.cc.
References c, octave_value::cell_value(), cdef_object::get(), lookup_class(), Array< T >::numel(), and retval.
Referenced by check_access(), in_class_method(), is_direct_superclass(), octave_classdef::is_instance_of(), and is_strict_superclass().
|
static |
Definition at line 158 of file ov-classdef.cc.
References cdef_manager::find_class().
Referenced by class_fromName(), cdef_class::cdef_class_rep::delete_object(), cdef_manager::do_find_class(), octave_classdef_superclass_ref::do_multi_index_op(), F__meta_class_query__(), cdef_class::cdef_class_rep::find_method(), cdef_class::cdef_class_rep::find_methods(), cdef_class::cdef_class_rep::find_names(), cdef_class::cdef_class_rep::find_properties(), cdef_class::cdef_class_rep::find_property(), get_class_context(), octave_classdef::is_instance_of(), is_superclass(), lookup_class(), lookup_classes(), cdef_class::make_meta_class(), cdef_class::cdef_class_rep::run_constructor(), and ctor_analyzer::visit_funcall().
|
static |
Definition at line 166 of file ov-classdef.cc.
|
static |
Definition at line 175 of file ov-classdef.cc.
References octave_value::is_string(), lookup_class(), octave_value::string_value(), and to_cdef().
|
static |
Definition at line 190 of file ov-classdef.cc.
References c, lookup_class(), Array< T >::numel(), and retval.
Referenced by class_get_inferiorclasses(), class_get_superclasses(), cdef_class::cdef_class_rep::initialize_object(), and cdef_object_scalar::mark_for_construction().
|
static |
Definition at line 3172 of file ov-classdef.cc.
References cdef_manager::find_package().
Referenced by F__meta_get_package__(), and package_fromName().
|
inline |
Definition at line 753 of file ov-classdef.cc.
References make_property().
Referenced by install_classdef().
|
static |
Definition at line 643 of file ov-classdef.cc.
References error(), cdef_class::mark_as_handle_class(), cdef_class::meta_class(), cdef_object::put(), cdef_manager::register_class(), and cdef_object::set_class().
Referenced by cdef_class::cdef_class_rep::construct_object(), install_classdef(), make_class(), make_meta_class(), and cdef_class::make_meta_class().
|
static |
Definition at line 699 of file ov-classdef.cc.
References make_class().
|
static |
Definition at line 127 of file ov-classdef.cc.
References fcn.
Referenced by install_classdef(), cdef_class::make_meta_class(), read_mat5_binary_element(), and tree_fcn_handle::rvalue1().
|
static |
Definition at line 137 of file ov-classdef.cc.
References octave_value::is_defined(), and retval.
|
static |
Definition at line 99 of file ov-classdef.cc.
References octave_value::function_value(), get_base_name(), octave_user_function::mark_as_class_constructor(), octave_user_function::mark_as_class_method(), octave_user_function::mark_as_classdef_constructor(), octave_function::name(), of, octave_function::stash_dispatch_class(), and octave_base_value::user_function_value().
Referenced by cdef_method::cdef_method_rep::check_method(), make_function_of_class(), cdef_class::make_meta_class(), make_method(), and make_property().
|
static |
Definition at line 121 of file ov-classdef.cc.
References fcn, cdef_class::get_name(), and make_function_of_class().
|
static |
Definition at line 705 of file ov-classdef.cc.
References make_class(), cdef_class::mark_as_meta_class(), and cdef_object::put().
|
static |
Definition at line 759 of file ov-classdef.cc.
References cdef_class::get_name(), octave_value::is_defined(), is_dummy_method(), make_function_of_class(), cdef_method::mark_as_external(), cdef_class::meta_method(), cdef_object::put(), cdef_object::set_class(), cdef_method::set_function(), and to_ov().
Referenced by cdef_class::cdef_class_rep::construct_object(), install_classdef(), cdef_class::make_meta_class(), and make_method().
|
inline |
Definition at line 787 of file ov-classdef.cc.
References fcn, and make_method().
|
static |
Definition at line 797 of file ov-classdef.cc.
References cdef_manager::find_package(), cdef_class::meta_package(), cdef_object::put(), cdef_manager::register_package(), cdef_object::set_class(), and to_ov().
Referenced by cdef_class::cdef_class_rep::construct_object(), cdef_manager::do_find_package(), and install_classdef().
|
static |
Definition at line 716 of file ov-classdef.cc.
References cdef_class::get_name(), make_function_of_class(), cdef_class::meta_property(), cdef_object::put(), cdef_object::set_class(), string, and to_ov().
Referenced by cdef_class::cdef_class_rep::construct_object(), install_classdef(), make_attribute(), and cdef_class::make_meta_class().
Definition at line 3293 of file ov-classdef.cc.
References retval, and to_ov().
Referenced by cdef_package::cdef_package_rep::get_classes(), cdef_package::cdef_package_rep::get_functions(), and cdef_package::cdef_package_rep::get_packages().
|
static |
Definition at line 3178 of file ov-classdef.cc.
References error(), octave_value_list::length(), lookup_package(), retval, string, and to_ov().
Referenced by install_classdef().
|
static |
Definition at line 3193 of file ov-classdef.cc.
References cdef_package::get_classes(), octave_value_list::length(), retval, and to_cdef().
Referenced by install_classdef().
|
static |
Definition at line 3209 of file ov-classdef.cc.
References cdef_package::get_functions(), octave_value_list::length(), retval, and to_cdef().
Referenced by install_classdef().
|
static |
Definition at line 3225 of file ov-classdef.cc.
References cdef_package::get_packages(), octave_value_list::length(), retval, and to_cdef().
Referenced by install_classdef().
|
static |
Definition at line 3241 of file ov-classdef.cc.
References c, cdef_manager::find_package(), load_path::get_all_package_names(), and to_ov().
Referenced by install_classdef().
octave_value_list property_get_defaultvalue | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 613 of file ov-classdef.cc.
References error_with_id(), cdef_object::get(), cdef_property::get_name(), retval, and to_cdef().
Referenced by install_classdef().
|
static |
Definition at line 205 of file ov-classdef.cc.
References octave_value().
Referenced by cdef_class::cdef_class_rep::cdef_class_rep(), class_fromName(), class_get_inferiorclasses(), class_get_superclasses(), cdef_class::cdef_class_rep::construct(), cdef_method::cdef_method_rep::execute(), F__meta_class_query__(), F__meta_get_package__(), Fmetaclass(), cdef_class::cdef_class_rep::get_methods(), cdef_class::cdef_class_rep::get_properties(), cdef_property::cdef_property_rep::get_value(), cdef_class::make_meta_class(), make_method(), make_package(), make_property(), map2Cell(), package_fromName(), package_getAllPackages(), cdef_class::cdef_class_rep::run_constructor(), cdef_property::cdef_property_rep::set_value(), cdef_object_array::subsasgn(), cdef_object_scalar::subsasgn(), cdef_object_array::subsref(), and cdef_object_scalar::subsref().