26 #if defined (HAVE_CONFIG_H)
58 const std::string& nm)
67 const std::string& nm)
69 function_map[nm] = fcn;
74 const std::string& nm)
76 package_map[nm] = pack;
81 template <
typename T1,
typename T2>
88 for (
auto it =
m.begin (); it !=
m.end (); ++it, ++i)
115 std::string symbol_name =
get_name () +
'.' + nm;
120 return interp.
find (symbol_name);
125 (
const std::string&
type,
const std::list<octave_value_list>& idx,
134 if (idx.front ().length () != 1)
135 error (
"invalid meta.package indexing");
137 std::string nm = idx.front ()(0).xstring_value (
"invalid meta.package indexing, expected a symbol name");
140 std::cerr <<
"meta.package query: " << nm << std::endl;
146 error (
"member '%s' in package '%s' does not exist",
169 if (
type.size () > 1 && idx.size () > 1)
173 else if (
type.size () > 1 && idx.size () > 1)
181 error (
"invalid meta.package indexing");
const cdef_package & meta(void) const
void unregister_package(const cdef_package &pkg)
Cell get_functions(void) const
void install_package(const cdef_package &pack, const std::string &nm)
Cell get_packages(void) const
octave_value find(const std::string &nm)
octave_value_list meta_subsref(const std::string &type, const std::list< octave_value_list > &idx, int nargout)
octave_idx_type member_count
void install_function(const octave_value &fcn, const std::string &nm)
Cell get_classes(void) const
std::map< std::string, cdef_class > class_map
void install_class(const cdef_class &cls, const std::string &nm)
octave_value find(const std::string &nm)
cdef_package_rep * get_rep(void)
std::string get_name(void) const
octave_value find(const std::string &name)
virtual bool accepts_postfix_index(char type) const
bool is_function(void) const
bool is_defined(void) const
octave_function * function_value(bool silent=false) const
octave_value next_subsref(const std::string &type, const std::list< octave_value_list > &idx, size_t skip=1)
void error(const char *fmt,...)
octave_value to_ov(const cdef_object &obj)
interpreter & __get_interpreter__(const std::string &who)
Cell map2Cell(const std::map< T1, T2 > &m)
octave_value_list feval(const char *name, const octave_value_list &args, int nargout)
Evaluate an Octave function (built-in or interpreted) and return the list of result values.
cdef_manager & __get_cdef_manager__(const std::string &who)
octave_value::octave_value(const Array< char > &chm, char type) return retval