GNU Octave  8.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
cdef_manager Class Reference

#include "cdef-manager.h"

Collaboration diagram for cdef_manager:

Public Member Functions

 cdef_manager (const cdef_manager &)=delete
 
OCTINTERP_API cdef_manager (interpreter &interp)
 
 ~cdef_manager (void)=default
 
OCTINTERP_API cdef_class find_class (const std::string &name, bool error_if_not_found=true, bool load_if_not_found=true)
 
OCTINTERP_API octave_value find_method (const std::string &class_name, const std::string &name) const
 
OCTINTERP_API octave_value find_method_symbol (const std::string &method_name, const std::string &class_name)
 
OCTINTERP_API cdef_package find_package (const std::string &name, bool error_if_not_found=true, bool load_if_not_found=true)
 
OCTINTERP_API octave_value find_package_symbol (const std::string &pack_name)
 
OCTINTERP_API cdef_property make_attribute (const cdef_class &cls, const std::string &name)
 
OCTINTERP_API cdef_class make_class (const std::string &name, const cdef_class &super)
 
OCTINTERP_API cdef_class make_class (const std::string &name, const std::list< cdef_class > &super_list=std::list< cdef_class >())
 
OCTINTERP_API cdef_class make_meta_class (const std::string &name, const cdef_class &super)
 
OCTINTERP_API cdef_method make_method (const cdef_class &cls, const std::string &name, const octave_value &fcn, const std::string &m_access="public", bool is_static=false)
 
OCTINTERP_API cdef_method make_method (const cdef_class &cls, const std::string &name, octave_builtin::fcn ff, const std::string &m_access="public", bool is_static=false)
 
OCTINTERP_API cdef_method make_method (const cdef_class &cls, const std::string &name, octave_builtin::meth mm, const std::string &m_access="public", bool is_static=false)
 
OCTINTERP_API cdef_package make_package (const std::string &nm, const std::string &parent="")
 
OCTINTERP_API cdef_property make_property (const cdef_class &cls, const std::string &name, const octave_value &get_method=Matrix(), const std::string &get_access="public", const octave_value &set_method=Matrix(), const std::string &set_access="public")
 
const cdef_packagemeta (void) const
 
const cdef_classmeta_class (void) const
 
const cdef_classmeta_method (void) const
 
const cdef_classmeta_package (void) const
 
const cdef_classmeta_property (void) const
 
cdef_manageroperator= (const cdef_manager &)=delete
 
void register_class (const cdef_class &cls)
 
void register_package (const cdef_package &pkg)
 
void unregister_class (const cdef_class &cls)
 
void unregister_package (const cdef_package &pkg)
 

Private Attributes

std::map< std::string, cdef_classm_all_classes
 
std::map< std::string, cdef_packagem_all_packages
 
interpreterm_interpreter
 
cdef_package m_meta
 
cdef_class m_meta_class
 
cdef_class m_meta_method
 
cdef_class m_meta_package
 
cdef_class m_meta_property
 

Detailed Description

Definition at line 42 of file cdef-manager.h.

Constructor & Destructor Documentation

◆ cdef_manager() [1/2]

◆ cdef_manager() [2/2]

cdef_manager::cdef_manager ( const cdef_manager )
delete

◆ ~cdef_manager()

cdef_manager::~cdef_manager ( void  )
default

Member Function Documentation

◆ find_class()

cdef_class cdef_manager::find_class ( const std::string &  name,
bool  error_if_not_found = true,
bool  load_if_not_found = true 
)

◆ find_method()

octave_value cdef_manager::find_method ( const std::string &  class_name,
const std::string &  name 
) const

Definition at line 942 of file cdef-manager.cc.

References cdef_class::get_method(), and lookup_class().

Referenced by tree_evaluator::get_user_code().

◆ find_method_symbol()

octave_value cdef_manager::find_method_symbol ( const std::string &  method_name,
const std::string &  class_name 
)

◆ find_package()

cdef_package cdef_manager::find_package ( const std::string &  name,
bool  error_if_not_found = true,
bool  load_if_not_found = true 
)

◆ find_package_symbol()

octave_value cdef_manager::find_package_symbol ( const std::string &  pack_name)

Definition at line 744 of file cdef-manager.cc.

References find_package(), octave_value(), and cdef_object::ok().

◆ make_attribute()

cdef_property cdef_manager::make_attribute ( const cdef_class cls,
const std::string &  name 
)

Definition at line 869 of file cdef-manager.cc.

References make_property().

Referenced by cdef_manager().

◆ make_class() [1/2]

cdef_class cdef_manager::make_class ( const std::string &  name,
const cdef_class super 
)

Definition at line 812 of file cdef-manager.cc.

References make_class().

◆ make_class() [2/2]

cdef_class cdef_manager::make_class ( const std::string &  name,
const std::list< cdef_class > &  super_list = std::list<cdef_class> () 
)

◆ make_meta_class()

cdef_class cdef_manager::make_meta_class ( const std::string &  name,
const cdef_class super 
)

Definition at line 819 of file cdef-manager.cc.

References make_class(), cdef_class::mark_as_meta_class(), and cdef_object::put().

Referenced by cdef_manager().

◆ make_method() [1/3]

cdef_method cdef_manager::make_method ( const cdef_class cls,
const std::string &  name,
const octave_value fcn,
const std::string &  m_access = "public",
bool  is_static = false 
)

◆ make_method() [2/3]

cdef_method cdef_manager::make_method ( const cdef_class cls,
const std::string &  name,
octave_builtin::fcn  ff,
const std::string &  m_access = "public",
bool  is_static = false 
)

Definition at line 904 of file cdef-manager.cc.

References make_method().

◆ make_method() [3/3]

cdef_method cdef_manager::make_method ( const cdef_class cls,
const std::string &  name,
octave_builtin::meth  mm,
const std::string &  m_access = "public",
bool  is_static = false 
)

Definition at line 914 of file cdef-manager.cc.

References make_method().

◆ make_package()

cdef_package cdef_manager::make_package ( const std::string &  nm,
const std::string &  parent = "" 
)

◆ make_property()

cdef_property cdef_manager::make_property ( const cdef_class cls,
const std::string &  name,
const octave_value get_method = Matrix (),
const std::string &  get_access = "public",
const octave_value set_method = Matrix (),
const std::string &  set_access = "public" 
)

◆ meta()

const cdef_package& cdef_manager::meta ( void  ) const
inline

Definition at line 98 of file cdef-manager.h.

Referenced by cdef_package::cdef_package_rep::meta_release().

◆ meta_class()

const cdef_class& cdef_manager::meta_class ( void  ) const
inline

Definition at line 93 of file cdef-manager.h.

Referenced by cdef_class::cdef_class_rep::construct_object(), and make_class().

◆ meta_method()

const cdef_class& cdef_manager::meta_method ( void  ) const
inline

Definition at line 95 of file cdef-manager.h.

Referenced by cdef_class::cdef_class_rep::construct_object(), and make_method().

◆ meta_package()

const cdef_class& cdef_manager::meta_package ( void  ) const
inline

Definition at line 96 of file cdef-manager.h.

Referenced by cdef_class::cdef_class_rep::construct_object(), and make_package().

◆ meta_property()

const cdef_class& cdef_manager::meta_property ( void  ) const
inline

Definition at line 94 of file cdef-manager.h.

Referenced by cdef_class::cdef_class_rep::construct_object(), and make_property().

◆ operator=()

cdef_manager& cdef_manager::operator= ( const cdef_manager )
delete

◆ register_class()

void cdef_manager::register_class ( const cdef_class cls)
inline

Definition at line 73 of file cdef-manager.h.

References cdef_class::get_name().

Referenced by make_class().

◆ register_package()

void cdef_manager::register_package ( const cdef_package pkg)
inline

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

References cdef_package::get_name().

Referenced by make_package().

◆ unregister_class()

void cdef_manager::unregister_class ( const cdef_class cls)
inline

Definition at line 78 of file cdef-manager.h.

References cdef_class::get_name().

Referenced by cdef_class::cdef_class_rep::meta_release().

◆ unregister_package()

void cdef_manager::unregister_package ( const cdef_package pkg)
inline

Definition at line 88 of file cdef-manager.h.

References cdef_package::get_name().

Referenced by cdef_package::cdef_package_rep::meta_release().

Member Data Documentation

◆ m_all_classes

std::map<std::string, cdef_class> cdef_manager::m_all_classes
private

Definition at line 150 of file cdef-manager.h.

Referenced by find_class().

◆ m_all_packages

std::map<std::string, cdef_package> cdef_manager::m_all_packages
private

Definition at line 153 of file cdef-manager.h.

Referenced by find_package().

◆ m_interpreter

interpreter& cdef_manager::m_interpreter
private

Definition at line 147 of file cdef-manager.h.

Referenced by cdef_manager(), find_class(), and find_package().

◆ m_meta

cdef_package cdef_manager::m_meta
private

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

Referenced by cdef_manager().

◆ m_meta_class

cdef_class cdef_manager::m_meta_class
private

Definition at line 155 of file cdef-manager.h.

Referenced by cdef_manager().

◆ m_meta_method

cdef_class cdef_manager::m_meta_method
private

Definition at line 157 of file cdef-manager.h.

Referenced by cdef_manager().

◆ m_meta_package

cdef_class cdef_manager::m_meta_package
private

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

Referenced by cdef_manager().

◆ m_meta_property

cdef_class cdef_manager::m_meta_property
private

Definition at line 156 of file cdef-manager.h.

Referenced by cdef_manager().


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