#include <cstdio>
#include <cstring>
#include <iomanip>
#include <set>
#include <string>
#include "file-stat.h"
#include "oct-env.h"
#include "file-ops.h"
#include "glob-match.h"
#include "lo-regexp.h"
#include "str-vec.h"
#include "call-stack.h"
#include "defaults.h"
#include "Cell.h"
#include "defun.h"
#include "dirfns.h"
#include "error.h"
#include "errwarn.h"
#include "help.h"
#include "input.h"
#include "interpreter-private.h"
#include "interpreter.h"
#include "lex.h"
#include "load-path.h"
#include "octave-link.h"
#include "octave-preserve-stream-state.h"
#include "oct-map.h"
#include "ovl.h"
#include "ov.h"
#include "ov-class.h"
#include "ov-usr-fcn.h"
#include "pager.h"
#include "parse.h"
#include "symtab.h"
#include "unwind-prot.h"
#include "utils.h"
#include "variables.h"
Go to the source code of this file.
Classes | |
struct | symbol_info_list::symbol_info |
class | symbol_info_list |
Macros | |
#define | GET_IDX(LEN) static_cast<int> ((LEN-1) * static_cast<double> (rand ()) / RAND_MAX) |
Variables | |
OCTAVE_EXPORT octave_value_list or class The return code | ar {c} is one of able sis tem 1 ar{name} is a variable. tem 2 ar{name} is an absolute filename |
OCTAVE_EXPORT octave_value_list or class The return code an ordinary file in Octave s | code {path} |
OCTAVE_EXPORT octave_value_list | directory |
OCTAVE_EXPORT octave_value_list only variables visible in the local scope are displayed The following are valid but may not be combined able ode tem global List variables in the global scope rather than the current scope tem regexp The patterns are considered to be regular expressions when matching the variables to display The same pattern syntax accepted by the return a cell array of defined names matching the given patterns | eealso |
OCTAVE_EXPORT octave_value_list | file |
tem check only for symbols of the specified type Valid types are table asis item and there are multiple possible matches for built in | function |
tem check only for symbols of the specified type Valid types are table asis item and there are multiple possible matches for | name |
OCTAVE_EXPORT octave_value_list only variables visible in the local scope are displayed The following are valid but may not be combined able ode tem global List variables in the global scope rather than the current scope tem regexp The patterns are considered to be regular expressions when matching the variables to display The same pattern syntax accepted by the | ode {regexp} function is used. tem -file The next argument is treated as a filename. All variables found within the specified file are listed. No patterns are accepted when reading variables from a file. nd table If called as a function |
OCTAVE_EXPORT octave_value_list only variables visible in the local scope are displayed The following are valid | options |
tem check only for symbols of the specified type Valid types are table asis item and there are multiple possible matches for built in oct class calling Octave trusts oct mex files instead of | ospell |
tem check only for symbols of the specified type Valid types are table asis item | qcode {"var"} Check only for variables. @item @qcode{"builtin"} Check only for built-in functions. @item @qcode{"dir"} Check only for directories. @item @qcode{"file"} Check only for files and directories. @item @qcode{"class"} Check only for classes. (Note: This option is accepted, but not currently implemented) @end table If no type is given |
static std::string | Vmissing_component_hook |
static std::string | Vwhos_line_format = " %a:4; %ln:6; %cs:16:6:1; %rb:12; %lc:-1;\n" |
#define GET_IDX | ( | LEN | ) | static_cast<int> ((LEN-1) * static_cast<double> (rand ()) / RAND_MAX) |
Definition at line 494 of file variables.cc.
Referenced by unique_symbol_name().
|
static |
Definition at line 323 of file variables.cc.
References octave::symbol_table::current_scope(), error(), octave::symbol_scope::is_global(), octave_value_list::length(), name, print_usage(), and string.
Referenced by Fisglobal().
|
static |
Definition at line 1632 of file variables.cc.
References octave::action_container::add_method(), symbol_info_list::append(), argc, argv, octave::call_stack::caller(), octave::context, cs, octave::symbol_scope::current_context(), octave::symbol_table::current_scope(), symbol_info_list::display(), symbol_info_list::empty(), error(), octave::eval_string(), octave::feval(), octave::symbol_table::find_symbol(), frame, octave::interpreter::get_call_stack(), octave::interpreter::get_symbol_table(), octave::symbol_table::glob_global_variables(), octave::symbol_table::glob_variables(), i, octave::symbol_record::is_global(), octave::symbol_scope::is_variable(), string_vector::list_in_columns(), symbol_info_list::map_value(), octave_function::name(), nm, octave_stdout, octave::call_stack::pop(), octave::call_stack::push(), octave::symbol_table::regexp_global_variables(), octave::symbol_table::regexp_variables(), string_vector::resize(), retval, octave::symbol_table::set_scope(), string, tmp, verbose, and warning().
octave_function* extract_function | ( | const octave_value & | arg, |
const std::string & | warn_for, | ||
const std::string & | fname, | ||
const std::string & | header, | ||
const std::string & | trailer | ||
) |
Definition at line 125 of file variables.cc.
References arg, error(), octave::eval_string(), fname, is_valid_function(), retval, s, string, warning(), and octave_value::xstring_value().
Referenced by Fdaspk(), Fdasrt(), Fdassl(), Flsode(), Fquad(), and G__eigs__().
OCTAVE_EXPORT octave_value_list F__varval__ | ( | octave::interpreter & | interp, |
const octave_value_list & | args, | ||
int | |||
) |
Definition at line 2246 of file variables.cc.
OCTAVE_EXPORT octave_value_list Fexist | ( | octave::interpreter & | interp, |
const octave_value_list & | args, | ||
int | |||
) |
OCTAVE_EXPORT octave_value_list Fisglobal | ( | octave::interpreter & | interp, |
const octave_value_list & | args, | ||
int | |||
) |
Definition at line 353 of file variables.cc.
References do_isglobal().
OCTAVE_EXPORT octave_value_list Fmissing_component_hook | ( | const octave_value_list & | args, |
int | nargout | ||
) |
OCTAVE_EXPORT octave_value_list Fmissing_function_hook | ( | const octave_value_list & | args, |
int | nargout | ||
) |
Definition at line 2210 of file variables.cc.
OCTAVE_EXPORT octave_value_list Fwho | ( | octave::interpreter & | interp, |
const octave_value_list & | args, | ||
int | nargout | ||
) |
string_vector generate_struct_completions | ( | const std::string & | text, |
std::string & | prefix, | ||
std::string & | hint | ||
) |
Definition at line 218 of file variables.cc.
References octave::__get_symbol_table__(), array(), discard_error_messages, discard_warning_messages, octave::eval_string(), find_indexed_expression(), frame, is_variable(), octave::action_container::protect_var(), octave::interpreter::recover_from_exception(), octave::action_container::run(), string, and tmp.
Referenced by generate_possible_completions().
std::string get_dims_str | ( | const octave_value & | val | ) |
Definition at line 1114 of file variables.cc.
References dim_vector::alloc(), dv, i, dim_vector::ndims(), dim_vector::str(), sz, tmp, and val.
Referenced by symbol_info_list::symbol_info::display_line(), and symbol_info_list::parse_whos_line_format().
string_vector get_struct_elts | ( | const std::string & | text | ) |
Definition at line 164 of file variables.cc.
octave_function* is_valid_function | ( | const std::string & | fcn_name, |
const std::string & | warn_for, | ||
bool | warn | ||
) |
Definition at line 78 of file variables.cc.
References octave::__get_symbol_table__(), error(), octave::symbol_table::find_function(), and val.
Referenced by extract_function(), named_hook_function::is_valid(), and is_valid_function().
octave_function* is_valid_function | ( | const octave_value & | arg, |
const std::string & | warn_for, | ||
bool | warn | ||
) |
Definition at line 103 of file variables.cc.
References arg, error(), octave_value::is_string(), is_valid_function(), string, and octave_value::string_value().
|
inlinestatic |
Definition at line 201 of file variables.cc.
References octave::symbol_table::current_scope(), name, octave_value(), retval, val, and octave::symbol_scope::varval().
Referenced by octave::final_index_error(), and generate_struct_completions().
bool looks_like_struct | ( | const std::string & | text, |
char | prev_char | ||
) |
Definition at line 290 of file variables.cc.
References octave::sys::file_ops::dir_sep_chars(), discard_error_messages, octave::eval_string(), frame, octave::action_container::protect_var(), retval, octave::action_container::run(), and tmp.
Referenced by generate_completion(), and generate_possible_completions().
nd deftypefn* void maybe_missing_function_hook | ( | const std::string & | name | ) |
Definition at line 2216 of file variables.cc.
References argc, argv, octave::symbol_scope::clear_variable_pattern(), and octave::symbol_scope::clear_variable_regexp().
Referenced by octave::tree_identifier::eval_undefined_error().
OCTAVE_EXPORT octave_value_list or class The return code an ordinary file in Octave s or | ( | after appending @samp{.m} | ) |
Definition at line 593 of file variables.cc.
Referenced by DQAGIE(), install_class_ops(), and qagie().
|
static |
Definition at line 1013 of file variables.cc.
References a, b, i, left, Array< T >::length(), os, param, and right.
Referenced by symbol_info_list::display().
|
static |
Definition at line 371 of file variables.cc.
References error(), file_in_path(), octave::load_path::find_fcn(), fs, octave::interpreter::get_load_path(), octave::interpreter::get_symbol_table(), octave::sys::base_file_stat::is_dir(), octave::is_keyword(), octave::lookup_autoload(), name, octave_value(), string, type, val, and octave::symbol_scope::varval().
Referenced by octave::variable_editor_model::retrieve_variable(), symbol_exist(), and unique_symbol_name().
int symbol_exist | ( | const std::string & | name, |
const std::string & | type | ||
) |
Definition at line 486 of file variables.cc.
References octave::__get_interpreter__(), name, symbol_exist(), and type.
std::string unique_symbol_name | ( | const std::string & | basename | ) |
Definition at line 498 of file variables.cc.
References octave::__get_interpreter__(), octave_value_list::append(), basename(), GET_IDX, octave_value_list::length(), nm, string, and symbol_exist().
Referenced by Fdaspk(), Fdasrt(), Fdassl(), Flsode(), Fquad(), and G__eigs__().
tem check only for symbols of the specified type Valid types are table asis item and there are multiple possible matches for built in oct class calling ar {c} is one of able sis tem 1 ar{name} is a variable. tem 2 ar{name} is an absolute filename |
Definition at line 593 of file variables.cc.
OCTAVE_EXPORT octave_value_list to provide a hint to users for how to install the missing components When called from inside a function with the code {path} |
Definition at line 593 of file variables.cc.
tem check only for symbols of the specified type Valid types are table asis item and there are multiple possible matches for built in oct directory |
Definition at line 593 of file variables.cc.
Referenced by octave::FileDialog::acceptSelection(), octave::main_window::change_directory_callback(), cdef_class::cdef_class_rep::get_directory(), octave::base_url_transfer::mget_directory(), octave::url_transfer::mget_directory(), octave::base_url_transfer::mput_directory(), octave::url_transfer::mput_directory(), and cdef_class::cdef_class_rep::set_directory().
OCTAVE_EXPORT octave_value_list only variables visible in the local scope are displayed The following are valid but may not be combined able ode tem global List variables in the global scope rather than the current scope tem regexp The patterns are considered to be regular expressions when matching the variables to display The same pattern syntax accepted by the return a cell array of defined names matching the given patterns eealso |
Definition at line 1862 of file variables.cc.
tem check only for symbols of the specified type Valid types are table asis item and there are multiple possible matches for built in oct file |
Definition at line 593 of file variables.cc.
tem check only for symbols of the specified type Valid types are table asis item and there are multiple possible matches for built in function |
Definition at line 593 of file variables.cc.
tem check only for symbols of the specified type Valid types are table asis item and there are multiple possible matches for name |
Definition at line 593 of file variables.cc.
Referenced by symbol_info_list::symbol_info::display_line(), do_isglobal(), is_variable(), and symbol_exist().
OCTAVE_EXPORT octave_value_list only variables visible in the local scope are displayed The following are valid but may not be combined able ode tem global List variables in the global scope rather than the current scope tem regexp The patterns are considered to be regular expressions when matching the variables to display The same pattern syntax accepted by the ode {regexp} function is used. tem -file The next argument is treated as a filename. All variables found within the specified file are listed. No patterns are accepted when reading variables from a file. nd table If called as a function |
Definition at line 1862 of file variables.cc.
OCTAVE_EXPORT octave_value_list only variables visible in the local scope are displayed The following are valid options |
Definition at line 1862 of file variables.cc.
Referenced by octave::regexp::compile(), octave::base_stream::do_textscan(), F__magick_read__(), G__delaunayn__(), G__ode15__(), G__voronoi__(), Gconvhulln(), image_region::image_region(), octave_waitpid_wrapper(), octregexp(), parse_options(), read_images(), read_indexed_images(), octave::textscan::scan(), octave::stream::textscan(), and octave::sys::waitpid().
tem check only for symbols of the specified type Valid types are table asis item and there are multiple possible matches for built in oct class calling Octave trusts oct mex files instead of ospell |
Definition at line 593 of file variables.cc.
tem check only for symbols of the specified type Valid types are table asis item qcode {"var"} Check only for variables. @item @qcode{"builtin"} Check only for built-in functions. @item @qcode{"dir"} Check only for directories. @item @qcode{"file"} Check only for files and directories. @item @qcode{"class"} Check only for classes. (Note: This option is accepted, but not currently implemented) @end table If no type is given |
Definition at line 593 of file variables.cc.
|
static |
Definition at line 2258 of file variables.cc.
|
static |
Definition at line 71 of file variables.cc.
Referenced by symbol_info_list::parse_whos_line_format().