GNU Octave  4.0.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Member Functions | Protected Attributes | Private Member Functions | List of all members
unwind_protect Class Referenceabstract

#include "unwind-prot.h"

Inheritance diagram for unwind_protect:
Inheritance graph
[legend]
Collaboration diagram for unwind_protect:
Collaboration graph
[legend]

Public Member Functions

 unwind_protect (void)
 
 ~unwind_protect (void)
 
virtual void add (elem *new_elem)
 
void add (void(*fcn)(void *), void *ptr=0) GCC_ATTR_DEPRECATED
 
virtual void add (elem *new_elem)=0
 
template<class T >
void add_delete (T *obj)
 
void add_fcn (void(*fcn)(void))
 
template<class T >
void add_fcn (void(*action)(T), T val)
 
template<class T >
void add_fcn (void(*action)(const T &), const T &val)
 
template<class T >
void add_method (T *obj, void(T::*method)(void))
 
template<class T , class A >
void add_method (T *obj, void(T::*method)(A), A arg)
 
template<class T , class A >
void add_method (T *obj, void(T::*method)(const A &), const A &arg)
 
void discard (size_t num)
 
void discard (void)
 
void discard_first (void)
 
void discard_top (void) GCC_ATTR_DEPRECATED
 
void discard_top (int num) GCC_ATTR_DEPRECATED
 
bool empty (void) const
 
 operator bool (void) const
 
template<class T >
void protect_var (T &var)
 
template<class T >
void protect_var (T &var, const T &val)
 
void run (size_t num)
 
void run (void)
 
void run_first (void)
 
void run_top (void) GCC_ATTR_DEPRECATED
 
void run_top (int num) GCC_ATTR_DEPRECATED
 
size_t size (void) const
 

Protected Attributes

std::stack< elem * > lifo
 

Private Member Functions

 unwind_protect (const unwind_protect &)
 
unwind_protectoperator= (const unwind_protect &)
 

Detailed Description

Definition at line 34 of file unwind-prot.h.

Constructor & Destructor Documentation

unwind_protect::unwind_protect ( void  )
inline

Definition at line 40 of file unwind-prot.h.

unwind_protect::~unwind_protect ( void  )
inline

Definition at line 46 of file unwind-prot.h.

unwind_protect::unwind_protect ( const unwind_protect )
private

Member Function Documentation

virtual void unwind_protect::add ( elem new_elem)
inlinevirtual

Definition at line 48 of file unwind-prot.h.

void unwind_protect::add ( void(*)(void *)  fcn,
void *  ptr = 0 
)
inline

Definition at line 53 of file unwind-prot.h.

virtual void action_container::add ( elem new_elem)
pure virtualinherited
template<class T >
void action_container::add_delete ( T *  obj)
inlineinherited

Definition at line 281 of file action-container.h.

Referenced by get_data_and_bytesize(), and run_command_and_return_output().

void action_container::add_fcn ( void(*)(void)  fcn)
inlineinherited
template<class T >
void action_container::add_fcn ( void(*)(T)  action,
val 
)
inlineinherited

Definition at line 245 of file action-container.h.

template<class T >
void action_container::add_fcn ( void(*)(const T &)  action,
const T &  val 
)
inlineinherited

Definition at line 252 of file action-container.h.

template<class T >
void action_container::add_method ( T *  obj,
void(T::*)(void)  method 
)
inlineinherited
template<class T , class A >
void action_container::add_method ( T *  obj,
void(T::*)(A method,
A  arg 
)
inlineinherited

Definition at line 266 of file action-container.h.

template<class T , class A >
void action_container::add_method ( T *  obj,
void(T::*)(const A &)  method,
const A arg 
)
inlineinherited

Definition at line 273 of file action-container.h.

void action_container::discard ( size_t  num)
inlineinherited
void action_container::discard ( void  )
inlineinherited

Definition at line 326 of file action-container.h.

References action_container::discard(), and size().

Referenced by action_container::discard().

void unwind_protect::discard_first ( void  )
inlinevirtual

Implements action_container.

Definition at line 77 of file unwind-prot.h.

References elem.

Referenced by octave_oncleanup::~octave_oncleanup().

void unwind_protect::discard_top ( void  )
inline

Definition at line 75 of file unwind-prot.h.

void unwind_protect::discard_top ( int  num)
inline

Definition at line 87 of file unwind-prot.h.

bool action_container::empty ( void  ) const
inlineinherited
unwind_protect::operator bool ( void  ) const
inline

Definition at line 58 of file unwind-prot.h.

unwind_protect& unwind_protect::operator= ( const unwind_protect )
private
template<class T >
void action_container::protect_var ( T &  var)
inlineinherited

Definition at line 288 of file action-container.h.

Referenced by call_mex(), tree_argument_list::convert_to_const_vector(), do_edit_history(), do_keyboard(), octave_dynamic_loader::do_load_mex(), octave_dynamic_loader::do_load_oct(), octave_builtin::do_multi_index_op(), octave_user_script::do_multi_index_op(), octave_user_function::do_multi_index_op(), do_run_history(), load_path::do_set(), tree_evaluator::do_unwind_protect_cleanup_code(), error_2(), callback_property::execute(), execute_command_line_file(), execute_eval_option_code(), Farrayfun(), Fcellfun(), Fdaspk(), Fdasrt(), Fdassl(), Fdrawnow(), Feval(), Fevalin(), octave_base_parser::finish_array_list(), octave_base_parser::finish_colon_expression(), Fisindex(), Flasterr(), Flasterror(), Flsode(), flush_octave_stdout(), Fquad(), Frats(), Fsparse(), G__eigs__(), generate_struct_completions(), get_debug_input(), interpreter_try(), looks_like_struct(), maybe_missing_function_hook(), parse_fcn_file(), octave_struct::print_raw(), octave_scalar_struct::print_raw(), base_graphics_object::remove_all_listeners(), source_file(), octave_class::subsasgn_common(), axes::properties::update_aspectratios(), axes::properties::update_axes_layout(), axes::update_axis_limits(), hggroup::update_axis_limits(), patch::properties::update_data(), patch::properties::update_fvc(), axes::properties::update_title_position(), axes::properties::update_xlabel_position(), axes::properties::update_ylabel_position(), axes::properties::update_zlabel_position(), jit_convert::visit(), tree_evaluator::visit_complex_for_command(), tree_evaluator::visit_do_until_command(), jit_convert::visit_do_until_command(), tree_evaluator::visit_simple_for_command(), jit_convert::visit_simple_for_command(), tree_evaluator::visit_try_catch_command(), tree_evaluator::visit_while_command(), jit_convert::visit_while_command(), warning_1(), and octave_oncleanup::~octave_oncleanup().

template<class T >
void action_container::protect_var ( T &  var,
const T &  val 
)
inlineinherited

Definition at line 295 of file action-container.h.

void action_container::run ( size_t  num)
inlineinherited
void action_container::run ( void  )
inlineinherited

Definition at line 313 of file action-container.h.

References action_container::run(), and size().

Referenced by action_container::run(), and event_queue::~event_queue().

void unwind_protect::run_first ( void  )
inlinevirtual

Implements action_container.

Definition at line 62 of file unwind-prot.h.

Referenced by load_path::do_set(), and event_queue_safe::~event_queue_safe().

void unwind_protect::run_top ( void  )
inline

Definition at line 60 of file unwind-prot.h.

void unwind_protect::run_top ( int  num)
inline

Definition at line 73 of file unwind-prot.h.

size_t unwind_protect::size ( void  ) const
inlinevirtual

Implements action_container.

Definition at line 89 of file unwind-prot.h.

Member Data Documentation

std::stack<elem *> unwind_protect::lifo
protected

Definition at line 93 of file unwind-prot.h.


The documentation for this class was generated from the following file: