ASPECT
Public Member Functions | Static Public Member Functions | List of all members
aspect::internal::Plugins::RegisterHelper< InterfaceClass, ModelClass > Struct Template Reference

Public Member Functions

 RegisterHelper (void(*register_function)(const std::string &, const std::string &, void(*)(ParameterHandler &), std::unique_ptr< InterfaceClass >(*)()), const char *name, const char *description)
 

Static Public Member Functions

static std::unique_ptr< InterfaceClass > factory ()
 

Detailed Description

template<typename InterfaceClass, typename ModelClass>
struct aspect::internal::Plugins::RegisterHelper< InterfaceClass, ModelClass >

An internal class that is used in the definition of the ASPECT_REGISTER_* macros. Given a registration function, a classname, a description of what it does, and a name for the parameter file, it registers the model with the proper authorities.

The registration happens in the constructor. The typical use case of this function is thus the creation of a dummy object in some otherwise unused namespace.

Definition at line 436 of file plugins.h.

Constructor & Destructor Documentation

§ RegisterHelper()

template<typename InterfaceClass , typename ModelClass >
aspect::internal::Plugins::RegisterHelper< InterfaceClass, ModelClass >::RegisterHelper ( void(*)(const std::string &, const std::string &, void(*)(ParameterHandler &), std::unique_ptr< InterfaceClass >(*)())  register_function,
const char *  name,
const char *  description 
)
inline

Constructor. Given a pointer to a registration function and name and description of the class, this constructor registers the class passed as second template argument.

Definition at line 443 of file plugins.h.

References aspect::AdiabaticConditions::declare_parameters().

Member Function Documentation

§ factory()

template<typename InterfaceClass , typename ModelClass >
static std::unique_ptr<InterfaceClass> aspect::internal::Plugins::RegisterHelper< InterfaceClass, ModelClass >::factory ( )
inlinestatic

A factory object that just creates object of the type registered by this class.

Definition at line 461 of file plugins.h.


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