|
| __init__ (self, mainScope, _preCompute=None) |
|
| __getitem__ (self, *args, **kwargs) |
|
| __setitem__ (self, *args, **kwargs) |
|
| __delitem__ (self, *args, **kwargs) |
|
| __len__ (self, *args, **kwargs) |
|
| restrict (self, scopePath, excludeContains) |
|
| findVar (self, varName, array=None, exactScope=False, extraVarList=None) |
|
| showVarList (self) |
|
The VarList class stores the characterisitcs of all variables contained in a source code
Definition at line 44 of file variables.py.
◆ __init__()
pyfortool.variables.VarList.__init__ |
( |
|
self, |
|
|
|
mainScope, |
|
|
|
_preCompute = None |
|
) |
| |
:param mainScope: a PYFT object
:param _preCompute: pre-computed values (_varList, _fullVarList, _scopePath)
Notes: - variables are found in modules only if the 'ONLY' attribute is used
- array specification and type is unknown for module variables
- 'ASSOCIATE' statements are not followed
Definition at line 48 of file variables.py.
◆ __delitem__()
pyfortool.variables.VarList.__delitem__ |
( |
|
self, |
|
|
* |
args, |
|
|
** |
kwargs |
|
) |
| |
◆ __getitem__()
pyfortool.variables.VarList.__getitem__ |
( |
|
self, |
|
|
* |
args, |
|
|
** |
kwargs |
|
) |
| |
◆ __len__()
pyfortool.variables.VarList.__len__ |
( |
|
self, |
|
|
* |
args, |
|
|
** |
kwargs |
|
) |
| |
◆ __setitem__()
pyfortool.variables.VarList.__setitem__ |
( |
|
self, |
|
|
* |
args, |
|
|
** |
kwargs |
|
) |
| |
◆ _fromScope()
pyfortool.variables.VarList._fromScope |
( |
|
mainScope | ) |
|
|
staticprotected |
:param mainScope: a PYFT object
Definition at line 84 of file variables.py.
◆ findVar()
pyfortool.variables.VarList.findVar |
( |
|
self, |
|
|
|
varName, |
|
|
|
array = None , |
|
|
|
exactScope = False , |
|
|
|
extraVarList = None |
|
) |
| |
Search for a variable in a list of declared variables
:param varName: variable name
:param array: True to limit search to arrays,
False to limit search to non array,
None to return anything
:param exactScope: True to limit search to variables declared in the scopePath
:param extraVarList: None or list of variables (such as those contained in a VarList object)
defined but not yet available in the self.varList object.
:return: None if not found or the description of the variable
The function is designed to return the declaration of a given variable.
If we know that the variable is (is not) an array, the last declaration statement
must (must not) be an array declaration. If the last declaration statement found doesn't
correspond to what is expected, we don't return it.
In case array is None, we return the last declaration statement without checking its kind.
Definition at line 185 of file variables.py.
◆ restrict()
pyfortool.variables.VarList.restrict |
( |
|
self, |
|
|
|
scopePath, |
|
|
|
excludeContains |
|
) |
| |
:param scopePath: return a varList restricted to this scope path
:param excludeContains: exclude variables declared in contained parts
Definition at line 171 of file variables.py.
◆ showVarList()
pyfortool.variables.VarList.showVarList |
( |
|
self | ) |
|
Display on stdout a nice view of all the variables
Definition at line 222 of file variables.py.
◆ _fullVarList
pyfortool.variables.VarList._fullVarList |
|
protected |
◆ _scopePath
pyfortool.variables.VarList._scopePath |
|
protected |
◆ _varList
pyfortool.variables.VarList._varList |
|
protected |
The documentation for this class was generated from the following file:
- /home/runner/work/pyfortool/pyfortool/src/pyfortool/variables.py