Loading...
Searching...
No Matches
UPstream::File::Impl Class Reference

Public Types

enum  states : int { CLOSED = 0 , READ , WRITE , ATOMIC_WRITE }
 The file states. More...

Public Member Functions

 Impl ()
 Default construct.
const MPI_File & handle () const noexcept
MPI_File & handle () noexcept
const fileNamename () const noexcept
fileNamename () noexcept
int state (states val) noexcept
bool master () const noexcept
 Is rank 0 ? (master rank).
int rank () const noexcept
 Get the associated rank.
void rank (int val) noexcept
 Set the associated rank.
bool is_open () const noexcept
bool is_read () const noexcept
bool is_atomic () const noexcept
bool is_write () const noexcept
bool checkReadable (const char *what) const
 Assert is_read() or FatalError.
bool checkWritable (const char *what) const
 Assert is_write() or FatalError.

Detailed Description

Definition at line 33 of file UPstreamFile.C.

Member Enumeration Documentation

◆ states

enum states : int

The file states.

Enumerator
CLOSED 
READ 
WRITE 
ATOMIC_WRITE 

Definition at line 104 of file UPstreamFile.C.

Constructor & Destructor Documentation

◆ Impl()

Impl ( )
inline

Default construct.

Definition at line 111 of file UPstreamFile.C.

References CLOSED.

Member Function Documentation

◆ handle() [1/2]

const MPI_File & handle ( ) const
inlinenoexcept

Definition at line 122 of file UPstreamFile.C.

References Foam::noexcept.

◆ handle() [2/2]

MPI_File & handle ( )
inlinenoexcept

Definition at line 123 of file UPstreamFile.C.

References Foam::noexcept.

◆ name() [1/2]

const fileName & name ( ) const
inlinenoexcept

Definition at line 126 of file UPstreamFile.C.

References Foam::noexcept.

Referenced by checkReadable(), and checkWritable().

Here is the caller graph for this function:

◆ name() [2/2]

fileName & name ( )
inlinenoexcept

Definition at line 127 of file UPstreamFile.C.

References Foam::noexcept.

◆ state()

int state ( states val)
inlinenoexcept

Definition at line 130 of file UPstreamFile.C.

◆ master()

bool master ( ) const
inlinenoexcept

Is rank 0 ? (master rank).

Definition at line 140 of file UPstreamFile.C.

References Foam::noexcept.

◆ rank() [1/2]

int rank ( ) const
inlinenoexcept

Get the associated rank.

Definition at line 145 of file UPstreamFile.C.

References Foam::noexcept.

◆ rank() [2/2]

void rank ( int val)
inlinenoexcept

Set the associated rank.

Definition at line 150 of file UPstreamFile.C.

◆ is_open()

bool is_open ( ) const
inlinenoexcept

Definition at line 156 of file UPstreamFile.C.

References Foam::noexcept.

◆ is_read()

bool is_read ( ) const
inlinenoexcept

Definition at line 159 of file UPstreamFile.C.

References Foam::noexcept, and READ.

Referenced by checkReadable().

Here is the caller graph for this function:

◆ is_atomic()

bool is_atomic ( ) const
inlinenoexcept

Definition at line 165 of file UPstreamFile.C.

References ATOMIC_WRITE, and Foam::noexcept.

◆ is_write()

bool is_write ( ) const
inlinenoexcept

Definition at line 171 of file UPstreamFile.C.

References ATOMIC_WRITE, Foam::noexcept, and WRITE.

Referenced by checkWritable().

Here is the caller graph for this function:

◆ checkReadable()

bool checkReadable ( const char * what) const
inline

Assert is_read() or FatalError.

Definition at line 179 of file UPstreamFile.C.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, FOAM_UNLIKELY, is_read(), name(), and Foam::nl.

Here is the call graph for this function:

◆ checkWritable()

bool checkWritable ( const char * what) const
inline

Assert is_write() or FatalError.

Definition at line 195 of file UPstreamFile.C.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, FOAM_UNLIKELY, is_write(), name(), and Foam::nl.

Here is the call graph for this function:

The documentation for this class was generated from the following files: