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 ()
const = 0;
75 virtual bool is_nested (
const std::shared_ptr<stack_frame>&)
const
97 subsref (
const std::string&
type,
const std::list<octave_value_list>& idx,
132 virtual bool save_binary (std::ostream& os,
bool save_as_floats);
134 virtual bool load_binary (std::istream& is,
bool swap,
138 bool save_as_floats);
152 set_fcn (
const std::string& ,
const std::string& )
170 void warn_load (
const char *file_type)
const;
171 void warn_save (
const char *file_type)
const;
183 OCTAVE_END_NAMESPACE(
octave)
213 const std::string& meth_nm);
217 const std::string& class_nm,
218 const std::string& meth_nm);
222 const std::list<std::string>& parentage);
226 const std::shared_ptr<octave::stack_frame>& closure_frames);
231 const octave::stack_frame::local_vars_map& local_vars,
232 const std::shared_ptr<octave::stack_frame>& closure_frames
233 = std::shared_ptr<octave::stack_frame> ());
262 const std::list<octave_value_list>& idx)
269 const std::list<octave_value_list>& idx,
272 return m_rep->subsref (type, idx, nargout);
291 bool is_nested (
const std::shared_ptr<octave::stack_frame>& frame)
const
293 return m_rep->is_nested (frame);
306 return m_rep->make_weak_nested_handle ();
311 return m_rep->make_weak_anonymous_handle ();
333 std::string
fcn_name ()
const {
return m_rep->fcn_name (); }
337 return m_rep->workspace ();
344 m_rep->set_dispatch_class (class_name);
349 return m_rep->get_dispatch_class ();
357 bool save_ascii (std::ostream& os);
359 bool load_ascii (std::istream& is);
361 bool save_binary (std::ostream& os,
bool save_as_floats);
363 bool load_binary (std::istream& is,
bool swap,
366 bool save_hdf5 (
octave_hdf5_id loc_id,
const char *name,
bool save_as_floats);
370 void print (std::ostream& os,
bool pr_as_read_syntax =
false);
372 void print_raw (std::ostream& os,
bool pr_as_read_syntax =
false)
const;
382 std::shared_ptr<octave::base_fcn_handle> m_rep;
384 octave::base_fcn_handle * get_rep ()
const {
return m_rep.get (); }
virtual bool is_weak_nested() const
virtual bool save_binary(std::ostream &os, bool save_as_floats)
virtual bool is_scoped() const
virtual bool is_weak_anonymous() const
virtual bool save_hdf5(octave_hdf5_id loc_id, const char *name, bool save_as_floats)
virtual bool is_class_simple() const
void unimplemented(const char *op, const char *fmt) const
virtual bool print_as_scalar() const
virtual bool is_nested(const std::shared_ptr< stack_frame > &) const
virtual bool save_ascii(std::ostream &os)
virtual void set_dispatch_class(const std::string &)
void warn_save(const char *file_type) const
virtual bool load_binary(std::istream &is, bool swap, mach_info::float_format fmt)
virtual bool is_simple() const
virtual bool has_function_cache() const
virtual bool load_hdf5(octave_hdf5_id &group_hid, octave_hdf5_id &space_hid, octave_hdf5_id &type_hid)
virtual octave_function * get_cached_fcn(void *, void *)
virtual octave_scalar_map info()
base_fcn_handle(const base_fcn_handle &)=default
virtual octave_value_list call(int nargout, const octave_value_list &args)=0
void warn_load(const char *file_type) const
virtual octave_function * function_value(bool=false)
base_fcn_handle(const std::string &name="", const std::string &file="")
virtual ~base_fcn_handle()=default
virtual octave_value make_weak_anonymous_handle() const
virtual std::string get_dispatch_class() const
virtual octave_value workspace() const
virtual bool is_nested() const
virtual bool load_ascii(std::istream &is)
virtual base_fcn_handle * clone() const =0
virtual octave_value fcn_val()
octave_value_list subsref(const std::string &type, const std::list< octave_value_list > &idx, int nargout)
octave_value convert_to_str_internal(bool pad, bool force, char type) const
std::string fcn_name() const
virtual octave_function * get_cached_fcn(const octave_value_list &)
virtual octave_user_function * user_function_value(bool=false)
virtual octave_value make_weak_nested_handle() const
virtual bool is_anonymous() const
virtual std::string type() const =0
virtual bool set_fcn(const std::string &, const std::string &)
virtual void print_raw(std::ostream &, bool, int) const
virtual bool is_internal() const
Vector representing the dimensions (size) of an Array.
virtual octave_value subsref(const std::string &type, const std::list< octave_value_list > &idx)
virtual octave_function * function_value(bool silent=false)
~octave_fcn_handle()=default
static const std::string anonymous
bool is_class_simple() const
bool print_as_scalar() const
std::string get_dispatch_class() const
octave_fcn_handle(const std::string &name, octave_value cache)
octave_user_function * user_function_value(bool=false)
octave_value_list call(int nargout, const octave_value_list &args)
builtin_type_t builtin_type() const
octave_value convert_to_str_internal(bool pad, bool force, char type) const
octave_fcn_handle * fcn_handle_value(bool=false)
octave_value make_weak_anonymous_handle() const
octave_value subsref(const std::string &type, const std::list< octave_value_list > &idx)
octave_base_value * clone() const
std::string fcn_name() const
octave_value_list subsref(const std::string &type, const std::list< octave_value_list > &idx, int nargout)
bool is_anonymous() const
octave_function * function_value(bool=false)
octave_value workspace() const
bool is_function_handle() const
octave_value make_weak_nested_handle() const
octave_base_value * empty_clone() const
bool is_weak_anonymous() const
bool is_weak_nested() const
bool is_nested(const std::shared_ptr< octave::stack_frame > &frame) const
void set_dispatch_class(const std::string &class_name)
octave_user_function * user_function_value(bool=false)
octave_idx_type length() const
octave_value convert_to_str_internal(bool pad, bool force, char type) const
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
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)