Provides properties and instance methods for the method class. This class is a wrapper for any procedure (subroutine or function).
The following examples demonstrate some of the main members of the method.
This example shows how to set a caller explicitly. In the present case, the caller was necessary to specify the procedure interface explicitly. This is necessary when benchmarking a function rather than a subroutine.
At the moment, the method class handles procedures using up to 7 dummy arguments.
Initializes a new instance of the method class
type(method) function method(integer nargs, procedure f)
Examples
type(method) function method(procedure f, procedure caller)
Examples
type(method) function method(procedure f, class(*) a1, procedure caller)
Examples
type(method) function method(procedure f, class(*) a1, class(*) a2, procedure caller)
| f | The procedure pointer | |
| [in] | a1 | The method argument |
| [in] | a2 | The method argument |
| caller | (optional) The caller wrapper |
type(method) function method(procedure f, class(*) a1, class(*) a2, class(*) a3, procedure caller)
| f | The procedure pointer | |
| [in] | a1 | The method argument |
| [in] | a2 | The method argument |
| [in] | a3 | The method argument |
| caller | (optional) The caller wrapper |
type(method) function method(procedure f, class(*) a1, class(*) a2, class(*) a3, class(*) a4, procedure caller)
| f | The procedure pointer | |
| [in] | a1 | The method argument |
| [in] | a2 | The method argument |
| [in] | a3 | The method argument |
| [in] | a4 | The method argument |
| caller | (optional) The caller wrapper |
type(method) function method(procedure f, class(*) a1, class(*) a2, class(*) a3, class(*) a4, class(*) a5, procedure caller)
| f | The procedure pointer | |
| [in] | a1 | The method argument |
| [in] | a2 | The method argument |
| [in] | a3 | The method argument |
| [in] | a4 | The method argument |
| [in] | a5 | The method argument |
| caller | (optional) The caller wrapper |
type(method) function method(procedure f, class(*) a1, class(*) a2, class(*) a3, class(*) a4, class(*) a5, class(*) a6, procedure caller)
| f | The procedure pointer | |
| [in] | a1 | The method argument |
| [in] | a2 | The method argument |
| [in] | a3 | The method argument |
| [in] | a4 | The method argument |
| [in] | a5 | The method argument |
| [in] | a6 | The method argument |
| caller | (optional) The caller wrapper |
type(method) function method(procedure f, class(*) a1, class(*) a2, class(*) a3, class(*) a4, class(*) a5, class(*) a6, class(*) a7, procedure caller)
| f | The procedure pointer | |
| [in] | a1 | The method argument |
| [in] | a2 | The method argument |
| [in] | a3 | The method argument |
| [in] | a4 | The method argument |
| [in] | a5 | The method argument |
| [in] | a6 | The method argument |
| [in] | a7 | The method argument |
| caller | (optional) The caller wrapper |
Remarks
Definition at line 141 of file Method.f90.
Variables | |
| integer, public | nargs |
| Number of dummy arguments. | |
| type(arg), dimension(:), allocatable, public | args |
| Array of method arguments . | |
Static Public Attributes | |
| procedure(), pointer, nopass | f => null() |
| Procedure pointer. | |
| procedure(), pointer, nopass, public | caller => null() |
| Wrapper to call the procedure pointer. This provides a way to set the procedure interface explicitely. | |
Private Member Functions | |
| procedure, pass, private | invoke_a0 (this) |
| Bound procedure to invoke a method. | |
| procedure, pass, private | invoke_a1 (this, a1) |
| Bound procedure to invoke a method. | |
| procedure, pass, private | invoke_a2 (this, a1, a2) |
| Bound procedure to invoke a method. | |
| procedure, pass, private | invoke_a3 (this, a1, a2, a3) |
| Bound procedure to invoke a method. | |
| procedure, pass, private | invoke_a4 (this, a1, a2, a3, a4) |
| Bound procedure to invoke a method. | |
| procedure, pass, private | invoke_a5 (this, a1, a2, a3, a4, a5) |
| Bound procedure to invoke a method. | |
| procedure, pass, private | invoke_a6 (this, a1, a2, a3, a4, a5, a6) |
| Bound procedure to invoke a method. | |
| procedure, pass, private | invoke_a7 (this, a1, a2, a3, a4, a5, a6, a7) |
| Bound procedure to invoke a method. | |
| procedure, pass, private | method_assign_method (lhs, rhs) |
| Assignment overloading. Assign a method to another method. | |
Assignment overloading. Assign a method to another method.
| [in,out] | lhs | The target method |
| [in] | rhs | The source method |
Remarks
Definition at line 165 of file Method.f90.
| procedure, pass, public dispose | ( | class(method), intent(inout) | this | ) |
Dispose resources associated with the bound type.
| [in,out] | this | The type bound to the method |
Remarks
Definition at line 166 of file Method.f90.
| generic, public invoke | ( | class(method), intent(inout) | this | ) |
Bound procedure to invoke a method.
| [in] | this | The type bound to the method |
Examples
Remarks
Remarks
Definition at line 156 of file Method.f90.
| generic, public invoke | ( | class(method), intent(inout) | this, |
| class(*), intent(in) | a1 ) |
Bound procedure to invoke a method.
| [in] | this | The type bound to the method |
| [in] | a1 | dummy argument |
Examples
The first example demonstrate how to invoke the method by passing the arguments to the invoke procedure.
Alternatively, on can also set the arguments directly from the method constructor.
Remarks
Definition at line 156 of file Method.f90.
| generic, public invoke | ( | class(method), intent(inout) | this, |
| class(*), intent(in) | a1, | ||
| class(*), intent(in) | a2 ) |
Bound procedure to invoke a method.
| [in] | this | The type bound to the method |
| [in] | a1 | dummy argument |
| [in] | a2 | dummy argument |
Examples
The first example demonstrate how to invoke the method by passing the arguments to the invoke procedure.
Alternatively, on can also set the arguments directly from the method constructor.
Remarks
Definition at line 156 of file Method.f90.
| generic, public invoke | ( | class(method), intent(inout) | this, |
| class(*), intent(in) | a1, | ||
| class(*), intent(in) | a2, | ||
| class(*), intent(in) | a3 ) |
Bound procedure to invoke a method.
| [in] | this | The type bound to the method |
| [in] | a1 | dummy argument |
| [in] | a2 | dummy argument |
| [in] | a3 | dummy argument |
Examples
The first example demonstrate how to invoke the method by passing the arguments to the invoke procedure.
Alternatively, on can also set the arguments directly from the method constructor.
Remarks
Definition at line 156 of file Method.f90.
| generic, public invoke | ( | class(method), intent(inout) | this, |
| class(*), intent(in) | a1, | ||
| class(*), intent(in) | a2, | ||
| class(*), intent(in) | a3, | ||
| class(*), intent(in) | a4 ) |
Bound procedure to invoke a method.
| [in] | this | The type bound to the method |
| [in] | a1 | dummy argument |
| [in] | a2 | dummy argument |
| [in] | a3 | dummy argument |
| [in] | a4 | dummy argument |
Examples
The first example demonstrate how to invoke the method by passing the arguments to the invoke procedure.
Alternatively, on can also set the arguments directly from the method constructor.
Remarks
Definition at line 156 of file Method.f90.
| generic, public invoke | ( | class(method), intent(inout) | this, |
| class(*), intent(in) | a1, | ||
| class(*), intent(in) | a2, | ||
| class(*), intent(in) | a3, | ||
| class(*), intent(in) | a4, | ||
| class(*), intent(in) | a5 ) |
Bound procedure to invoke a method.
| [in] | this | The type bound to the method |
| [in] | a1 | dummy argument |
| [in] | a2 | dummy argument |
| [in] | a3 | dummy argument |
| [in] | a4 | dummy argument |
| [in] | a5 | dummy argument |
Examples
The first example demonstrate how to invoke the method by passing the arguments to the invoke procedure.
Alternatively, on can also set the arguments directly from the method constructor.
Remarks
Definition at line 156 of file Method.f90.
| generic, public invoke | ( | class(method), intent(inout) | this, |
| class(*), intent(in) | a1, | ||
| class(*), intent(in) | a2, | ||
| class(*), intent(in) | a3, | ||
| class(*), intent(in) | a4, | ||
| class(*), intent(in) | a5, | ||
| class(*), intent(in) | a6 ) |
Bound procedure to invoke a method.
| [in] | this | The type bound to the method |
| [in] | a1 | dummy argument |
| [in] | a2 | dummy argument |
| [in] | a3 | dummy argument |
| [in] | a4 | dummy argument |
| [in] | a5 | dummy argument |
| [in] | a6 | dummy argument |
Examples
The first example demonstrate how to invoke the method by passing the arguments to the invoke procedure.
Alternatively, on can also set the arguments directly from the method constructor.
Remarks
Definition at line 156 of file Method.f90.
| generic, public invoke | ( | class(method), intent(inout) | this, |
| class(*), intent(in) | a1, | ||
| class(*), intent(in) | a2, | ||
| class(*), intent(in) | a3, | ||
| class(*), intent(in) | a4, | ||
| class(*), intent(in) | a5, | ||
| class(*), intent(in) | a6, | ||
| class(*), intent(in) | a7 ) |
Bound procedure to invoke a method.
| [in] | this | The type bound to the method |
| [in] | a1 | dummy argument |
| [in] | a2 | dummy argument |
| [in] | a3 | dummy argument |
| [in] | a4 | dummy argument |
| [in] | a5 | dummy argument |
| [in] | a6 | dummy argument |
| [in] | a7 | dummy argument |
Examples
The first example demonstrate how to invoke the method by passing the arguments to the invoke procedure.
Alternatively, on can also set the arguments directly from the method constructor.
Remarks
Definition at line 156 of file Method.f90.
|
private |
Bound procedure to invoke a method.
| [in] | this | The type bound to the method |
Examples
Remarks
Remarks
Definition at line 148 of file Method.f90.
|
private |
Bound procedure to invoke a method.
| [in] | this | The type bound to the method |
| [in] | a1 | dummy argument |
Examples
The first example demonstrate how to invoke the method by passing the arguments to the invoke procedure.
Alternatively, on can also set the arguments directly from the method constructor.
Remarks
Definition at line 149 of file Method.f90.
|
private |
Bound procedure to invoke a method.
| [in] | this | The type bound to the method |
| [in] | a1 | dummy argument |
| [in] | a2 | dummy argument |
Examples
The first example demonstrate how to invoke the method by passing the arguments to the invoke procedure.
Alternatively, on can also set the arguments directly from the method constructor.
Remarks
Definition at line 150 of file Method.f90.
|
private |
Bound procedure to invoke a method.
| [in] | this | The type bound to the method |
| [in] | a1 | dummy argument |
| [in] | a2 | dummy argument |
| [in] | a3 | dummy argument |
Examples
The first example demonstrate how to invoke the method by passing the arguments to the invoke procedure.
Alternatively, on can also set the arguments directly from the method constructor.
Remarks
Definition at line 151 of file Method.f90.
|
private |
Bound procedure to invoke a method.
| [in] | this | The type bound to the method |
| [in] | a1 | dummy argument |
| [in] | a2 | dummy argument |
| [in] | a3 | dummy argument |
| [in] | a4 | dummy argument |
Examples
The first example demonstrate how to invoke the method by passing the arguments to the invoke procedure.
Alternatively, on can also set the arguments directly from the method constructor.
Remarks
Definition at line 152 of file Method.f90.
|
private |
Bound procedure to invoke a method.
| [in] | this | The type bound to the method |
| [in] | a1 | dummy argument |
| [in] | a2 | dummy argument |
| [in] | a3 | dummy argument |
| [in] | a4 | dummy argument |
| [in] | a5 | dummy argument |
Examples
The first example demonstrate how to invoke the method by passing the arguments to the invoke procedure.
Alternatively, on can also set the arguments directly from the method constructor.
Remarks
Definition at line 153 of file Method.f90.
|
private |
Bound procedure to invoke a method.
| [in] | this | The type bound to the method |
| [in] | a1 | dummy argument |
| [in] | a2 | dummy argument |
| [in] | a3 | dummy argument |
| [in] | a4 | dummy argument |
| [in] | a5 | dummy argument |
| [in] | a6 | dummy argument |
Examples
The first example demonstrate how to invoke the method by passing the arguments to the invoke procedure.
Alternatively, on can also set the arguments directly from the method constructor.
Remarks
Definition at line 154 of file Method.f90.
|
private |
Bound procedure to invoke a method.
| [in] | this | The type bound to the method |
| [in] | a1 | dummy argument |
| [in] | a2 | dummy argument |
| [in] | a3 | dummy argument |
| [in] | a4 | dummy argument |
| [in] | a5 | dummy argument |
| [in] | a6 | dummy argument |
| [in] | a7 | dummy argument |
Examples
The first example demonstrate how to invoke the method by passing the arguments to the invoke procedure.
Alternatively, on can also set the arguments directly from the method constructor.
Remarks
Definition at line 155 of file Method.f90.
|
private |
Assignment overloading. Assign a method to another method.
| [in,out] | lhs | The target method |
| [in] | rhs | The source method |
Remarks
Definition at line 164 of file Method.f90.