Polaris: FormatDB Class Reference

FormatDB Class Reference

Database of FORTRAN Formats. More...

#include <FormatDB.h>

Inheritance diagram for FormatDB:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 FormatDB (const ProgramUnit &pgm)
 FormatDB (const FormatDB &other)
virtual ~FormatDB ()
 FormatDB (const ProgramUnit &pgm, const BinRep &binstr)
FormatDBoperator= (const FormatDB &fdb)
virtual FormatDBclone () const
void write (ostream &o, int space_for_label, int max_line_len) const
 Write the elements of FormatDB.
void ins (Format *elem, int replace_if_already_exists=0)
 Insert an element into FormatDB.
void relabel (int value, int new_value)
 Relabel element with a statement label of value to have a statement label of new_value.
void print (ostream &o) const
 Print the elements of FormatDB.
virtual void exchange_convert (VDL &vdl)
 Convert the FormatDB 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.

Friends

class ProgramUnit
ostream & operator<< (ostream &o, const FormatDB &fdb)

Detailed Description

Database of FORTRAN Formats.

Polaris C++ VDL

See also:
FormatDB.h

FormatDB.h

FormatDB.cc

Description

FormatDB is a database for FORTRAN formats which includes a constructor from a binstr.

Definition at line 31 of file FormatDB.h.


Constructor & Destructor Documentation

FormatDB::FormatDB const ProgramUnit pgm  )  [inline]
 

Definition at line 72 of file FormatDB.h.

References register_instance().

Referenced by clone().

FormatDB::FormatDB const FormatDB other  )  [inline]
 

Definition at line 82 of file FormatDB.h.

References Database< S, T >::operator=(), and register_instance().

FormatDB::~FormatDB  )  [virtual]
 

Definition at line 20 of file FormatDB.cc.

References unregister_instance().

FormatDB::FormatDB const ProgramUnit pgm,
const BinRep binstr
 

... Skip past the 'F' at the beginning, taking only the ... (ascii) integer

Definition at line 121 of file FormatDB.cc.

References dbx_format_debug_level, Database< S, T >::ins(), and register_instance().


Member Function Documentation

FormatDB & FormatDB::operator= const FormatDB fdb  ) 
 

Definition at line 63 of file FormatDB.cc.

References Database< S, T >::operator=().

FormatDB * FormatDB::clone  )  const [virtual]
 

Definition at line 70 of file FormatDB.cc.

References FormatDB().

Referenced by ProgramUnit::operator=().

void FormatDB::write ostream &  o,
int  space_for_label,
int  max_line_len
const
 

Write the elements of FormatDB.

Definition at line 44 of file FormatDB.cc.

References blank_wide_output(), KeyIterator< S, T >::current_data(), line, split_line(), and Format::value().

Referenced by ProgramUnit::display(), and ProgramUnit::write().

void FormatDB::ins Format elem,
int  replace_if_already_exists = 0
 

Insert an element into FormatDB.

Referenced by relabel().

void FormatDB::relabel int  value,
int  new_value
 

Relabel element with a statement label of value to have a statement label of new_value.

WARNING: this is a private member access!

Reinsert format with new value

Definition at line 94 of file FormatDB.cc.

References Format::_value, Database< int, Format >::grab(), and ins().

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

Print the elements of FormatDB.

Reimplemented from Database< int, Format >.

Definition at line 28 of file FormatDB.cc.

References KeyIterator< S, T >::current_data(), and KeyIterator< S, T >::valid().

void FormatDB::exchange_convert VDL vdl  )  [virtual]
 

Convert the FormatDB into the exchange format.

Definition at line 162 of file FormatDB.cc.

References BinRep::find_ref(), Format::format_ref(), Set< T >::ins(), List< T >::ins_last(), BinRep::to_set(), BinRep::to_tuple(), and Format::value().

Referenced by ProgramUnit::exchange().

int FormatDB::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.

Reimplemented from BaseMapRoot.

Definition at line 111 of file FormatDB.cc.


Friends And Related Function Documentation

friend class ProgramUnit [friend]
 

Definition at line 33 of file FormatDB.h.

ostream& operator<< ostream &  o,
const FormatDB fdb
[friend]
 

Definition at line 93 of file FormatDB.h.


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