List of all members.
Detailed Description
Definition at line 856 of file blocks.py.
Constructor & Destructor Documentation
def blockit::Fortran::blocks::Template::__init__ |
( |
|
self, |
|
|
|
parameters, |
|
|
|
name = None |
|
) |
| |
A Template block. Template blocks begin with the line:
template < ... >
where ... is a list of template parameters starting with the keyword
class. For example,
template <class A, class B>
.
.
.
end template
is the start of a template block with two internal template paramters
A and B.
Input
-----
parameters : the groups from the factory static method
name : optional name to give the template
Definition at line 898 of file blocks.py.
Member Function Documentation
def blockit::Fortran::blocks::Template::_createTemplatePairs |
( |
|
self, |
|
|
|
tokens |
|
) |
| [private] |
Create template pairs from the pyparsed tokens list.
Arguments:
- `self`:
- `tokens`: nested tokens list from pyparsing
Definition at line 934 of file blocks.py.
def blockit::Fortran::blocks::Template::addObjects |
( |
|
self, |
|
|
|
obj |
|
) |
| |
Added a specification set for the template, e.g. if the template
specification is <class Object, class Element>, then if you want
Object to be 'integer' and Element to be 'real' obj would be in the
argument list would be ('integer', 'real').
obj : specification of a template, e.g. ('integer', 'real') for the
template string <class Object, class Element>.
Reimplemented from blockit::Fortran::blocks::FortranBlock.
Definition at line 977 of file blocks.py.
def blockit::Fortran::blocks::Template::factory |
( |
|
s, |
|
|
|
lineNo, |
|
|
|
tokens |
|
) |
| |
Factory method called by the BlockParser to produce an
instance of the class.
Definition at line 889 of file blocks.py.
def blockit::Fortran::blocks::Template::hash |
( |
|
self | ) |
|
Overloaded hash method for this block if it does not already have a
_hash internal value. Uses the mangled version for the hash. The
hash value is:
<the text hash>/<template parameters>
Reimplemented from blockit::blocks::Block.
Definition at line 999 of file blocks.py.
def blockit::Fortran::blocks::Template::instantiate |
( |
|
self, |
|
|
|
objects, |
|
|
|
cache |
|
) |
| |
This method only exists for realizations of templated blocks. The
setState() method is called internally with the provide list of
template specifications which sets the template parameter states.
Then this method creates a realization of a template block using those
parameters and returns it.
objects : a template parameter list, e.g ('*','integer','*')
for a three parameter template with default values used for
the first and last value or ('integer', 'real') for a two
parameter list. The wildcards are resolved internally.
cache : and instance of FortranCacheManager to check for instantiated
templates
Definition at line 1022 of file blocks.py.
def blockit::Fortran::blocks::Template::isTemplated |
( |
|
self | ) |
|
def blockit::Fortran::blocks::Template::isTemplated |
( |
|
self | ) |
|
Returns True if template block is templated, i.e. it has a template
specification. Instantiated template blocks are template blocks that
do not have template specs so they will return false.
Reimplemented from blockit::Fortran::blocks::FortranBlock.
Definition at line 968 of file blocks.py.
def blockit::Fortran::blocks::Template::name |
( |
|
self | ) |
|
def blockit::Fortran::blocks::Template::sentinel |
( |
|
self, |
|
|
|
line |
|
) |
| |
def blockit::Fortran::blocks::Template::show |
( |
|
self, |
|
|
|
mangle = False , |
|
|
|
force = False |
|
) |
| |
Overloaded show method for templates. Only show template if it is
a realized template, i.e. the _template attribute is None. This can
be overridden with the force parameter to show it anyway.
Definition at line 989 of file blocks.py.
def blockit::Fortran::blocks::Template::template |
( |
|
self | ) |
|
Member Data Documentation
The documentation for this class was generated from the following file: