# PhasicFlow: src/phasicFlow/repository/IOobject/IOobject.hpp Source File
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.hpp
Go to the documentation of this file.
/*------------------------------- phasicFlow ---------------------------------
O C enter of
O O E ngineering and
O O M ultiscale modeling of
OOOOOOO F luid flow
------------------------------------------------------------------------------
Copyright (C): www.cemf.ir
email: hamid.r.norouzi AT gmail.com
------------------------------------------------------------------------------
Licence:
This file is part of phasicFlow code. It is a free software for simulating
granular and multiphase flows. You can redistribute it and/or modify it under
the terms of GNU General Public License v3 or any other later versions.
phasicFlow is distributed to help others in their research in the field of
granular and multiphase flows, but WITHOUT ANY WARRANTY; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-----------------------------------------------------------------------------*/
#ifndef __IOobject_hpp__
#define __IOobject_hpp__
#include "IOfileHeader.hpp"
#include "IOPattern.hpp"
namespace pFlow
{
class repository;
class IOobject
:
public IOfileHeader
{
private:
IOPattern ioPattern_;
mutable repository* owner_;
public:
// - typeinfo
virtual
word typeName() const = 0;
// - construct from components, transfer the ownership of iObject (object_t) to the
// onwner and read the object from file
IOobject(
const objectFile& objf,
const IOPattern& iop,
repository* owner);
~IOobject() override;
// - copy construct
IOobject(const IOobject& src)=delete;
// - move construct
IOobject(IOobject&& src) = delete;
inline
const IOPattern& ioPattern()const
{
return ioPattern_;
}
// - pointer to owner repository
const repository* owner()const override
{
return owner_;
}
repository* owner()
{
return owner_;
}
repository* releaseOwner(bool fromOwner = false);
bool isIncluded(const word& objName)const override;
bool isExcluded(const word& objName)const override;
// - read from file
bool readObject(bool rdHdr = true);
// - write to file
bool writeObject() const;
// - read from istream
bool readObject(iIstream& is, bool rdHdr = true);
// - write to istream
bool writeObject(iOstream& os) const;
virtual
bool write(iOstream& is, const IOPattern& iop)const = 0;
virtual
bool read(iIstream& is, const IOPattern& iop) = 0;
};
}
#include "IOobjectTemplates.cpp"
#endif //__IOobject_hpp__
pFlow::IOobject::isExcluded
bool isExcluded(const word &objName) const override
Definition: IOobject.cpp:76
pFlow::IOobject::~IOobject
~IOobject() override
Definition: IOobject.cpp:46
IOobjectTemplates.cpp
pFlow::IOobject::isIncluded
bool isIncluded(const word &objName) const override
Definition: IOobject.cpp:68
pFlow::word
std::string word
Definition: builtinTypes.hpp:64
pFlow::IOobject::write
virtual bool write(iOstream &is, const IOPattern &iop) const =0
pFlow::IOobject::read
virtual bool read(iIstream &is, const IOPattern &iop)=0
pFlow
Definition: demGeometry.hpp:27
pFlow::IOobject
Definition: IOobject.hpp:35
pFlow::IOobject::ioPattern
const IOPattern & ioPattern() const
Definition: IOobject.hpp:70
pFlow::iIstream
Interface class for any input stream
Definition: iIstream.hpp:37
pFlow::IOobject::readObject
bool readObject(bool rdHdr=true)
Definition: IOobject.cpp:83
pFlow::IOobject::IOobject
IOobject(const objectFile &objf, const IOPattern &iop, repository *owner)
Definition: IOobject.cpp:26
pFlow::IOPattern
Definition: IOPattern.hpp:32
pFlow::IOobject::owner
repository * owner()
Definition: IOobject.hpp:81
pFlow::IOobject::owner
const repository * owner() const override
Definition: IOobject.hpp:76
pFlow::IOobject::ioPattern_
IOPattern ioPattern_
Definition: IOobject.hpp:41
pFlow::objectFile
Definition: objectFile.hpp:30
IOfileHeader.hpp
pFlow::IOobject::releaseOwner
repository * releaseOwner(bool fromOwner=false)
Definition: IOobject.cpp:55
IOPattern.hpp
pFlow::IOfileHeader
Definition: IOfileHeader.hpp:35
pFlow::repository
Definition: repository.hpp:34
pFlow::IOobject::owner_
repository * owner_
Definition: IOobject.hpp:43
pFlow::IOobject::writeObject
bool writeObject() const
Definition: IOobject.cpp:119
pFlow::iOstream
Interface class for any output stream.
Definition: iOstream.hpp:59
pFlow::IOobject::typeName
virtual word typeName() const =0