comparison src/ov-fcn.h @ 8785:70f5a0375afd

oct-map.h: fix think-o in previous change
author John W. Eaton <jwe@octave.org>
date Tue, 17 Feb 2009 21:41:26 -0500
parents 0d607e8dbbfa
children eb63fbe60fab
comparison
equal deleted inserted replaced
8784:374cb30311a8 8785:70f5a0375afd
43 OCTINTERP_API 43 OCTINTERP_API
44 octave_function : public octave_base_value 44 octave_function : public octave_base_value
45 { 45 {
46 public: 46 public:
47 47
48 octave_function (void) { } 48 octave_function (void)
49 : relative (false), locked (false), private_function (false),
50 xdispatch_class (), my_name (), my_dir_name (), doc () { }
49 51
50 ~octave_function (void) { } 52 ~octave_function (void) { }
51 53
52 octave_base_value *clone (void) const; 54 octave_base_value *clone (void) const;
53 octave_base_value *empty_clone (void) const; 55 octave_base_value *empty_clone (void) const;
78 80
79 virtual bool is_class_constructor (void) const { return false; } 81 virtual bool is_class_constructor (void) const { return false; }
80 82
81 virtual bool is_class_method (void) const { return false; } 83 virtual bool is_class_method (void) const { return false; }
82 84
83 virtual std::string dispatch_class (void) const { return std::string (); }
84
85 virtual bool takes_varargs (void) const { return false; } 85 virtual bool takes_varargs (void) const { return false; }
86 86
87 virtual bool takes_var_return (void) const { return false; } 87 virtual bool takes_var_return (void) const { return false; }
88
89 void stash_dispatch_class (const std::string& nm) { xdispatch_class = nm; }
90
91 std::string dispatch_class (void) const { return xdispatch_class; }
92
93 void mark_as_private_function (const std::string& cname = std::string ())
94 {
95 private_function = true;
96 xdispatch_class = cname;
97 }
98
99 bool is_private_function (void) const { return private_function; }
100
101 bool is_private_function_of_class (const std::string& nm)
102 { return private_function && xdispatch_class == nm; }
88 103
89 std::string dir_name (void) const { return my_dir_name; } 104 std::string dir_name (void) const { return my_dir_name; }
90 105
91 void stash_dir_name (const std::string& dir) { my_dir_name = dir; } 106 void stash_dir_name (const std::string& dir) { my_dir_name = dir; }
92 107
132 bool relative; 147 bool relative;
133 148
134 // TRUE if this function is tagged so that it can't be cleared. 149 // TRUE if this function is tagged so that it can't be cleared.
135 bool locked; 150 bool locked;
136 151
152 // TRUE means this is a private function.
153 bool private_function;
154
155 // If this object is a class method or constructor, or a private
156 // function inside a class directory, this is the name of the class
157 // to which the method belongs.
158 std::string xdispatch_class;
159
137 // The name of this function. 160 // The name of this function.
138 std::string my_name; 161 std::string my_name;
139 162
140 // The name of the directory in the path where we found this 163 // The name of the directory in the path where we found this
141 // function. May be relative. 164 // function. May be relative.