Public Member Functions | List of all members
aspect::Simulator< dim >::IntermediaryConstructorAction Struct Reference

Public Member Functions

 IntermediaryConstructorAction (const std::function< void()> &action)

Detailed Description

template<int dim>
struct aspect::Simulator< dim >::IntermediaryConstructorAction

A class that is empty but that can be used as a member variable and whose constructor will be run in the order in which the member variables are initialized. Because this class has a constructor that takes a function object that it will execute whenever the member variable is initialized, this allows running arbitrary actions in between member variable initializers, for example if some member variable is partially initialized at point A within the member variable initializer list, its initialization can only be finalized after point B (because it depends on what another member variable decides to do), but needs to be finished by point C within the member initialization. In such a case, one may have a member variable of the current time placed in the list of member variables such that it is initialized at point B, and then initialize it using a function object that performs the finalization of initialization.

Definition at line 414 of file simulator.h.

Constructor & Destructor Documentation

§ IntermediaryConstructorAction()

template<int dim>
aspect::Simulator< dim >::IntermediaryConstructorAction::IntermediaryConstructorAction ( const std::function< void()> &  action)

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