26 #if ! defined (octave_ov_fcn_handle_h)
27 #define octave_ov_fcn_handle_h 1
29 #include "octave-config.h"
55 const std::string&
file =
"")
65 virtual std::string
type (
void)
const = 0;
69 virtual bool is_simple (
void)
const {
return false; }
71 virtual bool is_scoped (
void)
const {
return false; }
73 virtual bool is_nested (
void)
const {
return false; }
84 subsref (
const std::string&
type,
const std::list<octave_value_list>& idx,
119 virtual bool save_binary (std::ostream& os,
bool save_as_floats);
121 virtual bool load_binary (std::istream& is,
bool swap,
125 bool save_as_floats);
139 set_fcn (
const std::string& ,
const std::string& )
146 void warn_load (
const char *file_type)
const;
147 void warn_save (
const char *file_type)
const;
188 const std::string& meth_nm);
192 const std::string& class_nm,
193 const std::string& meth_nm);
197 const std::list<std::string>& parentage);
201 const std::shared_ptr<octave::stack_frame>& closure_frames);
228 const std::list<octave_value_list>& idx)
235 const std::list<octave_value_list>& idx,
238 return m_rep->subsref (
type, idx, nargout);
251 bool is_simple (
void)
const {
return m_rep->is_simple (); }
253 bool is_scoped (
void)
const {
return m_rep->is_scoped (); }
255 bool is_nested (
void)
const {
return m_rep->is_nested (); }
280 std::string
fcn_name (
void)
const {
return m_rep->fcn_name (); }
284 return m_rep->workspace ();
291 m_rep->set_dispatch_class (class_name);
296 return m_rep->get_dispatch_class ();
304 bool save_ascii (std::ostream& os);
306 bool load_ascii (std::istream& is);
308 bool save_binary (std::ostream& os,
bool save_as_floats);
310 bool load_binary (std::istream& is,
bool swap,
317 void print (std::ostream& os,
bool pr_as_read_syntax =
false);
319 void print_raw (std::ostream& os,
bool pr_as_read_syntax =
false)
const;
329 std::shared_ptr<octave::base_fcn_handle>
m_rep;
343 OCTAVE_DEPRECATED (6,
"use 'tree_evaluator::make_fcn_handle' instead")
Vector representing the dimensions (size) of an Array.
octave_value convert_to_str_internal(bool pad, bool force, char type) const
void warn_save(const char *file_type) const
octave_value_list subsref(const std::string &type, const std::list< octave_value_list > &idx, int nargout)
virtual octave_value_list call(int nargout, const octave_value_list &args)=0
std::string fcn_name(void) const
virtual octave_scalar_map info(void)
virtual bool print_as_scalar(void) const
virtual bool save_binary(std::ostream &os, bool save_as_floats)
virtual octave_function * function_value(bool=false)
virtual ~base_fcn_handle(void)=default
virtual octave_value fcn_val(void)
virtual octave_user_function * user_function_value(bool=false)
base_fcn_handle(const std::string &name="", const std::string &file="")
virtual bool is_class_simple(void) const
std::string file(void) const
virtual bool load_hdf5(octave_hdf5_id &group_hid, octave_hdf5_id &space_hid, octave_hdf5_id &type_hid)
virtual void print_raw(std::ostream &, bool, int) const
virtual std::string get_dispatch_class(void) const
virtual void set_dispatch_class(const std::string &)
virtual bool is_anonymous(void) const
virtual bool is_internal(void) const
virtual base_fcn_handle * clone(void) const =0
virtual octave_value workspace(void) const
virtual std::string type(void) const =0
base_fcn_handle(const base_fcn_handle &)=default
virtual bool save_hdf5(octave_hdf5_id loc_id, const char *name, bool save_as_floats)
virtual bool load_binary(std::istream &is, bool swap, mach_info::float_format fmt)
virtual bool is_scoped(void) const
void unimplemented(const char *op, const char *fmt) const
virtual bool load_ascii(std::istream &is)
virtual bool is_simple(void) const
virtual bool set_fcn(const std::string &, const std::string &)
virtual bool is_nested(void) const
void warn_load(const char *file_type) const
virtual bool save_ascii(std::ostream &os)
std::map< std::string, octave_value > local_vars_map
virtual octave_value subsref(const std::string &type, const std::list< octave_value_list > &idx)
virtual octave_function * function_value(bool silent=false)
builtin_type_t builtin_type(void) const
static const std::string anonymous
std::string fcn_name(void) const
octave_base_value * empty_clone(void) const
bool is_defined(void) const
octave_scalar_map info(void)
bool is_simple(void) const
std::shared_ptr< octave::base_fcn_handle > m_rep
bool is_function_handle(void) const
bool print_as_scalar(void) const
bool is_internal(void) const
~octave_fcn_handle(void)=default
octave_base_value * clone(void) const
bool is_class_simple(void) const
octave_user_function * user_function_value(bool=false)
octave::base_fcn_handle * get_rep(void) const
octave_value fcn_val(void)
bool is_anonymous(void) const
octave_value_list call(int nargout, const octave_value_list &args)
octave_value convert_to_str_internal(bool pad, bool force, char type) const
octave_fcn_handle * fcn_handle_value(bool=false)
octave_value subsref(const std::string &type, const std::list< octave_value_list > &idx)
bool is_scoped(void) const
octave_value workspace(void) const
octave_value_list subsref(const std::string &type, const std::list< octave_value_list > &idx, int nargout)
bool is_nested(void) const
octave_function * function_value(bool=false)
std::string get_dispatch_class(void) const
void set_dispatch_class(const std::string &class_name)
octave_user_function * user_function_value(bool=false)
octave_idx_type length(void) const
octave_value convert_to_str_internal(bool pad, bool force, char type) const
static octave_value make_fcn_handle(const octave_value &fcn, const std::string &meth_name, const std::string &class_name)
return octave_value(v1.char_array_value() . concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string()) ? '\'' :'"'))
#define DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
bool is_equal_to(const octave_fcn_handle &fh1, const octave_fcn_handle &fh2)