Mercurial > hg > octave-lyh
comparison libinterp/interpfcn/hook-fcn.h @ 16385:a1690c3e93eb
move hook_function constructor to .cc file
* hook-fcn.cc: New file. Move hook_function::hook_function definition
here from hook-fcn.h.
* libinterp/interpfcn/module.mk (INTERPFCN_SRC): Include hook-fcn.cc
in the list.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 28 Mar 2013 02:52:18 -0400 |
parents | a8d9ee3766db |
children |
comparison
equal
deleted
inserted
replaced
16384:a8d9ee3766db | 16385:a1690c3e93eb |
---|---|
183 octave_value fcn_handle; | 183 octave_value fcn_handle; |
184 | 184 |
185 octave_value data; | 185 octave_value data; |
186 }; | 186 }; |
187 | 187 |
188 hook_function::hook_function (const octave_value& f, const octave_value& d) | |
189 { | |
190 if (f.is_string ()) | |
191 { | |
192 std::string name = f.string_value (); | |
193 | |
194 rep = new named_hook_function (name, d); | |
195 } | |
196 else if (f.is_function_handle ()) | |
197 { | |
198 rep = new fcn_handle_hook_function (f, d); | |
199 } | |
200 else | |
201 error ("invalid hook function"); | |
202 } | |
203 | |
204 class | 188 class |
205 hook_function_list | 189 hook_function_list |
206 { | 190 { |
207 public: | 191 public: |
208 | 192 |