GNU Octave  9.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
action_container Class Referenceabstract

#include "action-container.h"

Inheritance diagram for action_container:
event_queue unwind_protect event_queue_safe unwind_protect_safe

Classes

class  delete_ptr_elem
 
class  elem
 
class  fcn_elem
 
class  restore_var_elem
 

Public Member Functions

 action_container ()
 
virtual ~action_container ()=default
 
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 ()
 
void discard (std::size_t num)
 
virtual void discard_first ()=0
 
bool empty () const
 
 operator bool () const
 
template<typename T >
void protect_var (T &var)
 
template<typename T >
void protect_var (T &var, const T &val)
 
void run ()
 
void run (std::size_t num)
 
virtual void run_first ()=0
 
virtual std::size_t size () const =0
 

Protected Member Functions

virtual void add_action (elem *new_elem)=0
 

Detailed Description

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

Constructor & Destructor Documentation

◆ action_container()

action_container::action_container ( )
inline

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

◆ ~action_container()

virtual action_container::~action_container ( )
virtualdefault

Member Function Documentation

◆ add()

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

◆ add_action()

virtual void action_container::add_action ( elem new_elem)
protectedpure virtual

Implemented in unwind_protect, and event_queue.

◆ add_delete()

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

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

◆ add_fcn()

template<typename... Params, typename... Args>
void action_container::add_fcn ( void(*)(Params...)  fcn,
Args &&...  args 
)
inline

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

◆ add_method() [1/2]

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

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

◆ add_method() [2/2]

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

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

◆ discard() [1/2]

void action_container::discard ( )
inline

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

References discard().

Referenced by discard().

◆ discard() [2/2]

void action_container::discard ( std::size_t  num)
inline

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

Referenced by tree_evaluator::do_unwind_protect_cleanup_code().

◆ discard_first()

virtual void action_container::discard_first ( )
pure virtual

Implemented in unwind_protect, and event_queue.

◆ empty()

bool action_container::empty ( ) const
inline

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

◆ operator bool()

action_container::operator bool ( ) const
inline

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

◆ protect_var() [1/2]

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

◆ protect_var() [2/2]

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

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

◆ run() [1/2]

void action_container::run ( )
inline

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

References run().

Referenced by run().

◆ run() [2/2]

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

◆ run_first()

virtual void action_container::run_first ( )
pure virtual

Implemented in unwind_protect, and event_queue.

◆ size()

virtual std::size_t action_container::size ( ) const
pure virtual

Implemented in unwind_protect, and event_queue.


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