Defines | Functions

variables.h File Reference

#include <climits>
#include <cfloat>
#include <string>
#include "ov.h"
#include "ov-builtin.h"
#include "symtab.h"
Include dependency graph for variables.h:

Go to the source code of this file.

Defines

#define SET_INTERNAL_VARIABLE(NM)   set_internal_variable (V ## NM, args, nargout, #NM)
#define SET_INTERNAL_VARIABLE_CHOICES(NM, CHOICES)   set_internal_variable (V ## NM, args, nargout, #NM, CHOICES)
#define SET_INTERNAL_VARIABLE_WITH_LIMITS(NM, MINVAL, MAXVAL)   set_internal_variable (V ## NM, args, nargout, #NM, MINVAL, MAXVAL)
#define SET_NONEMPTY_INTERNAL_STRING_VARIABLE(NM)   set_internal_variable (V ## NM, args, nargout, #NM, false)

Functions

OCTINTERP_API void bind_ans (const octave_value &val, bool print)
OCTINTERP_API void bind_internal_variable (const std::string &fname, const octave_value &val)
OCTINTERP_API octave_value builtin_any_variable (const std::string &)
OCTINTERP_API int builtin_real_scalar_variable (const std::string &, double &)
OCTINTERP_API std::string builtin_string_variable (const std::string &)
OCTINTERP_API void clear_function (const std::string &nm)
OCTINTERP_API void clear_mex_functions (void)
OCTINTERP_API void clear_symbol (const std::string &nm)
OCTINTERP_API void clear_variable (const std::string &nm)
OCTINTERP_API octave_functionextract_function (const octave_value &arg, const std::string &warn_for, const std::string &fname, const std::string &header, const std::string &trailer)
OCTINTERP_API string_vector generate_struct_completions (const std::string &text, std::string &prefix, std::string &hint)
OCTINTERP_API octave_value get_global_value (const std::string &nm, bool silent=false)
OCTINTERP_API string_vector get_struct_elts (const std::string &text)
OCTINTERP_API octave_value get_top_level_value (const std::string &nm, bool silent=false)
OCTINTERP_API octave_functionis_valid_function (const octave_value &, const std::string &=std::string(), bool warn=false)
OCTINTERP_API octave_functionis_valid_function (const std::string &, const std::string &=std::string(), bool warn=false)
OCTINTERP_API bool looks_like_struct (const std::string &text)
OCTINTERP_API octave_value lookup_function_handle (const std::string &nm)
OCTINTERP_API void maybe_missing_function_hook (const std::string &name)
OCTINTERP_API bool mislocked (const std::string &)
OCTINTERP_API void mlock (void)
OCTINTERP_API void munlock (const std::string &)
OCTINTERP_API void set_global_value (const std::string &nm, const octave_value &val)
OCTINTERP_API octave_value set_internal_variable (int &var, const octave_value_list &args, int nargout, const char *nm, const char **choices)
OCTINTERP_API octave_value set_internal_variable (char &var, const octave_value_list &args, int nargout, const char *nm)
OCTINTERP_API octave_value set_internal_variable (double &var, const octave_value_list &args, int nargout, const char *nm, double minval=DBL_MIN, double maxval=DBL_MAX)
OCTINTERP_API octave_value set_internal_variable (int &var, const octave_value_list &args, int nargout, const char *nm, int minval=INT_MIN, int maxval=INT_MAX)
OCTINTERP_API octave_value set_internal_variable (std::string &var, const octave_value_list &args, int nargout, const char *nm, bool empty_ok=true)
OCTINTERP_API octave_value set_internal_variable (bool &var, const octave_value_list &args, int nargout, const char *nm)
OCTINTERP_API void set_top_level_value (const std::string &nm, const octave_value &val)
OCTINTERP_API int symbol_exist (const std::string &name, const std::string &type="any")
OCTINTERP_API std::string unique_symbol_name (const std::string &basename)

Define Documentation

#define SET_INTERNAL_VARIABLE (   NM  )     set_internal_variable (V ## NM, args, nargout, #NM)

Definition at line 115 of file variables.h.

Referenced by DEFUN().

#define SET_INTERNAL_VARIABLE_CHOICES (   NM,
  CHOICES 
)    set_internal_variable (V ## NM, args, nargout, #NM, CHOICES)

Definition at line 125 of file variables.h.

Referenced by DEFUN_DLD().

#define SET_INTERNAL_VARIABLE_WITH_LIMITS (   NM,
  MINVAL,
  MAXVAL 
)    set_internal_variable (V ## NM, args, nargout, #NM, MINVAL, MAXVAL)

Definition at line 121 of file variables.h.

Referenced by DEFUN().

#define SET_NONEMPTY_INTERNAL_STRING_VARIABLE (   NM  )     set_internal_variable (V ## NM, args, nargout, #NM, false)

Definition at line 118 of file variables.h.

Referenced by DEFUN().


Function Documentation

OCTINTERP_API void bind_ans ( const octave_value val,
bool  print 
)
OCTINTERP_API void bind_internal_variable ( const std::string &  fname,
const octave_value val 
)

Definition at line 1891 of file variables.cc.

References feval().

Referenced by maximum_braindamage(), and octave_main().

OCTINTERP_API octave_value builtin_any_variable ( const std::string &   ) 
OCTINTERP_API int builtin_real_scalar_variable ( const std::string &  ,
double  
)
OCTINTERP_API std::string builtin_string_variable ( const std::string &   ) 
OCTINTERP_API void clear_function ( const std::string &  nm  ) 

Definition at line 76 of file variables.cc.

References symbol_table::clear_function().

Referenced by symbol_table::clear_symbol(), and DEFUN_DLD().

OCTINTERP_API void clear_mex_functions ( void   ) 

Definition at line 70 of file variables.cc.

References symbol_table::clear_mex_functions().

Referenced by do_octave_atexit().

OCTINTERP_API void clear_symbol ( const std::string &  nm  ) 

Definition at line 88 of file variables.cc.

References symbol_table::clear_symbol().

OCTINTERP_API void clear_variable ( const std::string &  nm  ) 

Definition at line 82 of file variables.cc.

References symbol_table::clear_variable().

Referenced by symbol_table::clear(), and symbol_table::clear_symbol().

OCTINTERP_API 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 
)
OCTINTERP_API string_vector generate_struct_completions ( const std::string &  text,
std::string &  prefix,
std::string &  hint 
)
OCTINTERP_API octave_value get_global_value ( const std::string &  nm,
bool  silent = false 
)

Definition at line 605 of file variables.cc.

References error(), symbol_table::global_varval(), and octave_value::is_undefined().

Referenced by mexGetVariable().

OCTINTERP_API string_vector get_struct_elts ( const std::string &  text  ) 

Definition at line 191 of file variables.cc.

References Array< T >::length().

OCTINTERP_API octave_value get_top_level_value ( const std::string &  nm,
bool  silent = false 
)
OCTINTERP_API octave_function* is_valid_function ( const octave_value ,
const std::string &  = std::string(),
bool  warn = false 
)
OCTINTERP_API octave_function* is_valid_function ( const std::string &  ,
const std::string &  = std::string(),
bool  warn = false 
)
OCTINTERP_API bool looks_like_struct ( const std::string &  text  ) 
OCTINTERP_API octave_value lookup_function_handle ( const std::string &  nm  ) 
OCTINTERP_API void maybe_missing_function_hook ( const std::string &  name  ) 
OCTINTERP_API bool mislocked ( const std::string &   ) 
OCTINTERP_API void mlock ( void   ) 

Definition at line 1901 of file variables.cc.

References octave_call_stack::current(), error(), and octave_function::lock().

Referenced by DEFUN_DLD(), and mexLock().

OCTINTERP_API void munlock ( const std::string &   ) 
OCTINTERP_API void set_global_value ( const std::string &  nm,
const octave_value val 
)

Definition at line 616 of file variables.cc.

References symbol_table::global_varref().

Referenced by mexPutVariable().

OCTINTERP_API octave_value set_internal_variable ( int var,
const octave_value_list args,
int  nargout,
const char nm,
const char **  choices 
)
OCTINTERP_API octave_value set_internal_variable ( char var,
const octave_value_list args,
int  nargout,
const char nm 
)
OCTINTERP_API octave_value set_internal_variable ( double var,
const octave_value_list args,
int  nargout,
const char nm,
double  minval = DBL_MIN,
double  maxval = DBL_MAX 
)
OCTINTERP_API octave_value set_internal_variable ( int var,
const octave_value_list args,
int  nargout,
const char nm,
int  minval = INT_MIN,
int  maxval = INT_MAX 
)
OCTINTERP_API octave_value set_internal_variable ( std::string &  var,
const octave_value_list args,
int  nargout,
const char nm,
bool  empty_ok = true 
)
OCTINTERP_API octave_value set_internal_variable ( bool var,
const octave_value_list args,
int  nargout,
const char nm 
)
OCTINTERP_API void set_top_level_value ( const std::string &  nm,
const octave_value val 
)

Definition at line 633 of file variables.cc.

References symbol_table::top_level_varref().

OCTINTERP_API int symbol_exist ( const std::string &  name,
const std::string &  type = "any" 
)
OCTINTERP_API std::string unique_symbol_name ( const std::string &  basename  ) 

Definition at line 497 of file variables.cc.

References GET_IDX, and symbol_exist().

Referenced by DEFUN_DLD().

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines