GNU Octave  4.4.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
variables.h File Reference
#include "octave-config.h"
#include <limits>
#include <string>
#include "lo-ieee.h"
#include "ov-builtin.h"
Include dependency graph for variables.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 octave
 

Macros

#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 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 &="", bool warn=false)
 
OCTINTERP_API octave_functionis_valid_function (const std::string &, const std::string &="", bool warn=false)
 
OCTINTERP_API bool looks_like_struct (const std::string &text, char prev_char)
 
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 (bool &var, const octave_value_list &args, int nargout, const char *nm)
 
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 (int &var, const octave_value_list &args, int nargout, const char *nm, int minval=std::numeric_limits< int >::min(), int maxval=std::numeric_limits< int >::max())
 
OCTINTERP_API octave_value set_internal_variable (double &var, const octave_value_list &args, int nargout, const char *nm, double minval=-octave::numeric_limits< double >::Inf(), double maxval=octave::numeric_limits< double >::Inf())
 
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 (std::string &var, const octave_value_list &args, int nargout, const char *nm, const char **choices)
 
OCTINTERP_API octave_value set_internal_variable (int &var, const octave_value_list &args, int nargout, const char *nm, const char **choices)
 
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)
 

Macro Definition Documentation

◆ SET_INTERNAL_VARIABLE

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

Definition at line 109 of file variables.h.

Referenced by Fjit_failcnt(), Foptimize_subsasgn_calls(), and Fsparse_auto_mutate().

◆ SET_INTERNAL_VARIABLE_CHOICES

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

Definition at line 119 of file variables.h.

Referenced by norm().

◆ SET_INTERNAL_VARIABLE_WITH_LIMITS

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

Definition at line 115 of file variables.h.

◆ SET_NONEMPTY_INTERNAL_STRING_VARIABLE

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

Definition at line 112 of file variables.h.

Function Documentation

◆ bind_ans()

OCTINTERP_API void bind_ans ( const octave_value val,
bool  print 
)

◆ clear_function()

OCTINTERP_API void clear_function ( const std::string nm)

◆ clear_mex_functions()

OCTINTERP_API void clear_mex_functions ( void  )

◆ clear_symbol()

OCTINTERP_API void clear_symbol ( const std::string nm)

◆ clear_variable()

OCTINTERP_API void clear_variable ( const std::string nm)

◆ extract_function()

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 
)

◆ generate_struct_completions()

◆ get_global_value()

OCTINTERP_API octave_value get_global_value ( const std::string nm,
bool  silent = false 
)

◆ get_struct_elts()

OCTINTERP_API string_vector get_struct_elts ( const std::string text)

Definition at line 164 of file variables.cc.

References i, and retval.

◆ get_top_level_value()

OCTINTERP_API octave_value get_top_level_value ( const std::string nm,
bool  silent = false 
)

◆ is_valid_function() [1/2]

OCTINTERP_API octave_function* is_valid_function ( const octave_value ,
const std::string = "",
bool  warn = false 
)

◆ is_valid_function() [2/2]

OCTINTERP_API octave_function* is_valid_function ( const std::string ,
const std::string = "",
bool  warn = false 
)

◆ looks_like_struct()

◆ lookup_function_handle()

OCTINTERP_API octave_value lookup_function_handle ( const std::string nm)

◆ maybe_missing_function_hook()

OCTINTERP_API void maybe_missing_function_hook ( const std::string name)

◆ mislocked()

OCTINTERP_API bool mislocked ( const std::string )

◆ mlock()

OCTINTERP_API void mlock ( void  )

◆ munlock()

OCTINTERP_API void munlock ( const std::string )

◆ set_global_value()

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

◆ set_internal_variable() [1/7]

OCTINTERP_API octave_value set_internal_variable ( bool var,
const octave_value_list args,
int  nargout,
const char *  nm 
)

◆ set_internal_variable() [2/7]

OCTINTERP_API octave_value set_internal_variable ( char &  var,
const octave_value_list args,
int  nargout,
const char *  nm 
)

◆ set_internal_variable() [3/7]

OCTINTERP_API octave_value set_internal_variable ( int &  var,
const octave_value_list args,
int  nargout,
const char *  nm,
int  minval = std::numeric_limits< int >::min(),
int  maxval = std::numeric_limits< int >::max() 
)

◆ set_internal_variable() [4/7]

OCTINTERP_API octave_value set_internal_variable ( double var,
const octave_value_list args,
int  nargout,
const char *  nm,
double  minval = -octave::numeric_limits< double >::Inf(),
double  maxval = octave::numeric_limits< double >::Inf() 
)

◆ set_internal_variable() [5/7]

OCTINTERP_API octave_value set_internal_variable ( std::string var,
const octave_value_list args,
int  nargout,
const char *  nm,
bool  empty_ok = true 
)

◆ set_internal_variable() [6/7]

OCTINTERP_API octave_value set_internal_variable ( std::string var,
const octave_value_list args,
int  nargout,
const char *  nm,
const char **  choices 
)

◆ set_internal_variable() [7/7]

OCTINTERP_API octave_value set_internal_variable ( int &  var,
const octave_value_list args,
int  nargout,
const char *  nm,
const char **  choices 
)

◆ set_top_level_value()

OCTINTERP_API void set_top_level_value ( const std::string nm,
const octave_value val 
)

◆ symbol_exist()

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

Definition at line 486 of file variables.cc.

References octave::__get_interpreter__(), name, symbol_exist(), and type.

◆ unique_symbol_name()

OCTINTERP_API std::string unique_symbol_name ( const std::string basename)