Reference Guide  2.5.0
psyclone.f2pygen.DeclGen Class Reference
Inheritance diagram for psyclone.f2pygen.DeclGen:
Collaboration diagram for psyclone.f2pygen.DeclGen:

Public Member Functions

def __init__ (self, parent, datatype="", entity_decls=None, intent="", pointer=False, kind="", dimension="", allocatable=False, save=False, target=False, initial_values=None, private=False)
 
- Public Member Functions inherited from psyclone.f2pygen.BaseDeclGen
def __init__ (self, parent, datatype="", entity_decls=None, intent="", pointer=False, dimension="", allocatable=False, save=False, target=False, initial_values=None, private=False)
 
def names (self)
 
def root (self)
 
- Public Member Functions inherited from psyclone.f2pygen.BaseGen
def __init__ (self, parent, root)
 
def parent (self)
 
def children (self)
 
def add (self, new_object, position=None)
 
def previous_loop (self)
 
def last_declaration (self)
 
def start_parent_loop (self, debug=False)
 

Static Public Attributes

list SUPPORTED_TYPES = ["integer", "real", "logical"]
 

Detailed Description

Generates a Fortran declaration for variables of various intrinsic
types (integer, real and logical). For character variables
CharDeclGen should be used.

:param parent: node to which to add this declaration as a child.
:type parent: :py:class:`psyclone.f2pygen.BaseGen`
:param str datatype: the (intrinsic) type for this declaration.
:param list entity_decls: list of variable names to declare.
:param str intent: the INTENT attribute of this declaration.
:param bool pointer: whether or not this is a pointer declaration.
:param str kind: the KIND attribute to use for this declaration.
:param str dimension: the DIMENSION specifier (i.e. the xx in \
                      DIMENSION(xx)).
:param bool allocatable: whether this declaration is for an \
                         ALLOCATABLE quantity.
:param bool save: whether this declaration has the SAVE attribute.
:param bool target: whether this declaration has the TARGET attribute.
:param initial_values: initial value to give each variable.
:type initial_values: list of str with same no. of elements as \
                      entity_decls
:param bool private: whether this declaration has the PRIVATE attribute \
                     (default is False).

:raises RuntimeError: if datatype is not one of DeclGen.SUPPORTED_TYPES.

Definition at line 1022 of file f2pygen.py.

Member Data Documentation

◆ SUPPORTED_TYPES

list psyclone.f2pygen.DeclGen.SUPPORTED_TYPES = ["integer", "real", "logical"]
static
Generates a Fortran declaration for variables of various intrinsic
types (integer, real and logical). For character variables
CharDeclGen should be used.

:param parent: node to which to add this declaration as a child.
:type parent: :py:class:`psyclone.f2pygen.BaseGen`
:param str datatype: the (intrinsic) type for this declaration.
:param list entity_decls: list of variable names to declare.
:param str intent: the INTENT attribute of this declaration.
:param bool pointer: whether or not this is a pointer declaration.
:param str kind: the KIND attribute to use for this declaration.
:param str dimension: the DIMENSION specifier (i.e. the xx in \
                      DIMENSION(xx)).
:param bool allocatable: whether this declaration is for an \
                         ALLOCATABLE quantity.
:param bool save: whether this declaration has the SAVE attribute.
:param bool target: whether this declaration has the TARGET attribute.
:param initial_values: initial value to give each variable.
:type initial_values: list of str with same no. of elements as \
                      entity_decls
:param bool private: whether this declaration has the PRIVATE attribute \
                     (default is False).

:raises RuntimeError: if datatype is not one of DeclGen.SUPPORTED_TYPES.

Definition at line 1050 of file f2pygen.py.


The documentation for this class was generated from the following file: