GNU Octave
4.0.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
|
#include <algorithm>
#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 "toplev.h"
#include "Array.cc"
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 49 of file ov-classdef.cc.
#define META_CLASS_CMP | ( | OP, | |
CLSA, | |||
CLSB, | |||
FUN | |||
) |
Definition at line 637 of file ov-classdef.cc.
|
static |
Definition at line 2784 of file ov-classdef.cc.
References octave_value::is_string(), and octave_value::string_value().
Referenced by cdef_class::make_meta_class().
|
static |
Definition at line 318 of file ov-classdef.cc.
References octave_value::cell_value(), error(), error_state, 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(), octave_value::numel(), cdef_object::ok(), panic_impossible, 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 668 of file ov-classdef.cc.
Referenced by install_classdef().
|
static |
Definition at line 555 of file ov-classdef.cc.
References error(), error_state, cdef_method::execute(), cdef_class::find_method(), cdef_method::is_static(), octave_value_list::length(), cdef_object::ok(), octave_value_list::splice(), and to_cdef().
Referenced by install_classdef().
|
static |
Definition at line 535 of file ov-classdef.cc.
References error(), error_state, octave_value_list::length(), lookup_class(), and to_ov().
Referenced by install_classdef().
|
static |
Definition at line 667 of file ov-classdef.cc.
Referenced by install_classdef().
|
static |
Definition at line 517 of file ov-classdef.cc.
References octave_value::cell_value(), cdef_object::get(), octave_value_list::length(), lookup_classes(), to_cdef(), and to_ov().
Referenced by install_classdef().
|
static |
Definition at line 484 of file ov-classdef.cc.
References cdef_class::get_methods(), octave_value_list::length(), and to_cdef().
Referenced by install_classdef().
|
static |
Definition at line 260 of file ov-classdef.cc.
References cdef_class::get_properties(), octave_value_list::length(), and to_cdef().
Referenced by install_classdef().
|
static |
Definition at line 499 of file ov-classdef.cc.
References octave_value::cell_value(), cdef_object::get(), octave_value_list::length(), lookup_classes(), to_cdef(), and to_ov().
Referenced by install_classdef().
|
static |
Definition at line 596 of file ov-classdef.cc.
References error(), error_state, cdef_class::find_property(), cdef_property::get_value(), cdef_property::is_constant(), octave_value_list::length(), cdef_object::ok(), and to_cdef().
Referenced by install_classdef().
|
static |
Definition at line 666 of file ov-classdef.cc.
Referenced by install_classdef().
|
static |
Definition at line 665 of file ov-classdef.cc.
Referenced by install_classdef().
|
static |
Definition at line 664 of file ov-classdef.cc.
Referenced by install_classdef().
|
static |
Definition at line 669 of file ov-classdef.cc.
Referenced by install_classdef().
|
static |
Definition at line 2760 of file ov-classdef.cc.
References tree_classdef_attribute::expression(), tree_expression::is_identifier(), tree_expression::name(), octave_value(), and tree_expression::rvalue1().
Referenced by cdef_class::make_meta_class().
|
inline |
Definition at line 150 of file ov-classdef.cc.
References octave_value::subsref().
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 4030 of file ov-classdef.cc.
References error(), error_state, lookup_class(), print_usage(), and to_ov().
OCTAVE_EXPORT octave_value_list F__meta_get_package__ | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 3998 of file ov-classdef.cc.
References error(), error_state, lookup_package(), print_usage(), and to_ov().
OCTAVE_EXPORT octave_value_list F__superclass_reference__ | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 4021 of file ov-classdef.cc.
References octave_value().
OCTAVE_EXPORT octave_value_list Fmetaclass | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 4059 of file ov-classdef.cc.
References error_state, cdef_object::get_class(), print_usage(), to_cdef(), and to_ov().
|
static |
Definition at line 87 of file ov-classdef.cc.
Referenced by make_function_of_class(), and cdef_class::cdef_class_rep::run_constructor().
|
static |
Definition at line 275 of file ov-classdef.cc.
References octave_call_stack::current(), octave_function::dispatch_class(), error_state, 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 301 of file ov-classdef.cc.
References get_class_context().
|
static |
Definition at line 52 of file ov-classdef.cc.
References error(), cdef_object::get(), cdef_method::get_name(), octave_value::is_string(), and octave_value::string_value().
Referenced by cdef_method::cdef_method_rep::execute().
|
static |
Definition at line 67 of file ov-classdef.cc.
References error(), cdef_object::get(), cdef_property::get_name(), octave_value::is_string(), and octave_value::string_value().
Referenced by cdef_property::cdef_property_rep::get_value(), and cdef_property::cdef_property_rep::set_value().
|
static |
Definition at line 692 of file ov-classdef.cc.
Referenced by install_classdef().
|
static |
Definition at line 310 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 3695 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().
Referenced by octave_initialize_interpreter().
|
inline |
Definition at line 256 of file ov-classdef.cc.
References is_superclass().
Referenced by octave_classdef_superclass_ref::do_multi_index_op().
|
static |
Definition at line 418 of file ov-classdef.cc.
References octave_user_function::body(), octave_value::is_defined(), octave_value::is_user_function(), 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 439 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 252 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 227 of file ov-classdef.cc.
References octave_value::cell_value(), error_state, cdef_object::get(), lookup_class(), and Array< T >::numel().
Referenced by check_access(), in_class_method(), is_direct_superclass(), octave_classdef::is_instance_of(), and is_strict_superclass().
|
static |
Definition at line 160 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 168 of file ov-classdef.cc.
|
static |
Definition at line 177 of file ov-classdef.cc.
References error_state, octave_value::is_string(), lookup_class(), octave_value::string_value(), and to_cdef().
|
static |
Definition at line 193 of file ov-classdef.cc.
References error_state, lookup_class(), and Array< T >::numel().
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 3439 of file ov-classdef.cc.
References cdef_manager::find_package().
Referenced by F__meta_get_package__(), and package_fromName().
|
inline |
Definition at line 817 of file ov-classdef.cc.
References make_property().
Referenced by install_classdef().
|
static |
Definition at line 702 of file ov-classdef.cc.
References error(), error_state, 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 763 of file ov-classdef.cc.
References make_class().
|
static |
Definition at line 129 of file ov-classdef.cc.
Referenced by install_classdef(), cdef_class::make_meta_class(), read_mat5_binary_element(), and tree_fcn_handle::rvalue1().
|
static |
Definition at line 139 of file ov-classdef.cc.
References octave_value::is_defined().
|
static |
Definition at line 98 of file ov-classdef.cc.
References error_state, 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(), 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 123 of file ov-classdef.cc.
References cdef_class::get_name(), and make_function_of_class().
|
static |
Definition at line 769 of file ov-classdef.cc.
References make_class(), cdef_class::mark_as_meta_class(), and cdef_object::put().
|
static |
Definition at line 823 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 851 of file ov-classdef.cc.
References make_method().
|
static |
Definition at line 861 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 780 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(), and to_ov().
Referenced by cdef_class::cdef_class_rep::construct_object(), install_classdef(), make_attribute(), and cdef_class::make_meta_class().
Cell map2Cell | ( | const std::map< T1, T2 > & | m | ) |
Definition at line 3565 of file ov-classdef.cc.
References 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 3445 of file ov-classdef.cc.
References error(), error_state, octave_value_list::length(), lookup_package(), and to_ov().
Referenced by install_classdef().
|
static |
Definition at line 3465 of file ov-classdef.cc.
References cdef_package::get_classes(), octave_value_list::length(), and to_cdef().
Referenced by install_classdef().
|
static |
Definition at line 3481 of file ov-classdef.cc.
References cdef_package::get_functions(), octave_value_list::length(), and to_cdef().
Referenced by install_classdef().
|
static |
Definition at line 3497 of file ov-classdef.cc.
References cdef_package::get_packages(), octave_value_list::length(), and to_cdef().
Referenced by install_classdef().
|
static |
Definition at line 3513 of file ov-classdef.cc.
References cdef_manager::find_package(), load_path::get_all_package_names(), names(), and to_ov().
Referenced by install_classdef().
octave_value_list property_get_defaultvalue | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 672 of file ov-classdef.cc.
References error_with_id(), cdef_object::get(), cdef_property::get_name(), and to_cdef().
Referenced by install_classdef().
|
static |
Definition at line 214 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(), and cdef_object_array::subsref().