#include "cdef-class.h"
Public Types | |
enum | { property_normal , property_inherited , property_all } |
Public Member Functions | |
cdef_class () | |
cdef_class (const cdef_class &cls) | |
cdef_class (const cdef_object &obj) | |
cdef_class (const std::string &nm, const std::list< cdef_class > &superclasses) | |
~cdef_class ()=default | |
octave_value | construct (const octave_value_list &args) |
cdef_object | construct_object (const octave_value_list &args) |
void | delete_object (const cdef_object &obj) |
std::string | file_name () const |
void | file_name (const std::string &nm) |
cdef_method | find_method (const std::string &nm, bool local=false) |
cdef_property | find_property (const std::string &nm) |
octave_value | get_constructor_function () |
std::string | get_directory () const |
octave_value | get_method (const std::string &nm) const |
octave_value | get_method (int ln) const |
octave_value | get_method_function (const std::string &nm) |
std::map< std::string, cdef_method > | get_method_map (bool only_inherited=false, bool include_ctor=false) |
Cell | get_methods (bool include_ctor=false) |
std::string | get_name () const |
string_vector | get_names () |
Cell | get_properties (int mode=property_normal) |
std::map< std::string, cdef_property > | get_property_map (int mode=property_normal) |
void | initialize_object (cdef_object &obj) |
void | install_method (const cdef_method &meth) |
void | install_property (const cdef_property &prop) |
bool | is_abstract () const |
bool | is_builtin () const |
bool | is_handle_class () const |
bool | is_meta_class () const |
bool | is_sealed () const |
void | mark_as_handle_class () |
void | mark_as_meta_class () |
cdef_class & | operator= (const cdef_class &cls) |
void | run_constructor (cdef_object &obj, const octave_value_list &args) |
void | set_directory (const std::string &dir) |
![]() | |
cdef_meta_object () | |
cdef_meta_object (cdef_meta_object_rep *r) | |
cdef_meta_object (const cdef_meta_object &obj) | |
cdef_meta_object (const cdef_object &obj) | |
~cdef_meta_object ()=default | |
std::string | doc_string () const |
void | doc_string (const std::string &txt) |
bool | is_class () const |
bool | is_method () const |
bool | is_package () const |
bool | is_property () const |
bool | meta_accepts_postfix_index (char type) const |
void | meta_release () |
octave_value_list | meta_subsref (const std::string &type, const std::list< octave_value_list > &idx, int nargout) |
cdef_meta_object & | operator= (const cdef_object &)=delete |
![]() | |
cdef_object () | |
cdef_object (cdef_object_rep *r) | |
cdef_object (const cdef_object &obj) | |
virtual | ~cdef_object () |
Array< cdef_object > | array_value () const |
void | break_closure_cycles (const std::shared_ptr< stack_frame > &frame) |
std::string | class_name () const |
cdef_object | clone () const |
cdef_object | copy () const |
dim_vector | dims () const |
cdef_object | empty_clone () const |
octave_value | get (const std::string &pname) const |
cdef_class | get_class () const |
octave_value | get_property (octave_idx_type idx, const std::string &pname) const |
const cdef_object_rep * | get_rep () const |
bool | is (const cdef_object &obj) const |
bool | is_array () const |
bool | is_constructed () const |
bool | is_constructed_for (const cdef_class &cls) const |
bool | is_handle_object () const |
bool | is_meta_object () const |
bool | is_partially_constructed_for (const cdef_class &cls) const |
bool | is_value_object () const |
cdef_object | make_array () const |
string_vector | map_keys () const |
octave_map | map_value () const |
void | mark_as_constructed () |
void | mark_as_constructed (const cdef_class &cls) |
void | mark_for_construction (const cdef_class &cls) |
bool | ok () const |
cdef_object & | operator= (const cdef_object &obj) |
void | put (const std::string &pname, const octave_value &val) |
void | set_class (const cdef_class &cls) |
void | set_property (octave_idx_type idx, const std::string &pname, const octave_value &pval) |
octave_value | subsasgn (const std::string &type, const std::list< octave_value_list > &idx, const octave_value &rhs, int ignore_copies=0) |
octave_value_list | subsref (const std::string &type, const std::list< octave_value_list > &idx, int nargout, std::size_t &skip, const cdef_class &context, bool auto_add=false) |
Static Public Member Functions | |
static cdef_class | make_meta_class (interpreter &interp, tree_classdef *t, bool is_at_folder=false) |
Analyze the tree_classdef tree and transform it to a cdef_class. More... | |
Friends | |
void | install_classdef (octave::interpreter &interp) |
bool | operator!= (const cdef_class &, const cdef_class &) |
bool | operator< (const cdef_class &, const cdef_class &) |
bool | operator== (const cdef_class &, const cdef_class &) |
Additional Inherited Members | |
![]() | |
cdef_object_rep * | get_rep () |
void | make_unique (int ignore_copies) |
Definition at line 51 of file cdef-class.h.
anonymous enum |
Enumerator | |
---|---|
property_normal | |
property_inherited | |
property_all |
Definition at line 408 of file cdef-class.h.
|
inline |
Definition at line 236 of file cdef-class.h.
|
inline |
Definition at line 238 of file cdef-class.h.
|
inline |
Definition at line 245 of file cdef-class.h.
|
inline |
Definition at line 247 of file cdef-class.h.
References error().
|
default |
|
inline |
Definition at line 368 of file cdef-class.h.
|
inline |
Definition at line 373 of file cdef-class.h.
Referenced by cdef_object_array::subsasgn().
|
inline |
Definition at line 322 of file cdef-class.h.
Referenced by cdef_object_rep::release().
|
inline |
Definition at line 404 of file cdef-class.h.
|
inline |
Definition at line 402 of file cdef-class.h.
Referenced by make_meta_class().
|
inline |
Definition at line 457 of file cdef-class.h.
Referenced by check_access(), cdef_manager::find_method_symbol(), tree_evaluator::get_user_code(), and cdef_object_scalar::subsref().
|
inline |
Definition at line 463 of file cdef-class.h.
Referenced by check_access(), cdef_object_scalar::subsasgn(), and cdef_object_scalar::subsref().
|
inline |
Definition at line 363 of file cdef-class.h.
Referenced by tree_classdef::make_meta_class().
|
inline |
Definition at line 313 of file cdef-class.h.
|
inline |
Definition at line 351 of file cdef-class.h.
Referenced by cdef_manager::find_method().
|
inline |
Definition at line 356 of file cdef-class.h.
octave_value cdef_class::get_method_function | ( | const std::string & | nm | ) |
Definition at line 1198 of file cdef-class.cc.
References octave_value().
|
inline |
Definition at line 279 of file cdef-class.h.
Referenced by F__methods__().
|
inline |
Definition at line 273 of file cdef-class.h.
|
inline |
Definition at line 318 of file cdef-class.h.
Referenced by handle_cdef_object::~handle_cdef_object(), value_cdef_object::~value_cdef_object(), check_access(), cdef_object_rep::class_name(), tree_evaluator::get_user_code(), make_function_of_class(), cdef_manager::make_method(), cdef_manager::make_property(), cdef_object_scalar::mark_for_construction(), cdef_manager::register_class(), and cdef_manager::unregister_class().
|
inline |
Definition at line 302 of file cdef-class.h.
Referenced by cdef_object_rep::map_keys().
|
inline |
Definition at line 291 of file cdef-class.h.
|
inline |
Definition at line 297 of file cdef-class.h.
Referenced by Fproperties(), and cdef_object::map_value().
|
inline |
Definition at line 378 of file cdef-class.h.
|
inline |
Definition at line 268 of file cdef-class.h.
|
inline |
Definition at line 286 of file cdef-class.h.
Referenced by cdef_manager::cdef_manager().
|
inline |
Definition at line 304 of file cdef-class.h.
|
inline |
Definition at line 320 of file cdef-class.h.
Referenced by cdef_manager::find_class().
|
inline |
Definition at line 393 of file cdef-class.h.
|
inline |
Definition at line 400 of file cdef-class.h.
|
inline |
Definition at line 306 of file cdef-class.h.
|
static |
Analyze the tree_classdef tree and transform it to a cdef_class.
All attribute validation should occur here.
Classdef attribute values can be given in the form of expressions. These expressions must be evaluated before assigning them as attribute values. Evaluating them as they are parsed causes trouble with possible recursion in the parser so we do it here. For example
will fail because each attempt to compute the metaclass of recursion_class will cause recursion_class to be parsed again.
Definition at line 872 of file cdef-class.cc.
References __get_cdef_manager__(), tree_classdef::attribute_list(), octave_value::bool_value(), cdef_object::class_name(), tree_classdef::doc_string(), cdef_meta_object::doc_string(), error(), tree_classdef::file_name(), file_name(), cdef_manager::find_package(), cdef_object::get(), interpreter::get_evaluator(), tree_classdef::ident(), lookup_class(), cdef_manager::make_class(), tree_identifier::name(), cdef_object::ok(), tree_classdef::package_name(), tree_evaluator::pop_scope(), tree_evaluator::push_dummy_scope(), cdef_object::put(), tree_classdef::superclass_list(), and to_ov().
Referenced by tree_classdef::make_meta_class().
|
inline |
Definition at line 388 of file cdef-class.h.
Referenced by cdef_manager::make_class().
|
inline |
Definition at line 398 of file cdef-class.h.
Referenced by cdef_manager::make_meta_class().
|
inline |
Definition at line 256 of file cdef-class.h.
References cdef_object::operator=().
|
inline |
Definition at line 383 of file cdef-class.h.
|
inline |
Definition at line 308 of file cdef-class.h.
|
friend |
|
friend |
Definition at line 443 of file cdef-class.h.
|
friend |
Definition at line 450 of file cdef-class.h.
|
friend |
Definition at line 435 of file cdef-class.h.