Polaris: PointerSymbol Class Reference

PointerSymbol Class Reference

a Symbol of class VARIABLE_CLASS More...

#include <PointerSymbol.h>

Inheritance diagram for PointerSymbol:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 PointerSymbol (const char *name, Symbol &assoc, const Type &type, FORMAL_BOOL formal, SAVED_BOOL saved, ArrayBounds *bounds1=0, ArrayBounds *bounds2=0, ArrayBounds *bounds3=0, ArrayBounds *bounds4=0, ArrayBounds *bounds5=0, ArrayBounds *bounds6=0, ArrayBounds *bounds7=0)
 Constructor.
 PointerSymbol (const char *name, const Type &type, FORMAL_BOOL formal, SAVED_BOOL saved, ArrayBounds *bounds1=0, ArrayBounds *bounds2=0, ArrayBounds *bounds3=0, ArrayBounds *bounds4=0, ArrayBounds *bounds5=0, ArrayBounds *bounds6=0, ArrayBounds *bounds7=0)
 PointerSymbol (const char *name, Symbol &assoc, const Type &type, FORMAL_BOOL formal, SAVED_BOOL saved, GLOBAL_BOOL global, ArrayBounds *bounds1=0, ArrayBounds *bounds2=0, ArrayBounds *bounds3=0, ArrayBounds *bounds4=0, ArrayBounds *bounds5=0, ArrayBounds *bounds6=0, ArrayBounds *bounds7=0)
 PointerSymbol (const char *name, const Type &type, FORMAL_BOOL formal, SAVED_BOOL saved, GLOBAL_BOOL global, ArrayBounds *bounds1=0, ArrayBounds *bounds2=0, ArrayBounds *bounds3=0, ArrayBounds *bounds4=0, ArrayBounds *bounds5=0, ArrayBounds *bounds6=0, ArrayBounds *bounds7=0)
 PointerSymbol (const PointerSymbol &vsym)
PointerSymboloperator= (const PointerSymbol &vsym)
virtual const Symbolassoc_variable () const
virtual Symbolassoc_variable ()
virtual int is_pointer () const
virtual Symbolclone () const
 Clone constructor -- returns base pointer to a new clone of this Symbol.
virtual Symbolclone_all () const
 Clone constructor -- returns base pointer to a new clone of this Symbol.
virtual ~PointerSymbol ()
virtual void print (ostream &o) const
 Print onto stream 'o'.
virtual void fill_in (const BinRep &binstr, ExprTable &exprs, const Dictionary< VoidPtrDef > &stmts, const Dictionary< VoidPtrDef > &commons, const Dictionary< VoidPtrDef > &equivalences)
 Fill in all relevant info from a binstr object.
int structures_OK () const
 Check the structure of the data for errors or inconsistency Return 0 and print error message if problems found, otherwise return 1 without message.
virtual void exchange_convert (VDL &vdl)
 Convert the Symbol into the exchange format.
virtual void relink_dptrs (ProgramUnit &p)
 Change all pointers found in a PointerSymbol element to point into the given ProgramUnit.

Detailed Description

a Symbol of class VARIABLE_CLASS

Polaris C++ VDL

See also:
Symbol.h

Symbol.h

VariableSymbol.h

PointerSymbol.h

Symbol.cc

Description

A PointerSymbol is a Symbol representing a Fortran POINTER variable.

The additional field it adds to VariableSymbol's fields is the pointer to the Symbol is it associated with.

See Symbol and VariableSymbol for more information.

Definition at line 33 of file PointerSymbol.h.


Constructor & Destructor Documentation

PointerSymbol::PointerSymbol const char *  name,
Symbol assoc,
const Type type,
FORMAL_BOOL  formal,
SAVED_BOOL  saved,
ArrayBounds bounds1 = 0,
ArrayBounds bounds2 = 0,
ArrayBounds bounds3 = 0,
ArrayBounds bounds4 = 0,
ArrayBounds bounds5 = 0,
ArrayBounds bounds6 = 0,
ArrayBounds bounds7 = 0
 

Constructor.

Equivalence and CommonBlock information, if desired, must be entered separately using the appropriate functions. If the variable is an array, the dimension bounds may be initialized here, up to 5 dimensions. If more are needed, insert them directly into the array dimensions field using code such as

PointerSymbol *var("VAR1", make_type(INTEGER_TYPE), IS_FORMAL, NOT_SAVED); var.dim().ins_last(new ArrayBounds(new IntConstExpr(1), new IntconstExpr(100)); // First dimension is '1:100' etc.

Referenced by clone(), and clone_all().

PointerSymbol::PointerSymbol const char *  name,
const Type type,
FORMAL_BOOL  formal,
SAVED_BOOL  saved,
ArrayBounds bounds1 = 0,
ArrayBounds bounds2 = 0,
ArrayBounds bounds3 = 0,
ArrayBounds bounds4 = 0,
ArrayBounds bounds5 = 0,
ArrayBounds bounds6 = 0,
ArrayBounds bounds7 = 0
 

PointerSymbol::PointerSymbol const char *  name,
Symbol assoc,
const Type type,
FORMAL_BOOL  formal,
SAVED_BOOL  saved,
GLOBAL_BOOL  global,
ArrayBounds bounds1 = 0,
ArrayBounds bounds2 = 0,
ArrayBounds bounds3 = 0,
ArrayBounds bounds4 = 0,
ArrayBounds bounds5 = 0,
ArrayBounds bounds6 = 0,
ArrayBounds bounds7 = 0
 

PointerSymbol::PointerSymbol const char *  name,
const Type type,
FORMAL_BOOL  formal,
SAVED_BOOL  saved,
GLOBAL_BOOL  global,
ArrayBounds bounds1 = 0,
ArrayBounds bounds2 = 0,
ArrayBounds bounds3 = 0,
ArrayBounds bounds4 = 0,
ArrayBounds bounds5 = 0,
ArrayBounds bounds6 = 0,
ArrayBounds bounds7 = 0
 

PointerSymbol::PointerSymbol const PointerSymbol vsym  )  [inline]
 

Definition at line 149 of file PointerSymbol.h.

PointerSymbol::~PointerSymbol  )  [virtual]
 

... Nothing to do

Definition at line 2377 of file Symbol.cc.


Member Function Documentation

PointerSymbol & PointerSymbol::operator= const PointerSymbol vsym  ) 
 

Definition at line 2383 of file Symbol.cc.

const Symbol & PointerSymbol::assoc_variable  )  const [virtual]
 

... This return should never happen.

Reimplemented from Symbol.

Definition at line 2427 of file Symbol.cc.

Symbol & PointerSymbol::assoc_variable  )  [virtual]
 

... This return should never happen.

Reimplemented from Symbol.

Definition at line 2433 of file Symbol.cc.

int PointerSymbol::is_pointer  )  const [inline, virtual]
 

Reimplemented from VariableSymbol.

Definition at line 158 of file PointerSymbol.h.

Symbol * PointerSymbol::clone  )  const [virtual]
 

Clone constructor -- returns base pointer to a new clone of this Symbol.

Reimplemented from VariableSymbol.

Definition at line 2410 of file Symbol.cc.

References VariableSymbol::_common, VariableSymbol::_equivalence, and PointerSymbol().

Symbol * PointerSymbol::clone_all  )  const [virtual]
 

Clone constructor -- returns base pointer to a new clone of this Symbol.

Reimplemented from VariableSymbol.

Definition at line 2421 of file Symbol.cc.

References PointerSymbol().

void PointerSymbol::print ostream &  o  )  const [virtual]
 

Print onto stream 'o'.

... the _type field

... the _formal field

... the _allocatable field

... the _global field

... the _saved field

... the _equivalence field

... the _common field

... the _dim field

... the _shared_dim field

... the _overflow field

Reimplemented from VariableSymbol.

Definition at line 2439 of file Symbol.cc.

References VariableSymbol::is_array(), VariableSymbol::is_shared(), CommonBlock::name_ref(), Equivalence::name_ref(), and Symbol::name_ref().

virtual void PointerSymbol::fill_in const BinRep binstr,
ExprTable exprs,
const Dictionary< VoidPtrDef > &  stmts,
const Dictionary< VoidPtrDef > &  commons,
const Dictionary< VoidPtrDef > &  equivalences
[virtual]
 

Fill in all relevant info from a binstr object.

Reimplemented from VariableSymbol.

int PointerSymbol::structures_OK  )  const [virtual]
 

Check the structure of the data for errors or inconsistency Return 0 and print error message if problems found, otherwise return 1 without message.

Reimplemented from VariableSymbol.

Definition at line 2521 of file Symbol.cc.

void PointerSymbol::exchange_convert VDL vdl  )  [virtual]
 

Convert the Symbol into the exchange format.

Reimplemented from VariableSymbol.

Definition at line 2501 of file Symbol.cc.

References VariableSymbol::exchange_convert(), and Symbol::exchange_convert().

void PointerSymbol::relink_dptrs ProgramUnit p  )  [virtual]
 

Change all pointers found in a PointerSymbol element to point into the given ProgramUnit.

Reimplemented from VariableSymbol.

Definition at line 2536 of file Symbol.cc.

References Iterator< T >::current(), Equivalence::find_ref(), ArrayBounds::lower_ref(), Symbol::name_ref(), CommonBlock::name_ref(), Equivalence::name_ref(), Expression::relink_eptrs(), ArrayBounds::upper_ref(), and Iterator< T >::valid().


The documentation for this class was generated from the following files:
 © 1995-2005 University of Illinois, Urbana-Champaign. All rights reserved.  Fri Mar 25 23:07:53 2005