# PhasicFlow: IOfileHeader Class Reference
PhasicFlow is an open-source parallel DEM (discrete element method) package for simulating granular flow. It is developed in C++ and can be exectued on both GPU (like CUDA) and CPU.

IOfileHeader Class Reference
Inheritance diagram for IOfileHeader:
[legend]
Collaboration diagram for IOfileHeader:
[legend]

## Public Member Functions

| IOfileHeader (const objectFile &objf)
const word & | objectName () const
const word & | objectType () const
virtual const repository * | owner () const
virtual bool | isIncluded (const word &objName) const
virtual bool | isExcluded (const word &objName) const
fileSystem | path () const
bool | outFileBinary () const
bool | inFileBinary () const
bool | headerOk (bool silent=false)
bool | implyRead () const
| Imply read. More...
bool | implyWrite () const
| Imply write. More...
bool | fileExist () const
| Check if file exists. More...
bool | readIfPresent () const
| Check read if present. More...
bool | writeHeader () const
| Check if the header should be written to file True: on master + implyWrite + readWriteHeader = true False: otherwise. More...
bool | writeHeader (iOstream &os, const word &typeName, bool forceWrite=false) const
| Write the header to the file , typeName comes from caller. More...
bool | writeHeader (iOstream &os, bool forceWrite=false) const
| Write the header to the file, typeName comes from the one read from file. More...
bool | readHeader () const
| Check if header should be read from file. More...
bool | readHeader (iIstream &is, bool silent=false)
| Read the header in the file. More...
bool | writeBanner (iOstream &os) const
| write the banner More...
bool | writeSeparator (iOstream &os) const
| wirte a separator line More...
Public Member Functions inherited from objectFile
| objectFile (const word &name)
| objectFile (const word &name, const fileSystem &localPath, const readFlag &rf=readFlag::READ_NEVER, const writeFlag &wf=writeFlag::WRITE_NEVER, bool rwHeader=true)
| objectFile (const objectFile &src)=default
| objectFile (objectFile &&src)=default
objectFile & | operator= (const objectFile &rhs)=default
objectFile & | operator= (objectFile &&rhs)=default
virtual | ~objectFile ()=default
virtual const word & | name () const
virtual const fileSystem & | localPath () const
readFlag | rFlag () const
writeFlag | wFlag () const
bool | isReadAlways () const
bool | isReadNever () const
bool | isReadIfPresent () const
bool | isWriteAlways () const
bool | isWriteNever () const
bool | readWriteHeader () const

## Protected Member Functions

uniquePtr< iFstream > | inStream () const
uniquePtr< oFstream > | outStream () const
uniquePtr< oFstream > | dummyOutStream () const

## Protected Attributes

word | objectName_
word | objectType_
word | fileFormat_ = "ASCII"
| file format read from file More...

## Additional Inherited Members

Public Types inherited from objectFile
enum | readFlag { READ_ALWAYS, READ_NEVER, READ_IF_PRESENT }
enum | writeFlag { WRITE_ALWAYS, WRITE_NEVER }

## Detailed Description

Definition at line 35 of file IOfileHeader.hpp.

## Constructor & Destructor Documentation

## IOfileHeader()

IOfileHeader | ( | const objectFile & | objf | ) |

Definition at line 58 of file IOfileHeader.cpp.

## Member Function Documentation

## inStream()

pFlow::uniquePtr< pFlow::iFstream > inStream | ( |  | ) | const

protected

Definition at line 24 of file IOfileHeader.cpp.

References IOfileHeader::fileExist(), IOfileHeader::inFileBinary(), and IOfileHeader::path().

Here is the call graph for this function:

## outStream()

pFlow::uniquePtr< pFlow::oFstream > outStream | ( |  | ) | const

protected

Definition at line 32 of file IOfileHeader.cpp.

## dummyOutStream()

pFlow::uniquePtr< pFlow::oFstream > dummyOutStream | ( |  | ) | const

protected

Definition at line 45 of file IOfileHeader.cpp.

References pFlow::CWD().

Here is the call graph for this function:

## objectName()

const word& objectName | ( |  | ) | const

inline

Definition at line 69 of file IOfileHeader.hpp.

References IOfileHeader::objectName_.

Referenced by pFlow::PFtoVTK::convertIntPointField(), pFlow::PFtoVTK::convertRealTypePointField(), pFlow::PFtoVTK::convertRealx3TypePointField(), pFlow::TSFtoVTK::convertRealx3TypetriSurfaceField(), pFlow::TSFtoVTK::convertRealx3TypetriSurfaceFieldSeparate(), pFlow::PFtoVTK::convertTimeFolderPointFields(), and pFlow::PFtoVTK::convertTimeFolderPointFieldsSelected().

Here is the caller graph for this function:

## objectType()

const word& objectType | ( |  | ) | const

inline

Definition at line 75 of file IOfileHeader.hpp.

References IOfileHeader::objectType_.

Referenced by pFlow::PFtoVTK::convertIntPointField(), pFlow::PFtoVTK::convertRealTypePointField(), pFlow::PFtoVTK::convertRealx3TypePointField(), pFlow::TSFtoVTK::convertRealx3TypetriSurfaceField(), pFlow::TSFtoVTK::convertRealx3TypetriSurfaceFieldSeparate(), pFlow::PFtoVTK::convertTimeFolderPointFields(), and pFlow::PFtoVTK::convertTimeFolderPointFieldsSelected().

Here is the caller graph for this function:

## owner()

virtual const repository* owner | ( |  | ) | const

inlinevirtual

Reimplemented in IOobject.

Definition at line 82 of file IOfileHeader.hpp.

## isIncluded()

virtual bool isIncluded | ( | const word & | objName | ) | const

inlinevirtual

Reimplemented in IOobject.

Definition at line 88 of file IOfileHeader.hpp.

## isExcluded()

virtual bool isExcluded | ( | const word & | objName | ) | const

inlinevirtual

Reimplemented in IOobject.

Definition at line 94 of file IOfileHeader.hpp.

## path()

pFlow::fileSystem path | ( |  | ) | const

Definition at line 63 of file IOfileHeader.cpp.

References fileSystem::path().

Referenced by fileDictionary::fileDictionary(), geometry::geometry(), IOfileHeader::inStream(), and pointStructure::pointStructure().

Here is the call graph for this function:
Here is the caller graph for this function:

## outFileBinary()

bool outFileBinary | ( |  | ) | const

Definition at line 79 of file IOfileHeader.cpp.

## inFileBinary()

bool inFileBinary | ( |  | ) | const

Definition at line 87 of file IOfileHeader.cpp.

References pFlow::toUpper().

Referenced by IOfileHeader::inStream().

Here is the call graph for this function:
Here is the caller graph for this function:

## headerOk()

bool headerOk | ( | bool | silent = `false` | ) |

Definition at line 92 of file IOfileHeader.cpp.

References pFlow::endl(), and warningInFunction.

Referenced by pFlow::PFtoVTK::convertTimeFolderPointFields(), pFlow::PFtoVTK::convertTimeFolderPointFieldsSelected(), pFlow::TSFtoVTK::convertTimeFolderTriSurfaceFields(), pFlow::TSFtoVTK::convertTimeFolderTriSurfaceFieldsSeparate(), pFlow::TSFtoVTK::convertTimeFolderTriSurfaceFieldsSingle(), and readFromTimeFolder::fieldExists().

Here is the call graph for this function:
Here is the caller graph for this function:

## implyRead()

bool implyRead | ( |  | ) | const

Imply read.

Definition at line 121 of file IOfileHeader.cpp.

Referenced by insertion::insertion().

Here is the caller graph for this function:

## implyWrite()

bool implyWrite | ( |  | ) | const

Imply write.

Definition at line 127 of file IOfileHeader.cpp.

## fileExist()

bool fileExist | ( |  | ) | const

Check if file exists.

Definition at line 134 of file IOfileHeader.cpp.

Referenced by IOfileHeader::inStream().

Here is the caller graph for this function:

## readIfPresent()

bool readIfPresent | ( |  | ) | const

Check read if present.

Definition at line 139 of file IOfileHeader.cpp.

## writeHeader() [1/3]

bool writeHeader | ( |  | ) | const

Check if the header should be written to file True: on master + implyWrite + readWriteHeader = true False: otherwise.

Definition at line 144 of file IOfileHeader.cpp.

## writeHeader() [2/3]

bool writeHeader | ( | iOstream & | os,
|  | const word & | typeName,
|  | bool | forceWrite = `false`
| ) |  | const

Write the header to the file , typeName comes from caller.

Definition at line 154 of file IOfileHeader.cpp.

References IOstream::fatalCheck(), and iOstream::writeWordEntry().

Here is the call graph for this function:

## writeHeader() [3/3]

bool writeHeader | ( | iOstream & | os,
|  | bool | forceWrite = `false`
| ) |  | const

Write the header to the file, typeName comes from the one read from file.

Definition at line 184 of file IOfileHeader.cpp.

## readHeader() [1/2]

bool readHeader | ( |  | ) | const

Check if header should be read from file.

Definition at line 189 of file IOfileHeader.cpp.

## readHeader() [2/2]

bool readHeader | ( | iIstream & | is,
|  | bool | silent = `false`
| ) |  |

Read the header in the file.

Definition at line 196 of file IOfileHeader.cpp.

References pFlow::endl(), iIstream::findTokenAndNextSilent(), IOstream::name(), and warningInFunction.

Here is the call graph for this function:

## writeBanner()

bool writeBanner | ( | iOstream & | os | ) | const

write the banner

Definition at line 238 of file IOfileHeader.cpp.

## writeSeparator()

bool writeSeparator | ( | iOstream & | os | ) | const

wirte a separator line

Definition at line 249 of file IOfileHeader.cpp.

## Member Data Documentation

## objectName_

word objectName_

protected

Definition at line 45 of file IOfileHeader.hpp.

Referenced by IOfileHeader::objectName().

## objectType_

word objectType_

protected

Definition at line 48 of file IOfileHeader.hpp.

Referenced by IOfileHeader::objectType().

## fileFormat_

word fileFormat_ = "ASCII"

protected

file format read from file

Definition at line 51 of file IOfileHeader.hpp.

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

- src/phasicFlow/repository/IOobject/IOfileHeader.hpp
- src/phasicFlow/repository/IOobject/IOfileHeader.cpp