NEML2 1.4.0
Loading...
Searching...
No Matches
Registry Class Reference

Detailed Description

The Registry is used as a global singleton to collect information on all available NEML2Object that can manufactured from the input file.

To register a concrete class to the registry, use the macro register_NEML2_object or register_NEML2_object_alias. Each object/class should only be registered once.

#include <Registry.h>

Static Public Member Functions

static Registryget ()
 Get the global Registry singleton.
 
template<typename T >
static char add (std::string name)
 Add information on a NEML2Object to the registry.
 
static std::map< std::string, OptionSetexpected_options ()
 Return the expected options of all registered classs.
 
static OptionSet expected_options (const std::string &name)
 Return the expected options of a specific registered class.
 
static std::string syntax_type (const std::string &type)
 Return the syntax type (what appears in the input file) given a registered object's type.
 
static BuildPtr builder (const std::string &name)
 Return the build method pointer of a specific registered class.
 

Member Function Documentation

◆ add()

template<typename T >
static char add ( std::string name)
inlinestatic

Add information on a NEML2Object to the registry.

◆ builder()

BuildPtr builder ( const std::string & name)
static

Return the build method pointer of a specific registered class.

◆ expected_options() [1/2]

std::map< std::string, OptionSet > expected_options ( )
static

Return the expected options of all registered classs.

◆ expected_options() [2/2]

OptionSet expected_options ( const std::string & name)
static

Return the expected options of a specific registered class.

◆ get()

Registry & get ( )
static

Get the global Registry singleton.

◆ syntax_type()

std::string syntax_type ( const std::string & type)
static

Return the syntax type (what appears in the input file) given a registered object's type.