Mercurial > octave-nkf
diff libinterp/octave-value/ov-usr-fcn.h @ 17856:97e49b588f5d classdef
maint: periodic merge of default to classdef
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 05 Nov 2013 12:27:42 -0500 |
parents | 93b3d03b05e7 ebb3ef964372 |
children | 76478d2da117 |
line wrap: on
line diff
--- a/libinterp/octave-value/ov-usr-fcn.h Wed Oct 23 22:48:29 2013 -0400 +++ b/libinterp/octave-value/ov-usr-fcn.h Tue Nov 05 12:27:42 2013 -0500 @@ -20,8 +20,8 @@ */ -#if !defined (octave_user_function_h) -#define octave_user_function_h 1 +#if !defined (octave_ov_usr_fcn_h) +#define octave_ov_usr_fcn_h 1 #include <ctime> @@ -112,10 +112,10 @@ void mark_fcn_file_up_to_date (const octave_time& t) { t_checked = t; } void stash_fcn_file_time (const octave_time& t) - { - t_parsed = t; - mark_fcn_file_up_to_date (t); - } + { + t_parsed = t; + mark_fcn_file_up_to_date (t); + } std::string fcn_file_name (void) const { return file_name; } @@ -125,10 +125,10 @@ octave_value subsref (const std::string& type, const std::list<octave_value_list>& idx) - { - octave_value_list tmp = subsref (type, idx, 1); - return tmp.length () > 0 ? tmp(0) : octave_value (); - } + { + octave_value_list tmp = subsref (type, idx, 1); + return tmp.length () > 0 ? tmp(0) : octave_value (); + } octave_value_list subsref (const std::string& type, const std::list<octave_value_list>& idx, @@ -187,7 +187,7 @@ symbol_table::context_id active_context () const { return is_anonymous_function () - ? 0 : static_cast<symbol_table::context_id>(call_depth); + ? 0 : static_cast<symbol_table::context_id>(call_depth); } octave_function *function_value (bool = false) { return this; } @@ -203,19 +203,19 @@ void stash_fcn_file_name (const std::string& nm); void stash_fcn_location (int line, int col) - { - location_line = line; - location_column = col; - } + { + location_line = line; + location_column = col; + } int beginning_line (void) const { return location_line; } int beginning_column (void) const { return location_column; } void stash_fcn_end_location (int line, int col) - { - end_location_line = line; - end_location_column = col; - } + { + end_location_line = line; + end_location_column = col; + } int ending_line (void) const { return end_location_line; } int ending_column (void) const { return end_location_column; } @@ -233,10 +233,10 @@ void mark_fcn_file_up_to_date (const octave_time& t) { t_checked = t; } void stash_fcn_file_time (const octave_time& t) - { - t_parsed = t; - mark_fcn_file_up_to_date (t); - } + { + t_parsed = t; + mark_fcn_file_up_to_date (t); + } std::string fcn_file_name (void) const { return file_name; } @@ -259,20 +259,20 @@ bool is_user_function (void) const { return true; } void erase_subfunctions (void) - { - symbol_table::erase_subfunctions_in_scope (local_scope); - } + { + symbol_table::erase_subfunctions_in_scope (local_scope); + } bool takes_varargs (void) const; bool takes_var_return (void) const; void mark_as_private_function (const std::string& cname = std::string ()) - { - symbol_table::mark_subfunctions_in_scope_as_private (local_scope, cname); + { + symbol_table::mark_subfunctions_in_scope_as_private (local_scope, cname); - octave_function::mark_as_private_function (cname); - } + octave_function::mark_as_private_function (cname); + } void lock_subfunctions (void); @@ -306,13 +306,13 @@ bool is_anonymous_function (void) const { return anonymous_function; } bool is_anonymous_function_of_class - (const std::string& cname = std::string ()) const + (const std::string& cname = std::string ()) const { return anonymous_function - ? (cname.empty () - ? (! dispatch_class ().empty ()) - : cname == dispatch_class ()) - : false; + ? (cname.empty () + ? (! dispatch_class ().empty ()) + : cname == dispatch_class ()) + : false; } // If we are a special expression, then the function body consists of exactly @@ -332,31 +332,31 @@ void mark_as_classdef_constructor (void) { class_constructor = classdef; } bool is_class_constructor (const std::string& cname = std::string ()) const - { - return class_constructor == legacy - ? (cname.empty () ? true : cname == dispatch_class ()) : false; - } + { + return class_constructor == legacy + ? (cname.empty () ? true : cname == dispatch_class ()) : false; + } bool is_classdef_constructor (const std::string& cname = std::string ()) const - { - return class_constructor == classdef - ? (cname.empty () ? true : cname == dispatch_class ()) : false; - } + { + return class_constructor == classdef + ? (cname.empty () ? true : cname == dispatch_class ()) : false; + } void mark_as_class_method (void) { class_method = true; } bool is_class_method (const std::string& cname = std::string ()) const - { - return class_method - ? (cname.empty () ? true : cname == dispatch_class ()) : false; - } + { + return class_method + ? (cname.empty () ? true : cname == dispatch_class ()) : false; + } octave_value subsref (const std::string& type, const std::list<octave_value_list>& idx) - { - octave_value_list tmp = subsref (type, idx, 1); - return tmp.length () > 0 ? tmp(0) : octave_value (); - } + { + octave_value_list tmp = subsref (type, idx, 1); + return tmp.length () > 0 ? tmp(0) : octave_value (); + } octave_value_list subsref (const std::string& type, const std::list<octave_value_list>& idx, @@ -364,7 +364,8 @@ octave_value_list subsref (const std::string& type, const std::list<octave_value_list>& idx, - int nargout, const std::list<octave_lvalue>* lvalue_list); + int nargout, + const std::list<octave_lvalue>* lvalue_list); octave_value_list do_multi_index_op (int nargout, const octave_value_list& args); @@ -393,15 +394,15 @@ template <class T> bool local_protect (T& variable) - { - if (curr_unwind_protect_frame) - { - curr_unwind_protect_frame->protect_var (variable); - return true; - } - else - return false; - } + { + if (curr_unwind_protect_frame) + { + curr_unwind_protect_frame->protect_var (variable); + return true; + } + else + return false; + } #ifdef HAVE_LLVM jit_function_info *get_info (void) { return jit_info; }