ARTS  2.3.1285(git:92a29ea9-dirty)
Callback Class Reference

External callbacks. More...

#include <interactive_workspace.h>

Public Member Functions

 Callback (void(*f)(InteractiveWorkspace *))
 Create callback. More...
 
 Callback (const Callback &)=default
 
 Callback (Callback &&)=default
 
Callbackoperator= (const Callback &)=default
 
Callbackoperator= (Callback &&)=default
 
 ~Callback ()=default
 
virtual void execute (InteractiveWorkspace &ws)
 Execute callback. More...
 

Private Attributes

void(* callback_ )(InteractiveWorkspace *)
 

Detailed Description

External callbacks.

The Callback class holds references to external callback functions, that should be executed within an ARTS agenda. It is essentially a container that holds a function pointer and provides an execute method to execute the callback stored in the container.

Callbacks are assumed to be provided in the form of function pointers that take as single argument the pointer to the interactive workspace within which the callback is executed.

Definition at line 50 of file interactive_workspace.h.

Constructor & Destructor Documentation

◆ Callback() [1/3]

Callback::Callback ( void(*)(InteractiveWorkspace *)  f)
inline

Create callback.

Parameters
[in]fFunction pointer to the function implementing the callback.

Definition at line 57 of file interactive_workspace.h.

References operator=(), and ~Callback().

◆ Callback() [2/3]

Callback::Callback ( const Callback )
default

◆ Callback() [3/3]

Callback::Callback ( Callback &&  )
default

◆ ~Callback()

Callback::~Callback ( )
default

Referenced by Callback().

Member Function Documentation

◆ execute()

virtual void Callback::execute ( InteractiveWorkspace ws)
inlinevirtual

Execute callback.

Parameters
[in,out]

Definition at line 73 of file interactive_workspace.h.

◆ operator=() [1/2]

Callback& Callback::operator= ( const Callback )
default

Referenced by Callback().

◆ operator=() [2/2]

Callback& Callback::operator= ( Callback &&  )
default

Member Data Documentation

◆ callback_

void(* Callback::callback_) (InteractiveWorkspace *)
private

Definition at line 76 of file interactive_workspace.h.


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