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

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

## Public Types

enum | readFlag { READ_ALWAYS, READ_NEVER, READ_IF_PRESENT }
enum | writeFlag { WRITE_ALWAYS, WRITE_NEVER }

## Public Member Functions

| 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

word | name_
| Name of the entity. More...
readFlag | rFlag_ = readFlag::READ_NEVER
| Read flag. More...
writeFlag | wFlag_ = writeFlag::WRITE_NEVER
| Write flag. More...
fileSystem | localPath_ = ""
| Local path of entity. More...
int | numBytesForReal_ = numBytesForReal__
| Number of bytes used for writing/reading real variable (used for binray) More...
bool | readWriteHeader_ = true
| Does the objectFile read & write the header? More...

## Detailed Description

Definition at line 30 of file objectFile.hpp.

## Member Enumeration Documentation

## readFlag

enum readFlag

Enumerator
READ_ALWAYS |
READ_NEVER |
READ_IF_PRESENT |

Definition at line 34 of file objectFile.hpp.

## writeFlag

enum writeFlag

Enumerator
WRITE_ALWAYS |
WRITE_NEVER |

Definition at line 41 of file objectFile.hpp.

## Constructor & Destructor Documentation

## objectFile() [1/4]

objectFile | ( | const word & | name | ) |

explicit

Definition at line 24 of file objectFile.cpp.

Referenced by insertion::insertion().

Here is the caller graph for this function:

## objectFile() [2/4]

objectFile | ( | const word & | name,
|  | const fileSystem & | localPath,
|  | const readFlag & | rf = `readFlag::READ_NEVER`,
|  | const writeFlag & | wf = `writeFlag::WRITE_NEVER`,
|  | bool | rwHeader = `true`
| ) |  |

Definition at line 32 of file objectFile.cpp.

## objectFile() [3/4]

objectFile | ( | const objectFile & | src | ) |

default

## objectFile() [4/4]

objectFile | ( | objectFile && | src | ) |

default

## ~objectFile()

virtual ~objectFile | ( |  | ) |

virtualdefault

## Member Function Documentation

## operator=() [1/2]

objectFile& operator= | ( | const objectFile & | rhs | ) |

default

## operator=() [2/2]

objectFile& operator= | ( | objectFile && | rhs | ) |

default

## name()

virtual const word& name | ( |  | ) | const

inlinevirtual

Reimplemented in pointField< T, MemorySpace >, and rectMeshField< T >.

Definition at line 101 of file objectFile.hpp.

References objectFile::name_.

Referenced by repository::addToRepository(), IOobject::IOobject(), pointField< pFlow::VectorSingle, pFlow::AB3History >::name(), repository::removeFromRepository(), and pointStructure::setupPointStructure().

Here is the caller graph for this function:

## localPath()

virtual const fileSystem& localPath | ( |  | ) | const

inlinevirtual

Definition at line 107 of file objectFile.hpp.

References objectFile::localPath_.

## rFlag()

readFlag rFlag | ( |  | ) | const

inline

Definition at line 113 of file objectFile.hpp.

References objectFile::rFlag_.

## wFlag()

writeFlag wFlag | ( |  | ) | const

inline

Definition at line 119 of file objectFile.hpp.

References objectFile::wFlag_.

## isReadAlways()

bool isReadAlways | ( |  | ) | const

inline

Definition at line 125 of file objectFile.hpp.

References objectFile::rFlag_.

## isReadNever()

bool isReadNever | ( |  | ) | const

inline

Definition at line 131 of file objectFile.hpp.

References objectFile::rFlag_.

## isReadIfPresent()

bool isReadIfPresent | ( |  | ) | const

inline

Definition at line 137 of file objectFile.hpp.

References objectFile::rFlag_.

## isWriteAlways()

bool isWriteAlways | ( |  | ) | const

inline

Definition at line 143 of file objectFile.hpp.

References objectFile::wFlag_.

## isWriteNever()

bool isWriteNever | ( |  | ) | const

inline

Definition at line 149 of file objectFile.hpp.

References objectFile::wFlag_.

## readWriteHeader()

bool readWriteHeader | ( |  | ) | const

inline

Definition at line 155 of file objectFile.hpp.

References objectFile::readWriteHeader_.

## Member Data Documentation

## name_

word name_

private

Name of the entity.

Definition at line 51 of file objectFile.hpp.

Referenced by objectFile::name().

## rFlag_

readFlag rFlag_ = readFlag::READ_NEVER

private

Read flag.

Definition at line 54 of file objectFile.hpp.

Referenced by objectFile::isReadAlways(), objectFile::isReadIfPresent(), objectFile::isReadNever(), and objectFile::rFlag().

## wFlag_

writeFlag wFlag_ = writeFlag::WRITE_NEVER

private

Write flag.

Definition at line 57 of file objectFile.hpp.

Referenced by objectFile::isWriteAlways(), objectFile::isWriteNever(), and objectFile::wFlag().

## localPath_

fileSystem localPath_ = ""

private

Local path of entity.

Definition at line 60 of file objectFile.hpp.

Referenced by objectFile::localPath().

## numBytesForReal_

int numBytesForReal_ = numBytesForReal__

private

Number of bytes used for writing/reading real variable (used for binray)

Definition at line 63 of file objectFile.hpp.

## readWriteHeader_

bool readWriteHeader_ = true

private

Does the objectFile read & write the header?

Definition at line 66 of file objectFile.hpp.

Referenced by objectFile::readWriteHeader().

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

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