Sierra Toolkit
Version of the Day
|
#include <memory>
#include <map>
#include <vector>
#include <string>
#include <typeinfo>
#include <stk_util/diag/StringUtil.hpp>
#include <stk_util/util/Fortran.hpp>
#include <stk_util/diag/Writer_fwd.hpp>
Go to the source code of this file.
Classes | |
class | sierra::Plugin::Registry |
struct | sierra::Plugin::Registry::less_nocase |
Class hash_nocase implements a hash, case insensitive NamePair hash functor. More... | |
class | sierra::Plugin::UserPlugin< Creator, S > |
class | sierra::Plugin::UserPlugin< Creator, S >::Register< DerivedClass > |
Class template Register registers the createInstance() function with the derived_name on object creation. More... | |
class | sierra::Plugin::UserSubroutine< S > |
class | sierra::Plugin::UserSubroutine< S >::Register |
Class template Register registers the user function function pointer with the function_name on object creation. More... | |
Namespaces | |
sierra | |
Macros | |
#define | FORTRAN_USER_SUBROUTINE(NAME, USER_SUB) extern "C" const std::type_info * SIERRA_FORTRAN(NAME)() {return &typeid(USER_SUB::Signature);} |
Typedefs | |
typedef std::type_info * | type_info_func() |
Functions | |
std::string | sierra::Plugin::derived_id_name (int derived_id) |
stk_classic::diag::Writer & | sierra::Plugin::operator<< (stk_classic::diag::Writer &dout, const Registry ®istry) |
void SIERRA_FORTRAN() | register_user_subroutine (type_info_func type_id, void *user_subroutine, const char *name, int name_length) |
FORTRAN compatible user subprogram registration routine. More... | |
Historically, the term User Subroutine has referred to Fortran subroutines which are generally called from within a procedure, allowing the user to create or select a mathematical calculation to be applied to set of arguments.
The purpose of this package is add User Plugins and User Functions as well as provide an analogous implementation of the traditional User Subroutine.
A User Plugin is a C++ class in which the application developer designs and implements a base class that end users can create or select derivative classes to before the desired operations.
A User Subroutine is a function with a specific calling signature allowing any registered subroutine with that signature to be called by its registered name.
A User Function is a functional calculation which accepts one or more independent const variables and returns a single dependent variable. These variables may be of scalar, vector or object quantities. These functions can be created or selected by the end user.
Definition in file UserPlugin.hpp.
#define FORTRAN_USER_SUBROUTINE | ( | NAME, | |
USER_SUB | |||
) | extern "C" const std::type_info * SIERRA_FORTRAN(NAME)() {return &typeid(USER_SUB::Signature);} |
Macro FORTRAN_USER_SUBROUTINE generates a FortranFunctionTraits template specialization for the RETURN and SIGNATURE and creates a typedef referencing the user function factory of NAME.
Note that the user function has extern "C" linkage.
NAME | name to be used by the Fortran EXTERNAL statement |
USER_SUB | user subroutine factory |
Definition at line 683 of file UserPlugin.hpp.
void SIERRA_FORTRAN() register_user_subroutine | ( | type_info_func | type_id, |
void * | user_subroutine, | ||
const char * | name, | ||
int | name_length | ||
) |
FORTRAN compatible user subprogram registration routine.