List of all members.
Detailed Description
Definition at line 2623 of file blocks.py.
Constructor & Destructor Documentation
def blockit::Fortran::blocks::Specialization::__init__ |
( |
|
self, |
|
|
|
parameters |
|
) |
| |
This is a specialization block which should only appear inside a
template block. It is used to produce code that appears within it for
certain template parameters. This is an example:
template <class Object, class Element>
Specialization
template <real, real>
function foo(bar, a,b,c) result(blah)
type (myType<real, real>) :: bar
real :: a,b
integer :: c
bar%a = bar%a * a
bar%b = bar%b * b
end function foo
template <>
function foo(bar, a,b,c) result(blah)
type (myType<Object, Element>) :: bar
real :: a,b
integer :: c
print *, 'This is the default'
end function foo
end Specialization
end template
The above Specialization block will only show the first function if Object is
real and Element is real, but shows the second function default
(i.e. Using <>) otherwise.
Input
-----
parameters : the groups from the factory static method
Definition at line 2644 of file blocks.py.
Member Function Documentation
def blockit::Fortran::blocks::Specialization::__getstate__ |
( |
|
self | ) |
|
Builds a dictionary tree of the block.
Definition at line 2751 of file blocks.py.
def blockit::Fortran::blocks::Specialization::_addSpec |
( |
|
self, |
|
|
|
s, |
|
|
|
l, |
|
|
|
tokens |
|
) |
| [private] |
Create specialization list where each entry is a tuple of template
parameters tuple and corresponding code.
Definition at line 2691 of file blocks.py.
def blockit::Fortran::blocks::Specialization::addLine |
( |
|
self, |
|
|
|
line, |
|
|
|
n = None |
|
) |
| |
def blockit::Fortran::blocks::Specialization::factory |
( |
|
s, |
|
|
|
lineNo, |
|
|
|
tokens |
|
) |
| |
Factory method called by the BlockParser to produce an
instance of the class.
Definition at line 2637 of file blocks.py.
def blockit::Fortran::blocks::Specialization::sentinel |
( |
|
self, |
|
|
|
line |
|
) |
| |
def blockit::Fortran::blocks::Specialization::serialize |
( |
|
self | ) |
|
def blockit::Fortran::blocks::Specialization::setState |
( |
|
self, |
|
|
|
state |
|
) |
| |
def blockit::Fortran::blocks::Specialization::show |
( |
|
self, |
|
|
|
mangle = False |
|
) |
| |
Member Data Documentation
The documentation for this class was generated from the following file: