Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifdef HAVE_CONFIG_H
00024 #include <config.h>
00025 #endif
00026
00027 #include "oct-shlib.h"
00028
00029 #include <defaults.h>
00030 #include "dynamic-ld.h"
00031 #include "error.h"
00032 #include "oct-obj.h"
00033 #include "ov-dld-fcn.h"
00034 #include "ov.h"
00035
00036 DEFINE_OCTAVE_ALLOCATOR (octave_dld_function);
00037
00038 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_dld_function,
00039 "dynamically-linked function",
00040 "dynamically-linked function");
00041
00042
00043 octave_dld_function::octave_dld_function
00044 (octave_builtin::fcn ff, const octave_shlib& shl,
00045 const std::string& nm, const std::string& ds)
00046 : octave_builtin (ff, nm, ds), sh_lib (shl)
00047 {
00048 mark_fcn_file_up_to_date (time_parsed ());
00049
00050 std::string file_name = fcn_file_name ();
00051
00052 system_fcn_file
00053 = (! file_name.empty ()
00054 && Voct_file_dir == file_name.substr (0, Voct_file_dir.length ()));
00055 }
00056
00057 octave_dld_function::~octave_dld_function (void)
00058 {
00059 octave_dynamic_loader::remove_oct (my_name, sh_lib);
00060 }
00061
00062 std::string
00063 octave_dld_function::fcn_file_name (void) const
00064 {
00065 return sh_lib.file_name ();
00066 }
00067
00068 octave_time
00069 octave_dld_function::time_parsed (void) const
00070 {
00071 return sh_lib.time_loaded ();
00072 }
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085 octave_dld_function*
00086 octave_dld_function::create (octave_builtin::fcn ff, const octave_shlib& shl,
00087 const std::string& nm, const std::string& ds)
00088 {
00089 return new octave_dld_function (ff, shl, nm, ds);
00090 }