/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2015-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see .
\*---------------------------------------------------------------------------*/
#include "GlobalIOList.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template
<
template class Container,
template class IOContainer,
class Type
>
Foam::GlobalIOListBase::GlobalIOListBase
(
const IOobject& io
)
:
regIOobject(io)
{
// Check for MUST_READ_IF_MODIFIED
warnNoRereading>();
readHeaderOk(IOstream::BINARY, IOContainer::typeName);
}
template
<
template class Container,
template class IOContainer,
class Type
>
Foam::GlobalIOListBase::GlobalIOListBase
(
const IOobject& io,
const label size
)
:
regIOobject(io)
{
// Check for MUST_READ_IF_MODIFIED
warnNoRereading>();
if (!readHeaderOk(IOstream::BINARY, IOContainer::typeName))
{
Container::setSize(size);
}
}
template
<
template class Container,
template class IOContainer,
class Type
>
Foam::GlobalIOListBase::GlobalIOListBase
(
const IOobject& io,
const Container& f
)
:
regIOobject(io)
{
// Check for MUST_READ_IF_MODIFIED
warnNoRereading>();
if (!readHeaderOk(IOstream::BINARY, IOContainer::typeName))
{
Container::operator=(f);
}
}
template
<
template class Container,
template class IOContainer,
class Type
>
Foam::GlobalIOListBase::GlobalIOListBase
(
const IOobject& io,
Container&& f
)
:
regIOobject(io),
Container(move(f))
{
// Check for MUST_READ_IF_MODIFIED
warnNoRereading>();
readHeaderOk(IOstream::BINARY, IOContainer::typeName);
}
template
<
template class Container,
template class IOContainer,
class Type
>
Foam::GlobalIOListBase::GlobalIOListBase
(
const GlobalIOListBase& field
)
:
regIOobject(field),
Container(field)
{}
template
<
template class Container,
template class IOContainer,
class Type
>
Foam::GlobalIOListBase::GlobalIOListBase
(
GlobalIOListBase&& field
)
:
regIOobject(move(field)),
Container(move(field))
{}
// * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * * //
template
<
template class Container,
template class IOContainer,
class Type
>
Foam::GlobalIOListBase::~GlobalIOListBase()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template
<
template class Container,
template class IOContainer,
class Type
>
bool Foam::GlobalIOListBase::readData
(
Istream& is
)
{
is >> *this;
return is.good();
}
template
<
template class Container,
template class IOContainer,
class Type
>
bool Foam::GlobalIOListBase::writeData
(
Ostream& os
) const
{
return (os << *this).good();
}
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
template
<
template class Container,
template class IOContainer,
class Type
>
void Foam::GlobalIOListBase::operator=
(
const GlobalIOListBase& rhs
)
{
Container::operator=(rhs);
}
template
<
template class Container,
template class IOContainer,
class Type
>
void Foam::GlobalIOListBase::operator=
(
GlobalIOListBase&& rhs
)
{
Container::operator=(move(rhs));
}
// ************************************************************************* //