GNU Octave  6.2.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
octave::unwind_protect_safe Class Reference

#include "unwind-prot.h"

Inheritance diagram for octave::unwind_protect_safe:
Collaboration diagram for octave::unwind_protect_safe:

Public Member Functions

 unwind_protect_safe (const unwind_protect_safe &)=delete
 
 unwind_protect_safe (void)
 
 ~unwind_protect_safe (void)
 
template<typename F , typename... Args>
void add (F &&fcn, Args &&... args)
 
template<typename T >
void add_delete (T *obj)
 
template<typename... Params, typename... Args>
void add_fcn (void(*fcn)(Params...), Args &&... args)
 
template<typename T , typename... Params, typename... Args>
void add_method (T &obj, void(T::*method)(Params...), Args &&... args)
 
template<typename T , typename... Params, typename... Args>
void add_method (T *obj, void(T::*method)(Params...), Args &&... args)
 
void discard (size_t num)
 
void discard (void)
 
void discard_first (void)
 
bool empty (void) const
 
 operator bool (void) const
 
unwind_protect_safeoperator= (const unwind_protect_safe &)=delete
 
template<typename T >
void protect_var (T &var)
 
template<typename T >
void protect_var (T &var, const T &val)
 
void run (size_t num)
 
void run (void)
 
void run_first (void)
 
size_t size (void) const
 

Protected Member Functions

virtual void add_action (elem *new_elem)
 

Protected Attributes

std::stack< elem * > m_lifo
 

Private Member Functions

void warn_unhandled_exception (void) const
 

Detailed Description

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

Constructor & Destructor Documentation

◆ unwind_protect_safe() [1/2]

octave::unwind_protect_safe::unwind_protect_safe ( void  )
inline

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

◆ unwind_protect_safe() [2/2]

octave::unwind_protect_safe::unwind_protect_safe ( const unwind_protect_safe )
delete

◆ ~unwind_protect_safe()

octave::unwind_protect_safe::~unwind_protect_safe ( void  )
inline

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

Member Function Documentation

◆ add()

template<typename F , typename... Args>
void octave::action_container::add ( F &&  fcn,
Args &&...  args 
)
inlineinherited

◆ add_action()

virtual void octave::unwind_protect::add_action ( elem new_elem)
inlineprotectedvirtualinherited

Implements octave::action_container.

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

◆ add_delete()

template<typename T >
void octave::action_container::add_delete ( T *  obj)
inlineinherited

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

Referenced by get_data_and_bytesize(), and run_command_and_return_output().

◆ add_fcn()

◆ add_method() [1/2]

template<typename T , typename... Params, typename... Args>
void octave::action_container::add_method ( T &  obj,
void(T::*)(Params...)  method,
Args &&...  args 
)
inlineinherited

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

◆ add_method() [2/2]

◆ discard() [1/2]

◆ discard() [2/2]

void octave::action_container::discard ( void  )
inlineinherited

◆ discard_first()

void octave::unwind_protect::discard_first ( void  )
inlinevirtualinherited

Implements octave::action_container.

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

◆ empty()

bool octave::action_container::empty ( void  ) const
inlineinherited

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

◆ operator bool()

octave::unwind_protect::operator bool ( void  ) const
inlineinherited

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

◆ operator=()

unwind_protect_safe& octave::unwind_protect_safe::operator= ( const unwind_protect_safe )
delete

◆ protect_var() [1/2]

template<typename T >
void octave::action_container::protect_var ( T &  var)
inlineinherited

◆ protect_var() [2/2]

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

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

◆ run() [1/2]

◆ run() [2/2]

void octave::action_container::run ( void  )
inlineinherited

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

References octave::action_container::run().

Referenced by octave::action_container::run().

◆ run_first()

void octave::unwind_protect::run_first ( void  )
inlinevirtualinherited

Implements octave::action_container.

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

Referenced by octave::load_path::set().

◆ size()

size_t octave::unwind_protect::size ( void  ) const
inlinevirtualinherited

Implements octave::action_container.

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

◆ warn_unhandled_exception()

void octave::unwind_protect_safe::warn_unhandled_exception ( void  ) const
private

Definition at line 36 of file unwind-prot.cc.

Member Data Documentation

◆ m_lifo

std::stack<elem *> octave::unwind_protect::m_lifo
protectedinherited

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


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