# PhasicFlow: IOobject 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.

IOobject Class Referenceabstract
Inheritance diagram for IOobject:
[legend]
Collaboration diagram for IOobject:
[legend]

## Public Member Functions

virtual word | typeName () const =0
| IOobject (const objectFile &objf, const IOPattern &iop, repository *owner)
| ~IOobject () override
| IOobject (const IOobject &src)=delete
| IOobject (IOobject &&src)=delete
const IOPattern & | ioPattern () const
const repository * | owner () const override
repository * | owner ()
repository * | releaseOwner (bool fromOwner=false)
bool | isIncluded (const word &objName) const override
bool | isExcluded (const word &objName) const override
bool | readObject (bool rdHdr=true)
bool | writeObject () const
bool | readObject (iIstream &is, bool rdHdr=true)
bool | writeObject (iOstream &os) const
virtual bool | write (iOstream &is, const IOPattern &iop) const =0
virtual bool | read (iIstream &is, const IOPattern &iop)=0
Public Member Functions inherited from IOfileHeader
| IOfileHeader (const objectFile &objf)
const word & | objectName () const
const word & | objectType () 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

## Private Attributes

IOPattern | ioPattern_
repository * | owner_

## Additional Inherited Members

Public Types inherited from objectFile
enum | readFlag { READ_ALWAYS, READ_NEVER, READ_IF_PRESENT }
enum | writeFlag { WRITE_ALWAYS, WRITE_NEVER }
Protected Member Functions inherited from IOfileHeader
uniquePtr< iFstream > | inStream () const
uniquePtr< oFstream > | outStream () const
uniquePtr< oFstream > | dummyOutStream () const
Protected Attributes inherited from IOfileHeader
word | objectName_
word | objectType_
word | fileFormat_ = "ASCII"
| file format read from file More...

## Detailed Description

Definition at line 35 of file IOobject.hpp.

## Constructor & Destructor Documentation

## IOobject() [1/3]

IOobject | ( | const objectFile & | objf,
|  | const IOPattern & | iop,
|  | repository * | owner
| ) |  |

Definition at line 26 of file IOobject.cpp.

References repository::addToRepository(), pFlow::endl(), fatalErrorInFunction, fatalExit, repository::name(), and objectFile::name().

Here is the call graph for this function:

## ~IOobject()

~IOobject | ( |  | ) |

override

Definition at line 46 of file IOobject.cpp.

References IOobject::owner_, and repository::removeFromRepository().

Here is the call graph for this function:

## IOobject() [2/3]

IOobject | ( | const IOobject & | src | ) |

delete

## IOobject() [3/3]

IOobject | ( | IOobject && | src | ) |

delete

## Member Function Documentation

## typeName()

virtual word typeName | ( |  | ) | const

pure virtual

Referenced by pFlow::convertRectMeshField().

Here is the caller graph for this function:

## ioPattern()

const IOPattern& ioPattern | ( |  | ) | const

inline

Definition at line 70 of file IOobject.hpp.

References IOobject::ioPattern_.

## owner() [1/2]

const repository* owner | ( |  | ) | const

inlineoverridevirtual

Reimplemented from IOfileHeader.

Definition at line 76 of file IOobject.hpp.

References IOobject::owner_.

## owner() [2/2]

repository* owner | ( |  | ) |

inline

Definition at line 81 of file IOobject.hpp.

References IOobject::owner_.

## releaseOwner()

pFlow::repository * releaseOwner | ( | bool | fromOwner = `false` | ) |

Definition at line 55 of file IOobject.cpp.

References repository::removeFromRepository().

Here is the call graph for this function:

## isIncluded()

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

overridevirtual

Reimplemented from IOfileHeader.

Definition at line 68 of file IOobject.cpp.

## isExcluded()

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

overridevirtual

Reimplemented from IOfileHeader.

Definition at line 76 of file IOobject.cpp.

## readObject() [1/2]

bool readObject | ( | bool | rdHdr = `true` | ) |

Definition at line 83 of file IOobject.cpp.

References pFlow::endl(), and warningInFunction.

Referenced by geometry::geometry(), and pointStructure::pointStructure().

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

## writeObject() [1/2]

bool writeObject | ( |  | ) | const

Definition at line 119 of file IOobject.cpp.

References pFlow::endl(), and warningInFunction.

Here is the call graph for this function:

## readObject() [2/2]

bool readObject | ( | iIstream & | is,
|  | bool | rdHdr = `true`
| ) |  |

Definition at line 160 of file IOobject.cpp.

## writeObject() [2/2]

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

Definition at line 178 of file IOobject.cpp.

## write()

virtual bool write | ( | iOstream & | is,
|  | const IOPattern & | iop
| ) |  | const

pure virtual

Implemented in triSurface, geometry, pointStructure, multiTriSurface, pointField< T, MemorySpace >, pointField< real >, pointField< realx3 >, pointField< pFlow::VectorSingle, pFlow::AB5History >, pointField< pFlow::VectorSingle, pFlow::AB4History >, pointField< uint32 >, pointField< pFlow::VectorSingle, pFlow::AB3History >, insertion, vibratingMotion, rotatingAxisMotion, conveyorBeltMotion, stationaryWall, fileDictionary, rectMeshField< T >, rectMeshField< int32 >, triSurfaceField< T, MemorySpace >, triSurfaceField< realx3 >, triSurfaceField< uint32 >, and rectangleMesh.

## read()

virtual bool read | ( | iIstream & | is,
|  | const IOPattern & | iop
| ) |  |

pure virtual

Implemented in triSurface, geometry, rectMeshField< T >, rectMeshField< int32 >, triSurfaceField< T, MemorySpace >, triSurfaceField< realx3 >, triSurfaceField< uint32 >, pointStructure, multiTriSurface, pointField< T, MemorySpace >, pointField< real >, pointField< realx3 >, pointField< pFlow::VectorSingle, pFlow::AB5History >, pointField< pFlow::VectorSingle, pFlow::AB4History >, pointField< uint32 >, pointField< pFlow::VectorSingle, pFlow::AB3History >, rectangleMesh, and fileDictionary.

## Member Data Documentation

## ioPattern_

IOPattern ioPattern_

private

Definition at line 41 of file IOobject.hpp.

Referenced by IOobject::ioPattern().

## owner_

repository* owner_

mutableprivate

Definition at line 43 of file IOobject.hpp.

Referenced by IOobject::owner(), and IOobject::~IOobject().

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

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