Polaris: ProgramSymbol Class Reference

ProgramSymbol Class Reference

a Symbol of class PROGRAM_CLASS More...

#include <ProgramSymbol.h>

Inheritance diagram for ProgramSymbol:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 ProgramSymbol (const char *name, Statement *entry)
 ProgramSymbol (const ProgramSymbol &psym)
ProgramSymboloperator= (const ProgramSymbol &psym)
 class ProgramSymbol
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 ~ProgramSymbol ()
virtual const Statemententry_ref () const
virtual Statemententry_ref ()
virtual void entry (Statement *s)
virtual const Typetype () const
 (aborts if called for a symbol that doesn't use a type)
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.
virtual void exchange_convert (VDL &vdl)
 Convert the Symbol into the exchange format.
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 relink_dptrs (ProgramUnit &p)
 Change all pointers in this ProgramSymbol element to point into the given ProgramUnit.

Protected Attributes

Statement_entry
 Note: This is only a pointer to a statement which resides elsewhere.

Detailed Description

a Symbol of class PROGRAM_CLASS

Polaris C++ VDL

See also:
Symbol.h

Symbol.h

ProgramSymbol.h

Symbol.cc

Description

A ProgramSymbol is a Symbol representing the identifier for a program unit which begins with the Fortran keyword PROGRAM

The only additional field it adds to Symbol's fields is the entry field, a pointer to the entry statement for this Symbol.

The only virtual methods inherited from Symbol which are valid for this class (which will not give errors messages, with the exception of Symbol::is_array()) are those which are explicitly overridden here.

See Symbol for more information.

Definition at line 40 of file ProgramSymbol.h.


Constructor & Destructor Documentation

ProgramSymbol::ProgramSymbol const char *  name,
Statement entry
[inline]
 

Definition at line 92 of file ProgramSymbol.h.

References _entry, entry(), and PROGRAM_CLASS.

Referenced by clone(), and clone_all().

ProgramSymbol::ProgramSymbol const ProgramSymbol psym  )  [inline]
 

Definition at line 99 of file ProgramSymbol.h.

References PROGRAM_CLASS.

ProgramSymbol::~ProgramSymbol  )  [virtual]
 

... nothing to do (_entry should NOT be deleted)

Definition at line 699 of file Symbol.cc.


Member Function Documentation

ProgramSymbol & ProgramSymbol::operator= const ProgramSymbol psym  ) 
 

class ProgramSymbol

Definition at line 671 of file Symbol.cc.

References _entry.

Symbol * ProgramSymbol::clone  )  const [virtual]
 

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

Implements Symbol.

Definition at line 687 of file Symbol.cc.

References ProgramSymbol().

Symbol * ProgramSymbol::clone_all  )  const [virtual]
 

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

Implements Symbol.

Definition at line 693 of file Symbol.cc.

References ProgramSymbol().

const Statement * ProgramSymbol::entry_ref  )  const [virtual]
 

Reimplemented from Symbol.

Definition at line 705 of file Symbol.cc.

References _entry.

Statement * ProgramSymbol::entry_ref  )  [virtual]
 

Reimplemented from Symbol.

Definition at line 711 of file Symbol.cc.

References _entry.

void ProgramSymbol::entry Statement s  )  [virtual]
 

... Old _entry should NOT be deleted

Reimplemented from Symbol.

Definition at line 717 of file Symbol.cc.

References _entry.

Referenced by ProgramSymbol().

const Type & ProgramSymbol::type  )  const [virtual]
 

(aborts if called for a symbol that doesn't use a type)

Type t(make_type(VOID_TYPE)); return make_type(VOID_TYPE);

Reimplemented from Symbol.

Definition at line 724 of file Symbol.cc.

References make_type(), and VOID_TYPE.

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

Print onto stream 'o'.

... the _entry field

... the _overflow field

Implements Symbol.

Definition at line 733 of file Symbol.cc.

References _entry, and Statement::tag().

virtual void ProgramSymbol::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.

Implements Symbol.

void ProgramSymbol::exchange_convert VDL vdl  )  [virtual]
 

Convert the Symbol into the exchange format.

Reimplemented from Symbol.

Definition at line 753 of file Symbol.cc.

References Symbol::exchange_convert(), BinRep::find_ref(), Set< T >::ins(), List< T >::ins_last(), Symbol::name_ref(), BinRep::to_set(), and BinRep::to_tuple().

int ProgramSymbol::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 Symbol.

Definition at line 815 of file Symbol.cc.

References _entry.

void ProgramSymbol::relink_dptrs ProgramUnit p  )  [virtual]
 

Change all pointers in this ProgramSymbol element to point into the given ProgramUnit.

Implements RelinkableDef.

Definition at line 826 of file Symbol.cc.

References _entry, and Statement::tag().


Member Data Documentation

Statement* ProgramSymbol::_entry [protected]
 

Note: This is only a pointer to a statement which resides elsewhere.

A value of 0 means there is no entry.

Definition at line 44 of file ProgramSymbol.h.

Referenced by entry(), entry_ref(), operator=(), print(), ProgramSymbol(), relink_dptrs(), and structures_OK().


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:55 2005