6 #include <amdis/Output.hpp> 22 template <
class BaseClass>
32 virtual std::unique_ptr<BaseClass>
create() = 0;
41 template <
class BaseClass>
47 std::unique_ptr<BaseClass>
create() final
49 error_exit(
"Should not be called. Call create(string) instead!");
58 virtual std::unique_ptr<BaseClass> createWithString(std::string) = 0;
63 template <
class BaseClass>
67 test_exit_dbg(result,
"Can not cast CreatorInterface to CreatorInterfaceName!");
std::unique_ptr< BaseClass > create() final
Must be implemented by sub classes of CreatorInterface. Creates a new instance of the sub class of Ba...
Definition: CreatorInterface.hpp:47
void error_exit(std::string const &str, Args &&... args)
print a message and exit
Definition: Output.hpp:142
void test_exit_dbg(bool condition, Args &&... args)
call assert_msg, in debug mode only
Definition: Output.hpp:205
Interface for creators with name.
Definition: CreatorInterface.hpp:42
Contains all classes needed for solving linear and non linear equation systems.
Definition: AdaptBase.hpp:6
CreatorInterfaceName< BaseClass > * named(CreatorInterface< BaseClass > *ptr)
cast a ptr of CreatorInterface to CreatorInterfaceName
Definition: CreatorInterface.hpp:64
virtual std::unique_ptr< BaseClass > create()=0
Must be implemented by sub classes of CreatorInterface. Creates a new instance of the sub class of Ba...
Interface for the implementation of the factory method pattern. The creation of an object of a sub cl...
Definition: CreatorInterface.hpp:23