#include <dune/common/parameterizedobject.hh>
◆ Creator
◆ Key
◆ Type
The type of objects created by the factory.
◆ contains()
◆ create()
Creates an object identified by a key from given parameters.
- Parameters
-
key | The key the object is registered with |
- See also
- define.
- Parameters
-
args | The parameters used for the construction. |
- Returns
- The object wrapped as Type
◆ define() [1/3]
Registers a new type with a key.
After registration objects of this type can be constructed with the specified key using a matching default creation function. If Type is a unique_ptr or shared_ptr, the object is created via make_unique or make_shared, respectively. Otherwise a constructor of Impl is called.
- Template Parameters
-
Impl | The type of objects to create. |
- Parameters
-
key | The key associated with this type. |
◆ define() [2/3]
Registers a new creator with a key.
After registration objects can be constructed using the given creator function.
- Template Parameters
-
F | Type of creator function. This must be callable with Args... . |
- Parameters
-
key | The key associated with this type. |
f | Function for creation of objects of type Impl |
- Todo
- Replace has_proper_signature by concept check
◆ define() [3/3]
Registers a new type with a key.
After registration objects of this type can be created. This method will store a copy of the given object and create will hand out a copy to this.
- Template Parameters
-
Impl | The type of objects to create. |
- Parameters
-
key | The key associated with this type. |
t | reference object, "create" will call the copy-constructor |
note, this does not work fundamental types
◆ has_proper_signature() [1/2]
|
inlinestaticconstexprprotected |
◆ has_proper_signature() [2/2]
|
inlinestaticconstexprprotected |
The documentation for this class was generated from the following file: