00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #if !defined (octave_fcn_inline_h)
00024 #define octave_fcn_inline_h 1
00025
00026 #include <iosfwd>
00027 #include <string>
00028
00029 #include "oct-alloc.h"
00030
00031 #include "ov-base.h"
00032 #include "ov-base-mat.h"
00033 #include "ov-fcn.h"
00034 #include "ov-typeinfo.h"
00035 #include "symtab.h"
00036 #include "ov-fcn-handle.h"
00037
00038
00039
00040 class
00041 OCTINTERP_API
00042 octave_fcn_inline : public octave_fcn_handle
00043 {
00044 public:
00045
00046 octave_fcn_inline (void)
00047 : octave_fcn_handle (), iftext (), ifargs () { }
00048
00049 octave_fcn_inline (const std::string& f, const string_vector& a,
00050 const std::string& n = std::string ());
00051
00052 octave_fcn_inline (const octave_fcn_inline& fi)
00053 : octave_fcn_handle (fi), iftext (fi.iftext), ifargs (fi.ifargs) { }
00054
00055 ~octave_fcn_inline (void) { }
00056
00057 octave_base_value *clone (void) const { return new octave_fcn_inline (*this); }
00058 octave_base_value *empty_clone (void) const { return new octave_fcn_inline (); }
00059
00060 bool is_inline_function (void) const { return true; }
00061
00062 octave_fcn_inline *fcn_inline_value (bool = false) { return this; }
00063
00064 std::string fcn_text (void) const { return iftext; }
00065
00066 string_vector fcn_arg_names (void) const { return ifargs; }
00067
00068 octave_value convert_to_str_internal (bool, bool, char) const;
00069
00070 Octave_map map_value (void) const;
00071
00072 bool save_ascii (std::ostream& os);
00073
00074 bool load_ascii (std::istream& is);
00075
00076 bool save_binary (std::ostream& os, bool& save_as_floats);
00077
00078 bool load_binary (std::istream& is, bool swap,
00079 oct_mach_info::float_format fmt);
00080
00081 #if defined (HAVE_HDF5)
00082 bool save_hdf5 (hid_t loc_id, const char *name, bool save_as_floats);
00083
00084 bool load_hdf5 (hid_t loc_id, const char *name, bool have_h5giterate_bug);
00085 #endif
00086
00087 void print (std::ostream& os, bool pr_as_read_syntax = false) const;
00088
00089 void print_raw (std::ostream& os, bool pr_as_read_syntax = false) const;
00090
00091 private:
00092
00093 DECLARE_OCTAVE_ALLOCATOR
00094
00095 DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA
00096
00097
00098 std::string iftext;
00099
00100
00101 string_vector ifargs;
00102 };
00103
00104 #endif
00105
00106
00107
00108
00109
00110
00111