Polaris: FormatExpr Class Reference

FormatExpr Class Reference

Expression describing the s_control of an I/O statement. More...

#include <FormatExpr.h>

Inheritance diagram for FormatExpr:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 FormatExpr (const Format &format)
 FormatExpr (const FormatExpr &e)
virtual ~FormatExpr ()
 Note: The following data fields are aliased: format = data.
virtual FormatExproperator= (const FormatExpr &e)
const Formatformat () const
Formatformat ()
void format (Format &format)
 Access the format associated with this expression.
virtual void relink_eptrs (ProgramUnit &p)
 Change pointer in FormatExpr to point into the given ProgramUnit.
virtual Expressionclone () const
 Return a copy of myself.
virtual void print_debug (ostream &o, Boolean debug) const
 debug indicates whether it should contain extra fields
virtual int structures_OK () const
 Return 1 if my structures are in a valid state.
virtual void convert (BinRep &exprSet, Symtab &symtab)
 Read in the values of my fields and my subexpressions from the given BinRep object.
virtual const ExprSignatureupdate_signature ()
virtual int node_compare (const Expression &ex) const
 See Expression.h.
virtual int exchange_expr (VDL &vdl)
 Create a node in the "expression" member and return the index.

Protected Attributes

Format_format_ptr

Detailed Description

Expression describing the s_control of an I/O statement.

Polaris Expression

See also:
Expression/FormatExpr.h

Expression/FormatExpr.h

Expression/Expression.cc

Description

A FormatExpr is used to describe the s_control of an I/O statement. The FormatExpr is used when the rhs of a an s_control_type pair is a pointer to a Format class, i.e. representing a FORMAT statement label, such as in WRITE(*, 100), where the 100 would be represented as a FormatExpr pointing to the Format object with tag '100'.

The Format expression does not exist in Delta. It is used when a write statement uses the line number of a format statement. The FormatExpr contains a single format field which contains a pointer to a Format class object.

Definition at line 37 of file FormatExpr.h.


Constructor & Destructor Documentation

FormatExpr::FormatExpr const Format format  )  [inline]
 

Definition at line 73 of file FormatExpr.h.

References _format_ptr, format(), FORMAT_OP, make_type(), and VOID_TYPE.

Referenced by clone().

FormatExpr::FormatExpr const FormatExpr e  )  [inline]
 

Definition at line 80 of file FormatExpr.h.

References _format_ptr, and e.

FormatExpr::~FormatExpr  )  [virtual]
 

Note: The following data fields are aliased: format = data.

... nothing to do

Definition at line 4423 of file Expression.cc.


Member Function Documentation

FormatExpr & FormatExpr::operator= const FormatExpr e  )  [inline, virtual]
 

Definition at line 88 of file FormatExpr.h.

References _format_ptr, and e.

const Format & FormatExpr::format  )  const [virtual]
 

Reimplemented from Expression.

Definition at line 4435 of file Expression.cc.

References _format_ptr.

Referenced by format(), FormatExpr(), and update_signature().

Format & FormatExpr::format  )  [virtual]
 

Reimplemented from Expression.

Definition at line 4441 of file Expression.cc.

References _format_ptr.

void FormatExpr::format Format format  )  [virtual]
 

Access the format associated with this expression.

Reimplemented from Expression.

Definition at line 4447 of file Expression.cc.

References _format_ptr, and format().

void FormatExpr::relink_eptrs ProgramUnit p  )  [virtual]
 

Change pointer in FormatExpr to point into the given ProgramUnit.

Reimplemented from Expression.

Definition at line 4495 of file Expression.cc.

References _format_ptr, label(), and Format::value().

Expression * FormatExpr::clone  )  const [virtual]
 

Return a copy of myself.

Implements Expression.

Definition at line 4429 of file Expression.cc.

References FormatExpr().

virtual void FormatExpr::print_debug ostream &  o,
Boolean  debug
const [virtual]
 

debug indicates whether it should contain extra fields

Implements Expression.

int FormatExpr::structures_OK  )  const [virtual]
 

Return 1 if my structures are in a valid state.

Implements Expression.

Definition at line 4453 of file Expression.cc.

References True.

virtual void FormatExpr::convert BinRep exprSet,
Symtab symtab
[virtual]
 

Read in the values of my fields and my subexpressions from the given BinRep object.

Convert(BinRep) expects the BinRep to be referencing an expression set of the same type as the expression. On return, all data from the expression set has been inserted into the appropriate fields in the expression object. NOTE that this converts the expression to an intermediate form which may contain TableExpr objects.

Implements Expression.

const ExprSignature & FormatExpr::update_signature  )  [virtual]
 

... _signature_live().merge( (int) type().data_type() ); ... _signature_live().merge( type().size() );

Reimplemented from Expression.

Definition at line 7200 of file Expression.cc.

References Expression::_signature_live(), ExprSignature::clear(), format(), ExprSignature::merge(), Expression::op(), Expression::signature(), and Expression::value().

int FormatExpr::node_compare const Expression ex  )  const [virtual]
 

See Expression.h.

Reimplemented from Expression.

Definition at line 7318 of file Expression.cc.

References Expression::value().

int FormatExpr::exchange_expr VDL vdl  )  [virtual]
 

Create a node in the "expression" member and return the index.

Reimplemented from Expression.

Definition at line 4460 of file Expression.cc.

References Expression::exchange_expr(), BinRep::find_ref(), Set< T >::ins(), List< T >::ins_last(), and BinRep::to_tuple().


Member Data Documentation

Format* FormatExpr::_format_ptr [protected]
 

Definition at line 65 of file FormatExpr.h.

Referenced by format(), FormatExpr(), operator=(), and relink_eptrs().


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