Polaris: SymbolicConstantSymbol Class Reference

SymbolicConstantSymbol Class Reference

a Symbol of class SYMBOLIC_CONSTANT_CLASS More...

#include <SymbolicConstantSymbol.h>

Inheritance diagram for SymbolicConstantSymbol:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 SymbolicConstantSymbol (const char *name, Expression *expr)
 SymbolicConstantSymbol (const SymbolicConstantSymbol &scsym)
SymbolicConstantSymboloperator= (const SymbolicConstantSymbol &scsym)
 Check this function out.
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 ~SymbolicConstantSymbol ()
virtual const Typetype () const
 Note that you can check the type for this class but not change it, since the type depends directly on the expression field.
virtual const Expressionexpr_ref () const
virtual Expressionexpr_ref ()
virtual void expr (Expression *e)
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 SymbolicConstantSymbol element to point into the given ProgramUnit.

Protected Attributes

Expression_expr
Type _type
 Note: This expression is "live" -- i.e., it is owned by this class, and is not just a pointer to an expression residing elsewhere.

Detailed Description

a Symbol of class SYMBOLIC_CONSTANT_CLASS

Polaris C++ VDL

See also:
Symbol.h

Symbol.h

SymbolicConstantSymbol.h

Symbol.cc

Description

A SymbolicConstantSymbol is a Symbol representing a Fortran symbolic constant (i.e. a constant defined in a PARAMETER statement).

The additional fields it adds to Symbol's fields are the type and expr fields.

The type field indicates the type of variable.

The expr field is an Expression which gives the symbolic value of the SymbolicConstantSymbol

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 44 of file SymbolicConstantSymbol.h.


Constructor & Destructor Documentation

SymbolicConstantSymbol::SymbolicConstantSymbol const char *  name,
Expression expr
[inline]
 

< PARAMETERs are always scalars

Definition at line 102 of file SymbolicConstantSymbol.h.

References _expr, _type, expr(), Type::redimension(), and SYMBOLIC_CONSTANT_CLASS.

Referenced by clone(), and clone_all().

SymbolicConstantSymbol::SymbolicConstantSymbol const SymbolicConstantSymbol scsym  )  [inline]
 

Definition at line 114 of file SymbolicConstantSymbol.h.

References _expr, and SYMBOLIC_CONSTANT_CLASS.

SymbolicConstantSymbol::~SymbolicConstantSymbol  )  [virtual]
 

... Since _expr "lives" in the SymbolicConstantSymbol (it's not a ... pointer to an Expression somewhere else), it must be deleted.

Definition at line 2579 of file Symbol.cc.

References _expr.


Member Function Documentation

SymbolicConstantSymbol & SymbolicConstantSymbol::operator= const SymbolicConstantSymbol scsym  ) 
 

Check this function out.

Definition at line 2622 of file Symbol.cc.

References _expr, _type, and Expression::clone().

Symbol * SymbolicConstantSymbol::clone  )  const [virtual]
 

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

Implements Symbol.

Definition at line 2568 of file Symbol.cc.

References SymbolicConstantSymbol().

Symbol * SymbolicConstantSymbol::clone_all  )  const [virtual]
 

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

Implements Symbol.

Definition at line 2574 of file Symbol.cc.

References SymbolicConstantSymbol().

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

Note that you can check the type for this class but not change it, since the type depends directly on the expression field.

Reimplemented from Symbol.

Definition at line 2591 of file Symbol.cc.

References _expr, and _type.

const Expression * SymbolicConstantSymbol::expr_ref  )  const [virtual]
 

Reimplemented from Symbol.

Definition at line 2599 of file Symbol.cc.

References _expr.

Referenced by exchange_convert().

Expression * SymbolicConstantSymbol::expr_ref  )  [virtual]
 

Reimplemented from Symbol.

Definition at line 2605 of file Symbol.cc.

References _expr.

void SymbolicConstantSymbol::expr Expression e  )  [virtual]
 

Reimplemented from Symbol.

Definition at line 2611 of file Symbol.cc.

References _expr, and e.

Referenced by SymbolicConstantSymbol().

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

Print onto stream 'o'.

... the _type field

... the _expr field

... the _overflow field

Implements Symbol.

Definition at line 2643 of file Symbol.cc.

References _expr, and _type.

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

int SymbolicConstantSymbol::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 2795 of file Symbol.cc.

References _expr.

void SymbolicConstantSymbol::exchange_convert VDL vdl  )  [virtual]
 

Convert the Symbol into the exchange format.

Reimplemented from Symbol.

Definition at line 2665 of file Symbol.cc.

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

void SymbolicConstantSymbol::relink_dptrs ProgramUnit p  )  [virtual]
 

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

Implements RelinkableDef.

Definition at line 2814 of file Symbol.cc.

References _expr, and Expression::relink_eptrs().


Member Data Documentation

Expression* SymbolicConstantSymbol::_expr [protected]
 

Definition at line 46 of file SymbolicConstantSymbol.h.

Referenced by expr(), expr_ref(), operator=(), print(), relink_dptrs(), structures_OK(), SymbolicConstantSymbol(), type(), and ~SymbolicConstantSymbol().

Type SymbolicConstantSymbol::_type [protected]
 

Note: This expression is "live" -- i.e., it is owned by this class, and is not just a pointer to an expression residing elsewhere.

Definition at line 49 of file SymbolicConstantSymbol.h.

Referenced by operator=(), print(), SymbolicConstantSymbol(), and type().


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:08:29 2005