FortranTypes_f_open_file.hpp File Reference

#include "Moocho_ConfigDefs.hpp"
#include "Teuchos_F77_wrappers.h"

Include dependency graph for FortranTypes_f_open_file.hpp:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  FortranTypes

Classes

class  FortranTypes::InvalidFileNameException
 Thrown if the file name is not a valid ASCII string. More...
class  FortranTypes::OpenException
 Thrown if the open operation fails. More...

Open a Fortran file.

enum  EOpenStatus { OPEN_OLD = 0, OPEN_NEW = 1, OPEN_SCRATCH = 2, OPEN_UNKNOWN = 3 }
  More...
enum  EOpenForm { OPEN_FORMATTED = 0, OPEN_UNFORMATTED = 1 }
  More...
enum  EOpenBlank { OPEN_NULL = 0, OPEN_ZERO = 1 }
  More...
enum  EOpenAccess { OPEN_SEQUENTIAL = 0, OPEN_DIRECT = 1 }
  More...
void f_open_file (const f_int iunit, const char file[], EOpenStatus status=OPEN_UNKNOWN, EOpenForm form=OPEN_FORMATTED, EOpenBlank blank=OPEN_NULL, EOpenAccess access=OPEN_SEQUENTIAL, f_int recl=-1)
void f_close_file (const f_int iunit, bool keep=true)


Enumeration Type Documentation

enum EOpenStatus
 

Enumeration values:
OPEN_OLD 
OPEN_NEW 
OPEN_SCRATCH 
OPEN_UNKNOWN 

Definition at line 42 of file FortranTypes_f_open_file.hpp.

enum EOpenForm
 

Enumeration values:
OPEN_FORMATTED 
OPEN_UNFORMATTED 

Definition at line 45 of file FortranTypes_f_open_file.hpp.

enum EOpenBlank
 

Enumeration values:
OPEN_NULL 
OPEN_ZERO 

Definition at line 47 of file FortranTypes_f_open_file.hpp.

enum EOpenAccess
 

Enumeration values:
OPEN_SEQUENTIAL 
OPEN_DIRECT 

Definition at line 49 of file FortranTypes_f_open_file.hpp.


Function Documentation

void FortranTypes::f_open_file const f_int  iunit,
const char  file[],
EOpenStatus  status = OPEN_UNKNOWN,
EOpenForm  form = OPEN_FORMATTED,
EOpenBlank  blank = OPEN_NULL,
EOpenAccess  access = OPEN_SEQUENTIAL,
f_int  recl = -1
 

Open a Fortran file given its name and unit number.

If successful #iunit# is returned for the opened file.

The standard options to Fortran OPEN(...) are included. The only mandatory option to set is for the file name in FILE.

The length of the file name must be <= 100 characters long.

Note that all of the options are optional but if you set access == OPEN_DIRECT you must set recl to some value greater than zero. See Metcalf, 1990, p. 127.

If #file# is not a valid ASCII string then the exception InvalidFileNameException will be thrown

If the file could not be opened for some reason then the exception OpenException will be thrown.

Definition at line 46 of file FortranTypes_f_open_file.cpp.

void FortranTypes::f_close_file const f_int  iunit,
bool  keep = true
 

Close a Fortran file given its unit number.

If successful #iunit# is returned for the opened file.

The standard options to Fortran OPEN(...) are included. The only mandatory option to set is for the file name in FILE.

The length of the file name must be <= 100 characters long.

Note that all of the options are optional but if you set access == OPEN_DIRECT you must set recl to some value greater than zero. See Metcalf, 1990, p. 127.

If #file# is not a valid ASCII string then the exception InvalidFileNameException will be thrown

If the file could not be opened for some reason then the exception OpenException will be thrown.

Definition at line 76 of file FortranTypes_f_open_file.cpp.


Generated on Thu Sep 18 12:35:42 2008 for MOOCHO (Single Doxygen Collection) by doxygen 1.3.9.1