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

Public Member Functions

def __init__ (self, root, line, position, dir_type)
 
def type (self)
 
def position (self)
 

Detailed Description

Base class for directives so we can reason about them when walking
the tree. Sub-classes the fparser1 Comment class.

:param root: the parent node in the AST to which we are adding the \
             directive
:type root: subclass of :py:class:`fparser.common.base_classes.Statement`
:param line: the fparser object which we will manipulate to create \
             the desired directive.
:type line: :py:class:`fparser.common.readfortran.Comment`
:param str position: e.g. 'begin' or 'end' (language specific)
:param str dir_type: the type of directive that this is (e.g. \
                     'parallel do')

Definition at line 81 of file f2pygen.py.

Member Function Documentation

◆ position()

def psyclone.f2pygen.Directive.position (   self)
:returns: the position of this Directive ('begin' or 'end').
:rtype: str

Definition at line 116 of file f2pygen.py.

116  def position(self):
117  '''
118  :returns: the position of this Directive ('begin' or 'end').
119  :rtype: str
120  '''
121  return self._position
122 
123 

References psyclone.f2pygen.Directive._position.

Here is the caller graph for this function:

◆ type()

def psyclone.f2pygen.Directive.type (   self)
:returns: the type of this Directive.
:rtype: str

Definition at line 108 of file f2pygen.py.

108  def type(self):
109  '''
110  :returns: the type of this Directive.
111  :rtype: str
112  '''
113  return self._my_type
114 

References psyclone.f2pygen.Directive._my_type.


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