24 #if ! defined (octave_unwind_prot_h)
25 #define octave_unwind_prot_h 1
27 #include "octave-config.h"
57 OCTAVE_DEPRECATED (
"use 'add (new fcn_arg_elem<void *> (fcn, ptr))' instead")
58 void add (
void (*
fcn) (
void *),
void *ptr = 0)
63 operator bool (
void)
const {
return !
empty (); }
65 OCTAVE_DEPRECATED (
"use 'run_first' instead")
66 void run_top (
void) { run_first (); }
73 std::unique_ptr<elem> ptr (lifo.top ());
79 OCTAVE_DEPRECATED (
"use 'run' instead")
80 void run_top (
int num) { run (num); }
82 OCTAVE_DEPRECATED (
"use 'discard_first' instead")
83 void discard_top (
void) { discard_first (); }
85 void discard_first (
void)
89 elem *ptr = lifo.top ();
95 OCTAVE_DEPRECATED (
"use 'discard' instead")
96 void discard_top (
int num) { discard (num); }
98 size_t size (
void)
const {
return lifo.size (); }
102 std::stack<elem *> lifo;
108 unwind_protect (
const unwind_protect&);
110 unwind_protect& operator = (
const unwind_protect&);
123 void warn_unhandled_exception (
void)
const;
139 warn_unhandled_exception ();
154 #if defined (OCTAVE_USE_DEPRECATED_FUNCTIONS)
156 OCTAVE_DEPRECATED (
"use 'octave::unwind_protect' instead")
157 typedef
octave::unwind_protect unwind_protect;
159 OCTAVE_DEPRECATED ("use '
octave::unwind_protect_safe' instead")
160 typedef
octave::unwind_protect_safe unwind_protect_safe;
Octave interface to the compression and uncompression libraries.
virtual void add(elem *new_elem)
create a structure array and initialize its values The dimensions of each cell array of values must match Singleton cells and non cell values are repeated so that they fill the entire array If the cells are empty
unwind_protect_safe(void)
~unwind_protect_safe(void)