Create an instance of concrete extension of alpha_coefficients given its constructor.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(alpha_coefficients_constructor), | intent(in) | :: | constructor | Constructor. |
||
class(alpha_coefficients), | intent(out), | allocatable | :: | object | Object. |
subroutine create_alpha_coefficients(constructor, object)
!< Create an instance of concrete extension of [[alpha_coefficients]] given its constructor.
class(alpha_coefficients_constructor), intent(in) :: constructor !< Constructor.
class(alpha_coefficients), allocatable, intent(out) :: object !< Object.
select type(constructor)
type is(alpha_coefficients_js_constructor)
allocate(alpha_coefficients_js :: object)
type is(alpha_coefficients_m_constructor)
allocate(alpha_coefficients_m :: object)
type is(alpha_coefficients_z_constructor)
allocate(alpha_coefficients_z :: object)
class default
error stop 'error: WenOOF object factory do NOT know the constructor given'
endselect
call object%create(constructor=constructor)
endsubroutine create_alpha_coefficients