#include "cdef-class.h"
#include "cdef-manager.h"
#include "cdef-method.h"
#include "cdef-package.h"
#include "cdef-property.h"
#include "cdef-utils.h"
#include "interpreter-private.h"
#include "ov-classdef.h"
#include "ov-usr-fcn.h"
#include "pt-eval.h"
Go to the source code of this file.
Functions | |
bool | check_access (const cdef_class &cls, const octave_value &acc, const std::string &meth_name, const std::string &prop_name, bool is_prop_set) |
std::string | get_base_name (const std::string &nm) |
cdef_class | get_class_context (std::string &name, bool &in_constructor) |
cdef_class | get_class_context (void) |
bool | is_direct_superclass (const cdef_class &clsa, const cdef_class &clsb) |
bool | is_dummy_method (const octave_value &fcn) |
bool | is_strict_superclass (const cdef_class &clsa, const cdef_class &clsb) |
bool | is_superclass (const cdef_class &clsa, const cdef_class &clsb, bool allow_equal, int max_depth) |
cdef_class | lookup_class (const cdef_class &cls) |
cdef_class | lookup_class (const octave_value &ov) |
cdef_class | lookup_class (const std::string &name, bool error_if_not_found, bool load_if_not_found) |
std::list< cdef_class > | lookup_classes (const Cell &cls_list) |
cdef_package | lookup_package (const std::string &name, bool error_if_not_found, bool load_if_not_found) |
void | make_function_of_class (const cdef_class &cls, const octave_value &fcn) |
void | make_function_of_class (const std::string &class_name, const octave_value &fcn) |
cdef_object | to_cdef (const cdef_object &obj) |
cdef_object | to_cdef (const octave_value &val) |
cdef_object & | to_cdef_ref (const octave_value &val) |
octave_value | to_ov (const cdef_object &obj) |
octave_value | to_ov (const octave_value &ov) |
octave_value | to_ov (const std::list< cdef_class > &class_list) |
bool check_access | ( | const cdef_class & | cls, |
const octave_value & | acc, | ||
const std::string & | meth_name, | ||
const std::string & | prop_name, | ||
bool | is_prop_set | ||
) |
Definition at line 294 of file cdef-utils.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(), is_strict_superclass(), octave_value::is_string(), is_superclass(), octave_value::iscell(), octave_value::isobject(), m, 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(), and cdef_property::cdef_property_rep::check_set_access().
std::string get_base_name | ( | const std::string & | nm | ) |
Definition at line 44 of file cdef-utils.cc.
Referenced by make_function_of_class(), and cdef_class::cdef_class_rep::run_constructor().
cdef_class get_class_context | ( | std::string & | name, |
bool & | in_constructor | ||
) |
Definition at line 247 of file cdef-utils.cc.
References __get_evaluator__(), tree_evaluator::current_function(), octave_function::dispatch_class(), tree_evaluator::get_dispatch_class(), 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::execute(), get_class_context(), and in_class_method().
cdef_class get_class_context | ( | void | ) |
Definition at line 285 of file cdef-utils.cc.
References get_class_context().
bool is_direct_superclass | ( | const cdef_class & | clsa, |
const cdef_class & | clsb | ||
) |
Definition at line 232 of file cdef-utils.cc.
References is_superclass().
Referenced by octave_classdef_superclass_ref::execute().
bool is_dummy_method | ( | const octave_value & | fcn | ) |
Definition at line 179 of file cdef-utils.cc.
References octave_user_code::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 cdef_manager::make_method().
bool is_strict_superclass | ( | const cdef_class & | clsa, |
const cdef_class & | clsb | ||
) |
Definition at line 226 of file cdef-utils.cc.
References is_superclass().
Referenced by check_access(), and octave_classdef_superclass_ref::execute().
bool is_superclass | ( | const cdef_class & | clsa, |
const cdef_class & | clsb, | ||
bool | allow_equal, | ||
int | max_depth | ||
) |
Definition at line 200 of file cdef-utils.cc.
References octave_value::cell_value(), cdef_object::get(), octave_classdef::get_property(), lookup_class(), Array< T, Alloc >::numel(), and octave_value::string_value().
Referenced by check_access(), in_class_method(), is_direct_superclass(), octave_classdef::is_instance_of(), and is_strict_superclass().
cdef_class lookup_class | ( | const cdef_class & | cls | ) |
Definition at line 89 of file cdef-utils.cc.
cdef_class lookup_class | ( | const octave_value & | ov | ) |
Definition at line 98 of file cdef-utils.cc.
References cdef_class, octave_value::is_string(), lookup_class(), octave_value::string_value(), and to_cdef().
cdef_class lookup_class | ( | const std::string & | name, |
bool | error_if_not_found, | ||
bool | load_if_not_found | ||
) |
Definition at line 80 of file cdef-utils.cc.
References __get_cdef_manager__(), and cdef_manager::find_class().
Referenced by class_fromName(), cdef_class::cdef_class_rep::delete_object(), octave_classdef_superclass_ref::execute(), F__methods__(), cdef_manager::find_class(), cdef_manager::find_method(), 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(), Fproperties(), get_class_context(), octave_classdef::is_instance_of(), is_superclass(), lookup_class(), lookup_classes(), cdef_class::make_meta_class(), octave_classdef::metaclass_query(), cdef_class::cdef_class_rep::run_constructor(), and ctor_analyzer::visit_superclass_ref().
std::list<cdef_class> lookup_classes | ( | const Cell & | cls_list | ) |
Definition at line 113 of file cdef-utils.cc.
References lookup_class(), and Array< T, Alloc >::numel().
Referenced by class_get_inferiorclasses(), class_get_superclasses(), cdef_class::cdef_class_rep::initialize_object(), and cdef_object_scalar::mark_for_construction().
cdef_package lookup_package | ( | const std::string & | name, |
bool | error_if_not_found, | ||
bool | load_if_not_found | ||
) |
Definition at line 238 of file cdef-utils.cc.
References __get_cdef_manager__(), and cdef_manager::find_package().
Referenced by F__meta_get_package__(), and package_fromName().
void make_function_of_class | ( | const cdef_class & | cls, |
const octave_value & | fcn | ||
) |
Definition at line 74 of file cdef-utils.cc.
References cdef_class::get_name(), and make_function_of_class().
void make_function_of_class | ( | const std::string & | class_name, |
const octave_value & | fcn | ||
) |
Definition at line 55 of file cdef-utils.cc.
References octave_value::function_value(), get_base_name(), octave_user_function::mark_as_classdef_constructor(), octave_user_function::mark_as_classdef_method(), 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(), cdef_manager::make_method(), and cdef_manager::make_property().
cdef_object to_cdef | ( | const cdef_object & | obj | ) |
Definition at line 161 of file cdef-utils.cc.
cdef_object to_cdef | ( | const octave_value & | val | ) |
Definition at line 143 of file cdef-utils.cc.
References error(), octave_value::internal_rep(), and octave_value::type_name().
Referenced by check_access(), cdef_method::cdef_method_rep::check_access(), cdef_property::cdef_property_rep::check_get_access(), cdef_property::cdef_property_rep::check_set_access(), class_fevalStatic(), class_get_inferiorclasses(), class_get_methods(), class_get_properties(), class_get_superclasses(), class_getConstant(), Fmetaclass(), cdef_property::cdef_property_rep::get_value(), is_method_executing(), lookup_class(), package_get_classes(), package_get_functions(), package_get_packages(), property_get_defaultvalue(), cdef_class::cdef_class_rep::run_constructor(), cdef_property::cdef_property_rep::set_value(), cdef_object_array::subsasgn(), and cdef_object_scalar::subsasgn().
cdef_object& to_cdef_ref | ( | const octave_value & | val | ) |
Definition at line 152 of file cdef-utils.cc.
References error(), octave_value::internal_rep(), and octave_value::type_name().
Referenced by octave_classdef_superclass_ref::execute().
octave_value to_ov | ( | const cdef_object & | obj | ) |
Definition at line 128 of file cdef-utils.cc.
References octave_value(), and cdef_object::ok().
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_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(), cdef_manager::make_method(), cdef_manager::make_package(), cdef_manager::make_property(), map2Cell(), octave_classdef::metaclass_query(), 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(), cdef_object_scalar::subsref(), and to_ov().
octave_value to_ov | ( | const octave_value & | ov | ) |
Definition at line 137 of file cdef-utils.cc.
octave_value to_ov | ( | const std::list< cdef_class > & | class_list | ) |
Definition at line 167 of file cdef-utils.cc.
References octave_value(), and to_ov().