GNU Octave  9.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
base_fcn_handle Class Referenceabstract

#include "ov-fcn-handle.h"

Inherited by octave::base_anonymous_fcn_handle, octave::base_nested_fcn_handle, octave::class_simple_fcn_handle, octave::internal_fcn_handle, octave::invalid_fcn_handle, octave::scoped_fcn_handle, and octave::simple_fcn_handle.

Public Member Functions

 base_fcn_handle (const base_fcn_handle &)=default
 
 base_fcn_handle (const std::string &name="", const std::string &file="")
 
virtual ~base_fcn_handle ()=default
 
virtual octave_value_list call (int nargout, const octave_value_list &args)=0
 
virtual base_fcn_handleclone () const =0
 
virtual void compile ()
 
octave_value convert_to_str_internal (bool pad, bool force, char type) const
 
std::string fcn_name () const
 
virtual octave_value fcn_val ()
 
std::string file () const
 
virtual octave_functionfunction_value (bool=false)
 
virtual octave_functionget_cached_fcn (const octave_value_list &)
 
virtual octave_functionget_cached_fcn (void *, void *)
 
virtual std::string get_dispatch_class () const
 
virtual bool has_function_cache () const
 
virtual octave_scalar_map info ()
 
virtual bool is_anonymous () const
 
virtual bool is_class_simple () const
 
virtual bool is_internal () const
 
virtual bool is_nested () const
 
virtual bool is_nested (const std::shared_ptr< stack_frame > &) const
 
virtual bool is_scoped () const
 
virtual bool is_simple () const
 
virtual bool is_weak_anonymous () const
 
virtual bool is_weak_nested () const
 
virtual bool load_ascii (std::istream &is)
 
virtual bool load_binary (std::istream &is, bool swap, mach_info::float_format fmt)
 
virtual bool load_hdf5 (octave_hdf5_id &group_hid, octave_hdf5_id &space_hid, octave_hdf5_id &type_hid)
 
virtual octave_value make_weak_anonymous_handle () const
 
virtual octave_value make_weak_nested_handle () const
 
virtual bool print_as_scalar () const
 
virtual void print_raw (std::ostream &, bool, int) const
 
virtual bool save_ascii (std::ostream &os)
 
virtual bool save_binary (std::ostream &os, bool save_as_floats)
 
virtual bool save_hdf5 (octave_hdf5_id loc_id, const char *name, bool save_as_floats)
 
virtual void set_dispatch_class (const std::string &)
 
virtual bool set_fcn (const std::string &, const std::string &)
 
octave_value_list subsref (const std::string &type, const std::list< octave_value_list > &idx, int nargout)
 
virtual std::string type () const =0
 
virtual octave_user_functionuser_function_value (bool=false)
 
virtual octave_value workspace () const
 

Protected Member Functions

void unimplemented (const char *op, const char *fmt) const
 
void warn_load (const char *file_type) const
 
void warn_save (const char *file_type) const
 

Protected Attributes

std::string m_file
 
std::string m_name
 

Detailed Description

Definition at line 50 of file ov-fcn-handle.h.

Constructor & Destructor Documentation

◆ base_fcn_handle() [1/2]

base_fcn_handle::base_fcn_handle ( const std::string &  name = "",
const std::string &  file = "" 
)
inline

Definition at line 54 of file ov-fcn-handle.h.

◆ base_fcn_handle() [2/2]

base_fcn_handle::base_fcn_handle ( const base_fcn_handle )
default

◆ ~base_fcn_handle()

virtual base_fcn_handle::~base_fcn_handle ( )
virtualdefault

Member Function Documentation

◆ call()

virtual octave_value_list base_fcn_handle::call ( int  nargout,
const octave_value_list args 
)
pure virtual

Referenced by subsref().

◆ clone()

virtual base_fcn_handle* base_fcn_handle::clone ( ) const
pure virtual

◆ compile()

virtual void base_fcn_handle::compile ( )
inlinevirtual

Definition at line 166 of file ov-fcn-handle.h.

◆ convert_to_str_internal()

octave_value base_fcn_handle::convert_to_str_internal ( bool  pad,
bool  force,
char  type 
) const

Definition at line 842 of file ov-fcn-handle.cc.

References octave_value(), print_raw(), and type().

◆ fcn_name()

std::string base_fcn_handle::fcn_name ( ) const
inline

Definition at line 92 of file ov-fcn-handle.h.

References m_name.

◆ fcn_val()

virtual octave_value base_fcn_handle::fcn_val ( )
inlinevirtual

Definition at line 115 of file ov-fcn-handle.h.

References octave_value().

◆ file()

std::string base_fcn_handle::file ( ) const
inline

Definition at line 94 of file ov-fcn-handle.h.

References m_file.

◆ function_value()

virtual octave_function* base_fcn_handle::function_value ( bool  = false)
inlinevirtual

Definition at line 105 of file ov-fcn-handle.h.

◆ get_cached_fcn() [1/2]

virtual octave_function* base_fcn_handle::get_cached_fcn ( const octave_value_list )
inlinevirtual

Definition at line 161 of file ov-fcn-handle.h.

◆ get_cached_fcn() [2/2]

virtual octave_function* base_fcn_handle::get_cached_fcn ( void *  ,
void *   
)
inlinevirtual

Definition at line 158 of file ov-fcn-handle.h.

◆ get_dispatch_class()

virtual std::string base_fcn_handle::get_dispatch_class ( ) const
inlinevirtual

Definition at line 124 of file ov-fcn-handle.h.

◆ has_function_cache()

virtual bool base_fcn_handle::has_function_cache ( ) const
inlinevirtual

Definition at line 164 of file ov-fcn-handle.h.

◆ info()

virtual octave_scalar_map base_fcn_handle::info ( )
inlinevirtual

Definition at line 120 of file ov-fcn-handle.h.

◆ is_anonymous()

virtual bool base_fcn_handle::is_anonymous ( ) const
inlinevirtual

Definition at line 84 of file ov-fcn-handle.h.

◆ is_class_simple()

virtual bool base_fcn_handle::is_class_simple ( ) const
inlinevirtual

Definition at line 82 of file ov-fcn-handle.h.

◆ is_internal()

virtual bool base_fcn_handle::is_internal ( ) const
inlinevirtual

Definition at line 67 of file ov-fcn-handle.h.

◆ is_nested() [1/2]

virtual bool base_fcn_handle::is_nested ( ) const
inlinevirtual

Definition at line 73 of file ov-fcn-handle.h.

◆ is_nested() [2/2]

virtual bool base_fcn_handle::is_nested ( const std::shared_ptr< stack_frame > &  ) const
inlinevirtual

Definition at line 75 of file ov-fcn-handle.h.

◆ is_scoped()

virtual bool base_fcn_handle::is_scoped ( ) const
inlinevirtual

Definition at line 71 of file ov-fcn-handle.h.

◆ is_simple()

virtual bool base_fcn_handle::is_simple ( ) const
inlinevirtual

Definition at line 69 of file ov-fcn-handle.h.

◆ is_weak_anonymous()

virtual bool base_fcn_handle::is_weak_anonymous ( ) const
inlinevirtual

Definition at line 86 of file ov-fcn-handle.h.

◆ is_weak_nested()

virtual bool base_fcn_handle::is_weak_nested ( ) const
inlinevirtual

Definition at line 80 of file ov-fcn-handle.h.

◆ load_ascii()

bool base_fcn_handle::load_ascii ( std::istream &  is)
virtual

Definition at line 858 of file ov-fcn-handle.cc.

References unimplemented().

◆ load_binary()

bool base_fcn_handle::load_binary ( std::istream &  is,
bool  swap,
mach_info::float_format  fmt 
)
virtual

Definition at line 874 of file ov-fcn-handle.cc.

References unimplemented().

◆ load_hdf5()

bool base_fcn_handle::load_hdf5 ( octave_hdf5_id group_hid,
octave_hdf5_id space_hid,
octave_hdf5_id type_hid 
)
virtual

Definition at line 890 of file ov-fcn-handle.cc.

References unimplemented().

◆ make_weak_anonymous_handle()

octave_value base_fcn_handle::make_weak_anonymous_handle ( ) const
virtual

Definition at line 799 of file ov-fcn-handle.cc.

References error(), and type().

◆ make_weak_nested_handle()

octave_value base_fcn_handle::make_weak_nested_handle ( ) const
virtual

Definition at line 791 of file ov-fcn-handle.cc.

References error(), and type().

◆ print_as_scalar()

virtual bool base_fcn_handle::print_as_scalar ( ) const
inlinevirtual

Definition at line 149 of file ov-fcn-handle.h.

◆ print_raw()

virtual void base_fcn_handle::print_raw ( std::ostream &  ,
bool  ,
int   
) const
inlinevirtual

Definition at line 144 of file ov-fcn-handle.h.

Referenced by convert_to_str_internal().

◆ save_ascii()

bool base_fcn_handle::save_ascii ( std::ostream &  os)
virtual

Definition at line 850 of file ov-fcn-handle.cc.

References unimplemented().

◆ save_binary()

bool base_fcn_handle::save_binary ( std::ostream &  os,
bool  save_as_floats 
)
virtual

Definition at line 866 of file ov-fcn-handle.cc.

References unimplemented().

◆ save_hdf5()

bool base_fcn_handle::save_hdf5 ( octave_hdf5_id  loc_id,
const char *  name,
bool  save_as_floats 
)
virtual

Definition at line 882 of file ov-fcn-handle.cc.

References unimplemented().

◆ set_dispatch_class()

virtual void base_fcn_handle::set_dispatch_class ( const std::string &  )
inlinevirtual

Definition at line 122 of file ov-fcn-handle.h.

◆ set_fcn()

virtual bool base_fcn_handle::set_fcn ( const std::string &  ,
const std::string &   
)
inlinevirtual

Definition at line 152 of file ov-fcn-handle.h.

◆ subsref()

octave_value_list base_fcn_handle::subsref ( const std::string &  type,
const std::list< octave_value_list > &  idx,
int  nargout 
)

Definition at line 807 of file ov-fcn-handle.cc.

References call(), error(), panic_impossible, and type().

◆ type()

virtual std::string base_fcn_handle::type ( ) const
pure virtual

◆ unimplemented()

void base_fcn_handle::unimplemented ( const char *  op,
const char *  fmt 
) const
protected

Definition at line 920 of file ov-fcn-handle.cc.

References type(), and warning().

Referenced by load_ascii(), load_binary(), load_hdf5(), save_ascii(), save_binary(), and save_hdf5().

◆ user_function_value()

virtual octave_user_function* base_fcn_handle::user_function_value ( bool  = false)
inlinevirtual

Definition at line 110 of file ov-fcn-handle.h.

◆ warn_load()

void base_fcn_handle::warn_load ( const char *  file_type) const
protected

Definition at line 898 of file ov-fcn-handle.cc.

References type(), and warning_with_id().

◆ warn_save()

void base_fcn_handle::warn_save ( const char *  file_type) const
protected

Definition at line 909 of file ov-fcn-handle.cc.

References type(), and warning_with_id().

◆ workspace()

virtual octave_value base_fcn_handle::workspace ( ) const
inlinevirtual

Definition at line 117 of file ov-fcn-handle.h.

References octave_value().

Member Data Documentation

◆ m_file

std::string base_fcn_handle::m_file
protected

Definition at line 180 of file ov-fcn-handle.h.

Referenced by file().

◆ m_name

std::string base_fcn_handle::m_name
protected

Definition at line 177 of file ov-fcn-handle.h.

Referenced by fcn_name().


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