GNU Octave  8.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
cdef_class::cdef_class_rep Class Reference
Inheritance diagram for cdef_class::cdef_class_rep:
Collaboration diagram for cdef_class::cdef_class_rep:

Public Member Functions

OCTINTERP_API cdef_class_rep (const std::list< cdef_class > &superclasses)
 
 cdef_class_rep (void)
 
 ~cdef_class_rep (void)=default
 
virtual Array< cdef_objectarray_value (void) const
 
void break_closure_cycles (const std::shared_ptr< stack_frame > &frame)
 
OCTINTERP_API std::string class_name (void) const
 
cdef_object_repclone (void) const
 
OCTINTERP_API octave_value construct (const octave_value_list &args)
 
OCTINTERP_API cdef_object construct_object (const octave_value_list &args)
 
cdef_object_repcopy (void) const
 
OCTINTERP_API void delete_object (const cdef_object &obj)
 
void destroy (void)
 
dim_vector dims (void) const
 
void doc_string (const std::string &txt)
 
std::string doc_string (void) const
 
cdef_object_repempty_clone (void) const
 
void file_name (const std::string &nm)
 
std::string file_name (void) const
 
OCTINTERP_API cdef_method find_method (const std::string &nm, bool local=false)
 
OCTINTERP_API cdef_property find_property (const std::string &nm)
 
octave_value get (const std::string &pname) const
 
OCTINTERP_API cdef_class get_class (void) const
 
std::string get_directory (void) const
 
OCTINTERP_API octave_value get_method (const std::string &name) const
 
OCTINTERP_API std::map< std::string, cdef_methodget_method_map (bool only_inherited, bool include_ctor)
 
OCTINTERP_API Cell get_methods (bool include_ctor)
 
std::string get_name (void) const
 
OCTINTERP_API string_vector get_names (void)
 
OCTINTERP_API Cell get_properties (int mode)
 
octave_value get_property (octave_idx_type idx, const std::string &pname) const
 
OCTINTERP_API std::map< std::string, cdef_propertyget_property_map (int mode)
 
OCTINTERP_API void initialize_object (cdef_object &obj)
 
OCTINTERP_API void install_method (const cdef_method &meth)
 
OCTINTERP_API void install_property (const cdef_property &prop)
 
bool is_abstract (void) const
 
virtual bool is_array (void) const
 
bool is_class (void) const
 
bool is_constructed (void) const
 
OCTINTERP_API bool is_constructed_for (const cdef_class &cls) const
 
bool is_handle_class (void) const
 
bool is_handle_object (void) const
 
bool is_meta_class (void) const
 
bool is_meta_object (void) const
 
virtual bool is_method (void) const
 
virtual bool is_package (void) const
 
OCTINTERP_API bool is_partially_constructed_for (const cdef_class &cls) const
 
virtual bool is_property (void) const
 
bool is_sealed (void) const
 
bool is_valid (void) const
 
virtual bool is_value_object (void) const
 
OCTINTERP_API cdef_object_repmake_array (void) const
 
virtual string_vector map_keys (void) const
 
OCTINTERP_API void mark_as_constructed (const cdef_class &cls)
 
void mark_as_constructed (void)
 
void mark_as_handle_class (void)
 
void mark_as_meta_class (void)
 
OCTINTERP_API void mark_for_construction (const cdef_class &)
 
bool meta_accepts_postfix_index (char type) const
 
OCTINTERP_API void meta_release (void)
 
OCTINTERP_API octave_value_list meta_subsref (const std::string &type, const std::list< octave_value_list > &idx, int nargout)
 
cdef_class_repoperator= (const cdef_class_rep &)=delete
 
void put (const std::string &pname, const octave_value &val)
 
OCTINTERP_API void release (const cdef_object &obj)
 
OCTINTERP_API void run_constructor (cdef_object &obj, const octave_value_list &args)
 
OCTINTERP_API void set_class (const cdef_class &cls)
 
void set_directory (const std::string &dir)
 
void set_name (const std::string &nm)
 
void set_property (octave_idx_type idx, const std::string &pname, const octave_value &pval)
 
octave_idx_type static_count (void) const
 
OCTINTERP_API octave_value subsasgn (const std::string &type, const std::list< octave_value_list > &idx, const octave_value &rhs)
 
OCTINTERP_API 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)
 

Protected Attributes

refcount< octave_idx_typem_count
 
std::map< cdef_class, std::list< cdef_class > > m_ctor_list
 
octave_scalar_map m_map
 

Private Types

typedef std::map< std::string, cdef_method >::const_iterator method_const_iterator
 
typedef std::map< std::string, cdef_method >::iterator method_iterator
 
typedef std::map< std::string, cdef_property >::const_iterator property_const_iterator
 
typedef std::map< std::string, cdef_property >::iterator property_iterator
 

Private Member Functions

 cdef_class_rep (const cdef_class_rep &c)=default
 
OCTAVE_NORETURN void err_invalid_object (const char *who) const
 
OCTINTERP_API void find_methods (std::map< std::string, cdef_method > &meths, bool only_inherited, bool include_ctor=false)
 
OCTINTERP_API void find_names (std::set< std::string > &names, bool all)
 
OCTINTERP_API void find_properties (std::map< std::string, cdef_property > &props, int mode=0)
 
OCTINTERP_API void load_all_methods (void)
 
cdef_class wrap (void)
 

Private Attributes

std::string m_directory
 
std::string m_doc_string
 
std::string m_file_name
 
bool m_handle_class
 
std::list< cdef_classm_implicit_ctor_list
 
cdef_object m_klass
 
octave_idx_type m_member_count
 
bool m_meta
 
std::map< std::string, cdef_methodm_method_map
 
std::map< std::string, cdef_propertym_property_map
 

Detailed Description

Definition at line 57 of file cdef-class.h.

Member Typedef Documentation

◆ method_const_iterator

typedef std::map<std::string, cdef_method>::const_iterator cdef_class::cdef_class_rep::method_const_iterator
private

Definition at line 229 of file cdef-class.h.

◆ method_iterator

typedef std::map<std::string, cdef_method>::iterator cdef_class::cdef_class_rep::method_iterator
private

Definition at line 228 of file cdef-class.h.

◆ property_const_iterator

typedef std::map<std::string, cdef_property>::const_iterator cdef_class::cdef_class_rep::property_const_iterator
private

Definition at line 231 of file cdef-class.h.

◆ property_iterator

typedef std::map<std::string, cdef_property>::iterator cdef_class::cdef_class_rep::property_iterator
private

Definition at line 230 of file cdef-class.h.

Constructor & Destructor Documentation

◆ cdef_class_rep() [1/3]

cdef_class::cdef_class_rep::cdef_class_rep ( void  )
inline

Definition at line 61 of file cdef-class.h.

◆ cdef_class_rep() [2/3]

cdef_class::cdef_class_rep::cdef_class_rep ( const std::list< cdef_class > &  superclasses)

Definition at line 83 of file cdef-class.cc.

References m_implicit_ctor_list, cdef_object_scalar::put(), and to_ov().

◆ ~cdef_class_rep()

cdef_class::cdef_class_rep::~cdef_class_rep ( void  )
default

◆ cdef_class_rep() [3/3]

cdef_class::cdef_class_rep::cdef_class_rep ( const cdef_class_rep c)
privatedefault

Member Function Documentation

◆ array_value()

virtual Array<cdef_object> cdef_object_rep::array_value ( void  ) const
inlinevirtualinherited

Reimplemented in cdef_object_array.

Definition at line 97 of file cdef-object.h.

Referenced by cdef_object::array_value().

◆ break_closure_cycles()

void cdef_object_scalar::break_closure_cycles ( const std::shared_ptr< stack_frame > &  frame)
virtualinherited

◆ class_name()

std::string cdef_object_rep::class_name ( void  ) const
inherited

◆ clone()

cdef_object_rep* handle_cdef_object::clone ( void  ) const
inlinevirtualinherited

Reimplemented from cdef_object_rep.

Definition at line 558 of file cdef-object.h.

References cdef_object_rep::m_count.

◆ construct()

octave_value cdef_class::cdef_class_rep::construct ( const octave_value_list args)

◆ construct_object()

◆ copy()

cdef_object_rep* cdef_class::cdef_class_rep::copy ( void  ) const
inlinevirtual

Reimplemented from cdef_object_rep.

Definition at line 72 of file cdef-class.h.

◆ delete_object()

◆ destroy()

void cdef_class::cdef_class_rep::destroy ( void  )
inlinevirtual

Reimplemented from cdef_object_rep.

Definition at line 143 of file cdef-class.h.

◆ dims()

dim_vector cdef_object_scalar::dims ( void  ) const
inlinevirtualinherited

Reimplemented from cdef_object_rep.

Definition at line 471 of file cdef-object.h.

◆ doc_string() [1/2]

void cdef_class::cdef_class_rep::doc_string ( const std::string &  txt)
inline

Definition at line 162 of file cdef-class.h.

◆ doc_string() [2/2]

std::string cdef_class::cdef_class_rep::doc_string ( void  ) const
inline

Definition at line 164 of file cdef-class.h.

◆ empty_clone()

cdef_object_rep* cdef_object_base::empty_clone ( void  ) const
inlinevirtualinherited

Reimplemented from cdef_object_rep.

Definition at line 371 of file cdef-object.h.

◆ err_invalid_object()

OCTAVE_NORETURN void cdef_object_rep::err_invalid_object ( const char *  who) const
inlineprivateinherited

Definition at line 195 of file cdef-object.h.

References error().

Referenced by cdef_object_rep::get_class().

◆ file_name() [1/2]

void cdef_class::cdef_class_rep::file_name ( const std::string &  nm)
inline

Definition at line 166 of file cdef-class.h.

References tree_classdef::m_file_name.

◆ file_name() [2/2]

std::string cdef_class::cdef_class_rep::file_name ( void  ) const
inline

Definition at line 168 of file cdef-class.h.

References tree_classdef::m_file_name.

◆ find_method()

cdef_method cdef_class::cdef_class_rep::find_method ( const std::string &  nm,
bool  local = false 
)

◆ find_methods()

void cdef_class::cdef_class_rep::find_methods ( std::map< std::string, cdef_method > &  meths,
bool  only_inherited,
bool  include_ctor = false 
)
private

◆ find_names()

void cdef_class::cdef_class_rep::find_names ( std::set< std::string > &  names,
bool  all 
)
private

◆ find_properties()

void cdef_class::cdef_class_rep::find_properties ( std::map< std::string, cdef_property > &  props,
int  mode = 0 
)
private

◆ find_property()

cdef_property cdef_class::cdef_class_rep::find_property ( const std::string &  nm)

◆ get()

octave_value cdef_object_scalar::get ( const std::string &  pname) const
inlinevirtualinherited

Reimplemented from cdef_object_rep.

Definition at line 480 of file cdef-object.h.

References error(), and Array< T, Alloc >::numel().

Referenced by cdef_property::cdef_property_rep::get_value().

◆ get_class()

◆ get_directory()

std::string cdef_class::cdef_class_rep::get_directory ( void  ) const
inline

Definition at line 110 of file cdef-class.h.

◆ get_method()

octave_value cdef_class::cdef_class_rep::get_method ( const std::string &  name) const

Definition at line 708 of file cdef-class.cc.

References octave_value().

◆ get_method_map()

std::map< std::string, cdef_method > cdef_class::cdef_class_rep::get_method_map ( bool  only_inherited,
bool  include_ctor 
)

Definition at line 304 of file cdef-class.cc.

◆ get_methods()

Cell cdef_class::cdef_class_rep::get_methods ( bool  include_ctor)

Definition at line 287 of file cdef-class.cc.

References to_ov().

◆ get_name()

std::string cdef_class::cdef_class_rep::get_name ( void  ) const
inline

◆ get_names()

string_vector cdef_class::cdef_class_rep::get_names ( void  )

Definition at line 518 of file cdef-class.cc.

References string_vector::sort().

◆ get_properties()

Cell cdef_class::cdef_class_rep::get_properties ( int  mode)

Definition at line 397 of file cdef-class.cc.

References cdef_class::get_property_map(), and to_ov().

◆ get_property()

octave_value cdef_object_scalar::get_property ( octave_idx_type  idx,
const std::string &  pname 
) const
inlinevirtualinherited

Reimplemented from cdef_object_rep.

Definition at line 500 of file cdef-object.h.

References error(), and cdef_object::get().

◆ get_property_map()

std::map< std::string, cdef_property > cdef_class::cdef_class_rep::get_property_map ( int  mode)

Definition at line 414 of file cdef-class.cc.

◆ initialize_object()

void cdef_class::cdef_class_rep::initialize_object ( cdef_object obj)

◆ install_method()

◆ install_property()

void cdef_class::cdef_class_rep::install_property ( const cdef_property prop)

Definition at line 389 of file cdef-class.cc.

References cdef_property::get_name().

◆ is_abstract()

bool cdef_class::cdef_class_rep::is_abstract ( void  ) const
inline

Definition at line 81 of file cdef-class.h.

◆ is_array()

virtual bool cdef_object_rep::is_array ( void  ) const
inlinevirtualinherited

Reimplemented in cdef_object_array.

Definition at line 89 of file cdef-object.h.

Referenced by cdef_object::is_array().

◆ is_class()

bool cdef_class::cdef_class_rep::is_class ( void  ) const
inlinevirtual

Reimplemented from cdef_meta_object_rep.

Definition at line 74 of file cdef-class.h.

◆ is_constructed()

bool cdef_object_scalar::is_constructed ( void  ) const
inlinevirtualinherited

◆ is_constructed_for()

bool cdef_object_scalar::is_constructed_for ( const cdef_class cls) const
virtualinherited

Reimplemented from cdef_object_rep.

Definition at line 707 of file cdef-object.cc.

References cdef_object_scalar::is_constructed(), and cdef_object_scalar::m_ctor_list.

◆ is_handle_class()

bool cdef_class::cdef_class_rep::is_handle_class ( void  ) const
inline

Definition at line 139 of file cdef-class.h.

◆ is_handle_object()

bool handle_cdef_object::is_handle_object ( void  ) const
inlinevirtualinherited

Reimplemented from cdef_object_rep.

Definition at line 572 of file cdef-object.h.

◆ is_meta_class()

bool cdef_class::cdef_class_rep::is_meta_class ( void  ) const
inline

Definition at line 160 of file cdef-class.h.

◆ is_meta_object()

bool cdef_meta_object_rep::is_meta_object ( void  ) const
inlinevirtualinherited

Reimplemented from cdef_object_rep.

Definition at line 628 of file cdef-object.h.

◆ is_method()

virtual bool cdef_meta_object_rep::is_method ( void  ) const
inlinevirtualinherited

Reimplemented in cdef_method::cdef_method_rep.

Definition at line 634 of file cdef-object.h.

◆ is_package()

virtual bool cdef_meta_object_rep::is_package ( void  ) const
inlinevirtualinherited

Reimplemented in cdef_package::cdef_package_rep.

Definition at line 636 of file cdef-object.h.

◆ is_partially_constructed_for()

bool cdef_object_scalar::is_partially_constructed_for ( const cdef_class cls) const
virtualinherited

Reimplemented from cdef_object_rep.

Definition at line 714 of file cdef-object.cc.

References cdef_object_scalar::is_constructed(), and cdef_object_scalar::m_ctor_list.

◆ is_property()

virtual bool cdef_meta_object_rep::is_property ( void  ) const
inlinevirtualinherited

Reimplemented in cdef_property::cdef_property_rep.

Definition at line 632 of file cdef-object.h.

◆ is_sealed()

bool cdef_class::cdef_class_rep::is_sealed ( void  ) const
inline

Definition at line 83 of file cdef-class.h.

◆ is_valid()

bool handle_cdef_object::is_valid ( void  ) const
inlinevirtualinherited

Reimplemented from cdef_object_rep.

Definition at line 570 of file cdef-object.h.

◆ is_value_object()

virtual bool cdef_object_rep::is_value_object ( void  ) const
inlinevirtualinherited

Reimplemented in value_cdef_object.

Definition at line 91 of file cdef-object.h.

Referenced by cdef_object::is_value_object().

◆ load_all_methods()

void cdef_class::cdef_class_rep::load_all_methods ( void  )
private

Definition at line 281 of file cdef-class.cc.

◆ make_array()

cdef_object_rep * cdef_object_base::make_array ( void  ) const
virtualinherited

Reimplemented from cdef_object_rep.

Definition at line 206 of file cdef-object.cc.

References cdef_object_base::get_class(), and r.

◆ map_keys()

string_vector cdef_object_rep::map_keys ( void  ) const
virtualinherited

◆ mark_as_constructed() [1/2]

void cdef_object_scalar::mark_as_constructed ( const cdef_class cls)
virtualinherited

Reimplemented from cdef_object_rep.

Definition at line 733 of file cdef-object.cc.

References cdef_object_scalar::m_ctor_list.

◆ mark_as_constructed() [2/2]

void cdef_object_scalar::mark_as_constructed ( void  )
inlinevirtualinherited

Reimplemented from cdef_object_rep.

Definition at line 524 of file cdef-object.h.

◆ mark_as_handle_class()

void cdef_class::cdef_class_rep::mark_as_handle_class ( void  )
inline

Definition at line 137 of file cdef-class.h.

◆ mark_as_meta_class()

void cdef_class::cdef_class_rep::mark_as_meta_class ( void  )
inline

Definition at line 158 of file cdef-class.h.

◆ mark_for_construction()

void cdef_object_scalar::mark_for_construction ( const cdef_class cls)
virtualinherited

◆ meta_accepts_postfix_index()

bool cdef_class::cdef_class_rep::meta_accepts_postfix_index ( char  type) const
inlinevirtual

Reimplemented from cdef_meta_object_rep.

Definition at line 120 of file cdef-class.h.

◆ meta_release()

void cdef_class::cdef_class_rep::meta_release ( void  )
virtual

Reimplemented from cdef_meta_object_rep.

Definition at line 636 of file cdef-class.cc.

References __get_cdef_manager__(), and cdef_manager::unregister_class().

◆ meta_subsref()

octave_value_list cdef_class::cdef_class_rep::meta_subsref ( const std::string &  type,
const std::list< octave_value_list > &  idx,
int  nargout 
)
virtual

◆ operator=()

cdef_class_rep& cdef_class::cdef_class_rep::operator= ( const cdef_class_rep )
delete

◆ put()

void cdef_object_scalar::put ( const std::string &  pname,
const octave_value val 
)
inlinevirtualinherited

Reimplemented from cdef_object_rep.

Definition at line 475 of file cdef-object.h.

Referenced by cdef_class_rep().

◆ release()

◆ run_constructor()

◆ set_class()

void cdef_object_base::set_class ( const cdef_class cls)
virtualinherited

Reimplemented from cdef_object_rep.

Definition at line 195 of file cdef-object.cc.

References cdef_object_base::get_class(), cdef_object_base::m_klass, and cdef_object::ok().

◆ set_directory()

void cdef_class::cdef_class_rep::set_directory ( const std::string &  dir)
inline

Definition at line 108 of file cdef-class.h.

◆ set_name()

void cdef_class::cdef_class_rep::set_name ( const std::string &  nm)
inline

◆ set_property()

void cdef_object_scalar::set_property ( octave_idx_type  idx,
const std::string &  pname,
const octave_value pval 
)
inlinevirtualinherited

Reimplemented from cdef_object_rep.

Definition at line 490 of file cdef-object.h.

References error(), and cdef_object::put().

◆ static_count()

octave_idx_type cdef_class::cdef_class_rep::static_count ( void  ) const
inlinevirtual

Reimplemented from cdef_object_rep.

Definition at line 141 of file cdef-class.h.

◆ subsasgn()

◆ subsref()

octave_value_list cdef_object_scalar::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 
)
virtualinherited

◆ wrap()

cdef_class cdef_class::cdef_class_rep::wrap ( void  )
inlineprivate

Definition at line 184 of file cdef-class.h.

References cdef_class.

Member Data Documentation

◆ m_count

◆ m_ctor_list

◆ m_directory

std::string cdef_class::cdef_class_rep::m_directory
private

Definition at line 193 of file cdef-class.h.

◆ m_doc_string

std::string cdef_class::cdef_class_rep::m_doc_string
private

Definition at line 195 of file cdef-class.h.

◆ m_file_name

std::string cdef_class::cdef_class_rep::m_file_name
private

Definition at line 197 of file cdef-class.h.

◆ m_handle_class

bool cdef_class::cdef_class_rep::m_handle_class
private

Definition at line 214 of file cdef-class.h.

◆ m_implicit_ctor_list

std::list<cdef_class> cdef_class::cdef_class_rep::m_implicit_ctor_list
private

Definition at line 220 of file cdef-class.h.

Referenced by cdef_class_rep().

◆ m_klass

cdef_object cdef_object_base::m_klass
privateinherited

Definition at line 388 of file cdef-object.h.

Referenced by cdef_object_base::get_class(), and cdef_object_base::set_class().

◆ m_map

octave_scalar_map cdef_object_scalar::m_map
protectedinherited

Definition at line 533 of file cdef-object.h.

Referenced by cdef_object_scalar::break_closure_cycles().

◆ m_member_count

octave_idx_type cdef_class::cdef_class_rep::m_member_count
private

Definition at line 209 of file cdef-class.h.

◆ m_meta

bool cdef_class::cdef_class_rep::m_meta
private

Definition at line 224 of file cdef-class.h.

◆ m_method_map

std::map<std::string, cdef_method> cdef_class::cdef_class_rep::m_method_map
private

Definition at line 201 of file cdef-class.h.

◆ m_property_map

std::map<std::string, cdef_property> cdef_class::cdef_class_rep::m_property_map
private

Definition at line 205 of file cdef-class.h.


The documentation for this class was generated from the following files: