STYLE: for Istream/Ostream check() use FUNCTION_NAME in messages

This commit is contained in:
Mark Olesen
2017-05-26 10:59:16 +02:00
parent 0564efb9e1
commit 2af602c2f4
147 changed files with 270 additions and 851 deletions

View File

@ -138,9 +138,7 @@ public:
>> m.orientation_; >> m.orientation_;
is.readEnd("magnet"); is.readEnd("magnet");
// Check state of Istream is.check(FUNCTION_NAME);
is.check("operator>>(Istream&, magnet&)");
return is; return is;
} }

View File

@ -35,8 +35,7 @@ Foam::CLASSNAME::CLASSNAME(Istream& is)
member1(is), member1(is),
member2(is) member2(is)
{ {
// Check state of Istream is.check(FUNCTION_NAME);
is.check("Foam::CLASSNAME::CLASSNAME(Foam::Istream&)");
} }
@ -44,25 +43,14 @@ Foam::CLASSNAME::CLASSNAME(Istream& is)
Foam::Istream& Foam::operator>>(Istream& is, CLASSNAME&) Foam::Istream& Foam::operator>>(Istream& is, CLASSNAME&)
{ {
// Check state of Istream is.check(FUNCTION_NAME);
is.check
(
"Foam::Istream& Foam::operator>>(Foam::Istream&, Foam::CLASSNAME&)"
);
return is; return is;
} }
Foam::Ostream& Foam::operator<<(Ostream& os, const CLASSNAME&) Foam::Ostream& Foam::operator<<(Ostream& os, const CLASSNAME&)
{ {
// Check state of Ostream os.check(FUNCTION_NAME);
os.check
(
"Foam::Ostream& Foam::operator<<(Foam::Ostream&, "
"const Foam::CLASSNAME&)"
);
return os; return os;
} }

View File

@ -36,8 +36,7 @@ Foam::CLASSNAME<TemplateArgument>::CLASSNAME(Istream& is)
member1(is), member1(is),
member2(is) member2(is)
{ {
// Check state of Istream is.check(FUNCTION_NAME);
is.check("Foam::CLASSNAME<TemplateArgument>::CLASSNAME(Foam::Istream&)");
} }
@ -50,13 +49,7 @@ Foam::Istream& Foam::operator>>
CLASSNAME<TemplateArgument>& CLASSNAME<TemplateArgument>&
) )
{ {
// Check state of Istream is.check(FUNCTION_NAME);
is.check
(
"Foam::Istream& Foam::operator>>"
"(Foam::Istream&, Foam::CLASSNAME<TemplateArgument>&)"
);
return is; return is;
} }
@ -68,13 +61,7 @@ Foam::Ostream& Foam::operator<<
const CLASSNAME<TemplateArgument>& const CLASSNAME<TemplateArgument>&
) )
{ {
// Check state of Ostream os.check(FUNCTION_NAME);
os.check
(
"Foam::Ostream& Foam::operator<<"
"(Ostream&, const CLASSNAME<TemplateArgument>&)"
);
return os; return os;
} }

View File

@ -123,9 +123,7 @@ Foam::Istream& Foam::operator>>(Istream& is, fileStat& fStat)
fStat.status_.st_mtime = stat[11]; fStat.status_.st_mtime = stat[11];
fStat.status_.st_ctime = stat[12]; fStat.status_.st_ctime = stat[12];
// Check state of Istream is.check(FUNCTION_NAME);
is.check("Istream& operator>>(Istream&, fileStat&)");
return is; return is;
} }

View File

@ -118,12 +118,7 @@ Foam::Istream& Foam::operator>>(Istream& is, memInfo& m)
is.readEnd("memInfo"); is.readEnd("memInfo");
// Check state of Istream is.check(FUNCTION_NAME);
is.check
(
"Foam::Istream& Foam::operator>>(Foam::Istream&, Foam::memInfo&)"
);
return is; return is;
} }
@ -136,12 +131,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const memInfo& m)
<< m.rss_ << m.rss_
<< token::END_LIST; << token::END_LIST;
// Check state of Ostream os.check(FUNCTION_NAME);
os.check
(
"Foam::Ostream& Foam::operator<<(Foam::Ostream&, const Foam::memInfo&)"
);
return os; return os;
} }

View File

@ -61,9 +61,7 @@ Foam::Istream& Foam::operator>>(Istream& is, volumeType& vt)
// Read end of volumeType // Read end of volumeType
is.readEnd("volumeType"); is.readEnd("volumeType");
// Check state of Istream is.check(FUNCTION_NAME);
is.check("operator>>(Istream&, volumeType&)");
return is; return is;
} }

View File

@ -129,9 +129,7 @@ Foam::Ostream& Foam::HashTable<T, Key, Hash>::writeKeys
os << token::END_LIST << nl; // End delimiter os << token::END_LIST << nl; // End delimiter
} }
// Check state of IOstream
os.check(FUNCTION_NAME); os.check(FUNCTION_NAME);
return os; return os;
} }
@ -145,12 +143,12 @@ Foam::Istream& Foam::operator>>
HashTable<T, Key, Hash>& L HashTable<T, Key, Hash>& L
) )
{ {
is.fatalCheck("operator>>(Istream&, HashTable<T, Key, Hash>&)"); is.fatalCheck(FUNCTION_NAME);
// Anull list // Anull list
L.clear(); L.clear();
is.fatalCheck("operator>>(Istream&, HashTable<T, Key, Hash>&)"); is.fatalCheck(FUNCTION_NAME);
token firstToken(is); token firstToken(is);
@ -251,7 +249,7 @@ Foam::Istream& Foam::operator>>
<< exit(FatalIOError); << exit(FatalIOError);
} }
is.fatalCheck("operator>>(Istream&, HashTable<T, Key, Hash>&)"); is.fatalCheck(FUNCTION_NAME);
return is; return is;
} }
@ -278,9 +276,7 @@ Foam::Ostream& Foam::operator<<
// Write end delimiter // Write end delimiter
os << token::END_LIST; os << token::END_LIST;
// Check state of IOstream
os.check(FUNCTION_NAME); os.check(FUNCTION_NAME);
return os; return os;
} }

View File

@ -94,12 +94,12 @@ Foam::StaticHashTable<T, Key, Hash>::printInfo(Ostream& os) const
template<class T, class Key, class Hash> template<class T, class Key, class Hash>
Foam::Istream& Foam::operator>>(Istream& is, StaticHashTable<T, Key, Hash>& L) Foam::Istream& Foam::operator>>(Istream& is, StaticHashTable<T, Key, Hash>& L)
{ {
is.fatalCheck("operator>>(Istream&, StaticHashTable<T, Key, Hash>&)"); is.fatalCheck(FUNCTION_NAME);
// Anull list // Anull list
L.clear(); L.clear();
is.fatalCheck("operator>>(Istream&, StaticHashTable<T, Key, Hash>&)"); is.fatalCheck(FUNCTION_NAME);
token firstToken(is); token firstToken(is);
@ -200,7 +200,7 @@ Foam::Istream& Foam::operator>>(Istream& is, StaticHashTable<T, Key, Hash>& L)
<< exit(FatalIOError); << exit(FatalIOError);
} }
is.fatalCheck("operator>>(Istream&, StaticHashTable<T, Key, Hash>&)"); is.fatalCheck(FUNCTION_NAME);
return is; return is;
} }
@ -229,9 +229,7 @@ Foam::Ostream& Foam::operator<<
// Write end delimiter // Write end delimiter
os << token::END_LIST; os << token::END_LIST;
// Check state of IOstream os.check(FUNCTION_NAME);
os.check("Ostream& operator<<(Ostream&, const StaticHashTable&)");
return os; return os;
} }

View File

@ -125,9 +125,7 @@ inline Foam::Istream& Foam::operator>>(Istream& is, Keyed<T>& item)
// Read end of Keyed item/key pair // Read end of Keyed item/key pair
is.readEnd("Keyed<T>"); is.readEnd("Keyed<T>");
// Check state of Ostream is.check(FUNCTION_NAME);
is.check("Istream& operator>>(Istream&, Keyed&)");
return is; return is;
} }

View File

@ -33,7 +33,7 @@ template<class LListBase, class T>
template<class INew> template<class INew>
void Foam::ILList<LListBase, T>::read(Istream& is, const INew& iNew) void Foam::ILList<LListBase, T>::read(Istream& is, const INew& iNew)
{ {
is.fatalCheck("operator>>(Istream&, ILList<LListBase, T>&)"); is.fatalCheck(FUNCTION_NAME);
token firstToken(is); token firstToken(is);
@ -97,7 +97,7 @@ void Foam::ILList<LListBase, T>::read(Istream& is, const INew& iNew)
} }
token lastToken(is); token lastToken(is);
is.fatalCheck("operator>>(Istream&, ILList<LListBase, T>&)"); is.fatalCheck(FUNCTION_NAME);
while while
( (
@ -111,7 +111,7 @@ void Foam::ILList<LListBase, T>::read(Istream& is, const INew& iNew)
this->append(iNew(is).ptr()); this->append(iNew(is).ptr());
is >> lastToken; is >> lastToken;
is.fatalCheck("operator>>(Istream&, ILList<LListBase, T>&)"); is.fatalCheck(FUNCTION_NAME);
} }
} }
else else
@ -122,7 +122,7 @@ void Foam::ILList<LListBase, T>::read(Istream& is, const INew& iNew)
<< exit(FatalIOError); << exit(FatalIOError);
} }
is.fatalCheck("operator>>(Istream&, ILList<LListBase, T>&)"); is.fatalCheck(FUNCTION_NAME);
} }

View File

@ -44,7 +44,7 @@ Foam::Istream& Foam::operator>>(Istream& is, LList<LListBase, T>& L)
// Anull list // Anull list
L.clear(); L.clear();
is.fatalCheck(" operator>>(Istream&, LList<LListBase, T>&)"); is.fatalCheck(FUNCTION_NAME);
token firstToken(is); token firstToken(is);
@ -98,7 +98,7 @@ Foam::Istream& Foam::operator>>(Istream& is, LList<LListBase, T>& L)
} }
token lastToken(is); token lastToken(is);
is.fatalCheck(" operator>>(Istream&, LList<LListBase, T>&)"); is.fatalCheck(FUNCTION_NAME);
while while
( (
@ -114,7 +114,7 @@ Foam::Istream& Foam::operator>>(Istream& is, LList<LListBase, T>& L)
L.append(element); L.append(element);
is >> lastToken; is >> lastToken;
is.fatalCheck(" operator>>(Istream&, LList<LListBase, T>&)"); is.fatalCheck(FUNCTION_NAME);
} }
} }
else else
@ -126,7 +126,7 @@ Foam::Istream& Foam::operator>>(Istream& is, LList<LListBase, T>& L)
} }
// Check state of IOstream // Check state of IOstream
is.fatalCheck(" operator>>(Istream&, LList<LListBase,>&)"); is.fatalCheck(FUNCTION_NAME);
return is; return is;
} }
@ -152,9 +152,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const LList<LListBase, T>& lst)
// Write end of contents // Write end of contents
os << token::END_LIST; os << token::END_LIST;
// Check state of IOstream os.check(FUNCTION_NAME);
os.check("Ostream& operator<<(Ostream&, const LList<LListBase, T>&)");
return os; return os;
} }

View File

@ -34,10 +34,7 @@ template<class LListBase, class T>
template<class INew> template<class INew>
void Foam::LPtrList<LListBase, T>::read(Istream& is, const INew& iNew) void Foam::LPtrList<LListBase, T>::read(Istream& is, const INew& iNew)
{ {
is.fatalCheck is.fatalCheck(FUNCTION_NAME);
(
"LPtrList<LListBase, T>::read(Istream&, const INew&)"
);
token firstToken(is); token firstToken(is);
@ -102,7 +99,7 @@ void Foam::LPtrList<LListBase, T>::read(Istream& is, const INew& iNew)
} }
token lastToken(is); token lastToken(is);
is.fatalCheck("LPtrList<LListBase, T>::read(Istream&, const INew&)"); is.fatalCheck(FUNCTION_NAME);
while while
( (
@ -116,10 +113,7 @@ void Foam::LPtrList<LListBase, T>::read(Istream& is, const INew& iNew)
this->append(iNew(is).ptr()); this->append(iNew(is).ptr());
is >> lastToken; is >> lastToken;
is.fatalCheck is.fatalCheck(FUNCTION_NAME);
(
"LPtrList<LListBase, T>::read(Istream&, const INew&)"
);
} }
} }
else else
@ -132,7 +126,7 @@ void Foam::LPtrList<LListBase, T>::read(Istream& is, const INew& iNew)
<< exit(FatalIOError); << exit(FatalIOError);
} }
is.fatalCheck("LPtrList<LListBase, T>::read(Istream&, const INew&)"); is.fatalCheck(FUNCTION_NAME);
} }
@ -190,9 +184,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const LPtrList<LListBase, T>& lst)
// Write end of contents // Write end of contents
os << token::END_LIST; os << token::END_LIST;
// Check state of IOstream os.check(FUNCTION_NAME);
os.check("Ostream& operator<<(Ostream&, const LPtrList<LListBase, T>&)");
return os; return os;
} }

View File

@ -52,9 +52,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const UILList<LListBase, T>& lst)
// Write end of contents // Write end of contents
os << token::END_LIST; os << token::END_LIST;
// Check state of IOstream os.check(FUNCTION_NAME);
os.check("Ostream& operator<<(Ostream&, const UILList<LListBase, T>&)");
return os; return os;
} }

View File

@ -591,9 +591,7 @@ Foam::Istream& Foam::operator>>
>> d.binWidth_ >> d.binWidth_
>> d.listStarts_; >> d.listStarts_;
// Check state of Istream is.check(FUNCTION_NAME);
is.check("Istream& operator>>(Istream&, Distribution<Type>&)");
return is; return is;
} }
@ -609,9 +607,7 @@ Foam::Ostream& Foam::operator<<
<< d.binWidth_ << token::SPACE << d.binWidth_ << token::SPACE
<< d.listStarts_; << d.listStarts_;
// Check state of Ostream os.check(FUNCTION_NAME);
os.check("Ostream& operator<<(Ostream&, " "const Distribution&)");
return os; return os;
} }

View File

@ -139,9 +139,7 @@ Foam::Ostream& Foam::FixedList<T, Size>::writeList
os.write(reinterpret_cast<const char*>(L.cdata()), Size*sizeof(T)); os.write(reinterpret_cast<const char*>(L.cdata()), Size*sizeof(T));
} }
// Check state of IOstream os.check(FUNCTION_NAME);
os.check("const FixedList::writeList(Ostream&)");
return os; return os;
} }
@ -158,7 +156,7 @@ Foam::FixedList<T, Size>::FixedList(Istream& is)
template<class T, unsigned Size> template<class T, unsigned Size>
Foam::Istream& Foam::operator>>(Foam::Istream& is, FixedList<T, Size>& L) Foam::Istream& Foam::operator>>(Foam::Istream& is, FixedList<T, Size>& L)
{ {
is.fatalCheck("operator>>(Istream&, FixedList<T, Size>&)"); is.fatalCheck(FUNCTION_NAME);
if (is.format() == IOstream::ASCII || !contiguous<T>()) if (is.format() == IOstream::ASCII || !contiguous<T>())
{ {

View File

@ -46,11 +46,11 @@ Foam::Istream& Foam::operator>>(Istream& is, List<T>& L)
// Anull list // Anull list
L.setSize(0); L.setSize(0);
is.fatalCheck("operator>>(Istream&, List<T>&)"); is.fatalCheck(FUNCTION_NAME);
token firstToken(is); token firstToken(is);
is.fatalCheck("operator>>(Istream&, List<T>&) : reading first token"); is.fatalCheck(FUNCTION_NAME);
if (firstToken.isCompound()) if (firstToken.isCompound())
{ {

View File

@ -266,7 +266,7 @@ Foam::Istream& Foam::PackedList<nBits>::read(Istream& is)
PackedList<nBits>& lst = *this; PackedList<nBits>& lst = *this;
lst.clear(); lst.clear();
is.fatalCheck("PackedList<nBits>::read(Istream&)"); is.fatalCheck(FUNCTION_NAME);
token firstTok(is); token firstTok(is);
is.fatalCheck is.fatalCheck
@ -349,7 +349,7 @@ Foam::Istream& Foam::PackedList<nBits>::read(Istream& is)
if (firstTok.pToken() == token::BEGIN_LIST) if (firstTok.pToken() == token::BEGIN_LIST)
{ {
token nextTok(is); token nextTok(is);
is.fatalCheck("PackedList<nBits>::read(Istream&)"); is.fatalCheck(FUNCTION_NAME);
while while
( (
@ -362,13 +362,13 @@ Foam::Istream& Foam::PackedList<nBits>::read(Istream& is)
lst.append(lst.readValue(is)); lst.append(lst.readValue(is));
is >> nextTok; is >> nextTok;
is.fatalCheck("PackedList<nBits>::read(Istream&)"); is.fatalCheck(FUNCTION_NAME);
} }
} }
else if (firstTok.pToken() == token::BEGIN_BLOCK) else if (firstTok.pToken() == token::BEGIN_BLOCK)
{ {
token nextTok(is); token nextTok(is);
is.fatalCheck("PackedList<nBits>::read(Istream&)"); is.fatalCheck(FUNCTION_NAME);
while while
( (
@ -381,7 +381,7 @@ Foam::Istream& Foam::PackedList<nBits>::read(Istream& is)
lst.setPair(is); lst.setPair(is);
is >> nextTok; is >> nextTok;
is.fatalCheck("PackedList<nBits>::read(Istream&)"); is.fatalCheck(FUNCTION_NAME);
} }
} }
else else

View File

@ -137,8 +137,7 @@ inline void Foam::PackedList<nBits>::setPair(Istream& is)
set(ind, val); set(ind, val);
// Check state of Istream is.check(FUNCTION_NAME);
is.check("PackedList<nBits>::setPair(Istream&)");
} }

View File

@ -35,7 +35,7 @@ template<class T>
template<class INew> template<class INew>
void Foam::PtrList<T>::read(Istream& is, const INew& inewt) void Foam::PtrList<T>::read(Istream& is, const INew& inewt)
{ {
is.fatalCheck("PtrList<T>::read(Istream&, const INew&)"); is.fatalCheck(FUNCTION_NAME);
token firstToken(is); token firstToken(is);

View File

@ -120,9 +120,7 @@ Foam::Ostream& Foam::UIndirectList<T>::writeList
} }
} }
// Check state of IOstream os.check(FUNCTION_NAME);
os.check("UIndirectList::writeList(Ostream&)");
return os; return os;
} }

View File

@ -150,9 +150,7 @@ Foam::Ostream& Foam::UList<T>::writeList
} }
} }
// Check state of IOstream os.check(FUNCTION_NAME);
os.check("UList<T>::writeList(Ostream&)");
return os; return os;
} }
@ -169,7 +167,7 @@ Foam::Ostream& Foam::operator<<(Foam::Ostream& os, const Foam::UList<T>& L)
template<class T> template<class T>
Foam::Istream& Foam::operator>>(Istream& is, UList<T>& L) Foam::Istream& Foam::operator>>(Istream& is, UList<T>& L)
{ {
is.fatalCheck("operator>>(Istream&, UList<T>&)"); is.fatalCheck(FUNCTION_NAME);
token firstToken(is); token firstToken(is);

View File

@ -44,9 +44,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const UPtrList<T>& L)
// Write end delimiter // Write end delimiter
os << nl << decrIndent << indent << token::END_LIST << nl; os << nl << decrIndent << indent << token::END_LIST << nl;
// Check state of IOstream os.check(FUNCTION_NAME);
os.check("Ostream& operator<<(Ostream&, const UPtrList&)");
return os; return os;
} }

View File

@ -117,11 +117,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const UPstream::commsStruct& comm)
<< comm.allBelow_ << token::SPACE << comm.allBelow_ << token::SPACE
<< comm.allNotBelow_; << comm.allNotBelow_;
os.check os.check(FUNCTION_NAME);
(
"Ostream& operator<<(Ostream&, const commsStruct&)"
);
return os; return os;
} }

View File

@ -105,9 +105,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const token& t)
<< endl; << endl;
} }
// Check state of stream os.check(FUNCTION_NAME);
os.check("Ostream& operator<<(Ostream&, const token&)");
return os; return os;
} }

View File

@ -38,11 +38,7 @@ Foam::dictionaryEntry::dictionaryEntry
entry(keyType(is)), entry(keyType(is)),
dictionary(parentDict, is) dictionary(parentDict, is)
{ {
is.fatalCheck is.fatalCheck(FUNCTION_NAME);
(
"dictionaryEntry::dictionaryEntry"
"(const dictionary& parentDict, Istream&)"
);
} }
@ -56,11 +52,7 @@ Foam::dictionaryEntry::dictionaryEntry
entry(key), entry(key),
dictionary(key, parentDict, is) dictionary(key, parentDict, is)
{ {
is.fatalCheck is.fatalCheck(FUNCTION_NAME);
(
"dictionaryEntry::dictionaryEntry"
"(const keyType&, const dictionary& parentDict, Istream&)"
);
} }

View File

@ -115,8 +115,7 @@ void Foam::dictionaryListEntry::write(Ostream& os) const
// Write end delimiter // Write end delimiter
os << decrIndent << indent << token::END_LIST << nl; os << decrIndent << indent << token::END_LIST << nl;
// Check state of IOstream os.check(FUNCTION_NAME);
os.check("Ostream& operator<<(Ostream&, const dictionaryListEntry&)");
} }

View File

@ -84,11 +84,7 @@ bool Foam::functionEntry::execute
Istream& is Istream& is
) )
{ {
is.fatalCheck is.fatalCheck(FUNCTION_NAME);
(
"functionEntry::execute"
"(const word& functionName, dictionary& parentDict, Istream&)"
);
if (!executedictionaryIstreamMemberFunctionTablePtr_) if (!executedictionaryIstreamMemberFunctionTablePtr_)
{ {
@ -127,11 +123,7 @@ bool Foam::functionEntry::execute
Istream& is Istream& is
) )
{ {
is.fatalCheck is.fatalCheck(FUNCTION_NAME);
(
"functionEntry::execute"
"(const word&, const dictionary&, primitiveEntry&, Istream&)"
);
if (!executeprimitiveEntryIstreamMemberFunctionTablePtr_) if (!executeprimitiveEntryIstreamMemberFunctionTablePtr_)
{ {

View File

@ -91,10 +91,7 @@ bool Foam::primitiveEntry::expandFunction
bool Foam::primitiveEntry::read(const dictionary& dict, Istream& is) bool Foam::primitiveEntry::read(const dictionary& dict, Istream& is)
{ {
is.fatalCheck is.fatalCheck(FUNCTION_NAME);
(
"primitiveEntry::readData(const dictionary&, Istream&)"
);
label blockCount = 0; label blockCount = 0;
token currToken; token currToken;
@ -145,10 +142,7 @@ bool Foam::primitiveEntry::read(const dictionary& dict, Istream& is)
} }
} }
is.fatalCheck is.fatalCheck(FUNCTION_NAME);
(
"primitiveEntry::readData(const dictionary&, Istream&)"
);
if (currToken.good()) if (currToken.good())
{ {

View File

@ -477,9 +477,8 @@ Foam::Istream& Foam::dimensionSet::read
<< exit(FatalIOError); << exit(FatalIOError);
} }
} }
// Check state of Istream
is.check("Istream& operator>>(Istream&, dimensionSet&)");
is.check(FUNCTION_NAME);
return is; return is;
} }
@ -617,9 +616,7 @@ Foam::Istream& Foam::dimensionSet::read
} }
} }
// Check state of Istream is.check(FUNCTION_NAME);
is.check("Istream& operator>>(Istream&, dimensionSet&)");
return is; return is;
} }
@ -691,9 +688,7 @@ Foam::Ostream& Foam::dimensionSet::write
os << token::END_SQR; os << token::END_SQR;
// Check state of Ostream os.check(FUNCTION_NAME);
os.check("Ostream& operator<<(Ostream&, const dimensionSet&)");
return os; return os;
} }
@ -722,9 +717,7 @@ Foam::Istream& Foam::operator>>(Istream& is, dimensionSet& dset)
<< exit(FatalIOError); << exit(FatalIOError);
} }
// Check state of Istream is.check(FUNCTION_NAME);
is.check("Istream& operator>>(Istream&, dimensionSet&)");
return is; return is;
} }
@ -734,9 +727,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const dimensionSet& dset)
scalar multiplier; scalar multiplier;
dset.write(os, multiplier); dset.write(os, multiplier);
// Check state of Ostream os.check(FUNCTION_NAME);
os.check("Ostream& operator<<(Ostream&, const dimensionSet&)");
return os; return os;
} }

View File

@ -339,12 +339,7 @@ Foam::dimensioned<Type>::read(Istream& is, const dictionary& readSet)
is >> value_; is >> value_;
value_ *= mult; value_ *= mult;
// Check state of Istream is.check(FUNCTION_NAME);
is.check
(
"Istream& dimensioned<Type>::read(Istream& is, const dictionary&)"
);
return is; return is;
} }
@ -367,13 +362,7 @@ Foam::Istream& Foam::dimensioned<Type>::read
is >> value_; is >> value_;
value_ *= mult; value_ *= mult;
// Check state of Istream is.check(FUNCTION_NAME);
is.check
(
"Istream& dimensioned<Type>::read"
"(Istream& is, const HashTable<dimensionedScalar>&)"
);
return is; return is;
} }
@ -392,12 +381,7 @@ Foam::Istream& Foam::dimensioned<Type>::read(Istream& is)
is >> value_; is >> value_;
value_ *= mult; value_ *= mult;
// Check state of Istream is.check(FUNCTION_NAME);
is.check
(
"Istream& dimensioned<Type>::read(Istream& is)"
);
return is; return is;
} }
@ -612,9 +596,7 @@ Foam::Istream& Foam::operator>>(Istream& is, dimensioned<Type>& dt)
is >> dt.value_; is >> dt.value_;
dt.value_ *= multiplier; dt.value_ *= multiplier;
// Check state of Istream is.check(FUNCTION_NAME);
is.check("Istream& operator>>(Istream&, dimensioned<Type>&)");
return is; return is;
} }
@ -634,9 +616,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const dimensioned<Type>& dt)
// Write the value // Write the value
os << dt.value()/mult; os << dt.value()/mult;
// Check state of Ostream os.check(FUNCTION_NAME);
os.check("Ostream& operator<<(Ostream&, const dimensioned<Type>&)");
return os; return os;
} }

View File

@ -117,10 +117,8 @@ bool Foam::DimensionedField<Type, GeoMesh>::writeData
Field<Type>::writeEntry(fieldDictEntry, os); Field<Type>::writeEntry(fieldDictEntry, os);
// Check state of Ostream
os.check(FUNCTION_NAME); os.check(FUNCTION_NAME);
return os.good();
return (os.good());
} }

View File

@ -573,12 +573,7 @@ writeEntry(const word& keyword, Ostream& os) const
this->writeEntries(os); this->writeEntries(os);
os.endBlock() << flush; os.endBlock() << flush;
// Check state of IOstream os.check(FUNCTION_NAME);
os.check
(
"GeometricField<Type, PatchField, GeoMesh>::Boundary::"
"writeEntry(const word& keyword, Ostream& os) const"
);
} }

View File

@ -1292,14 +1292,8 @@ Foam::Ostream& Foam::operator<<
os << nl; os << nl;
gf.boundaryField().writeEntry("boundaryField", os); gf.boundaryField().writeEntry("boundaryField", os);
// Check state of IOstream os.check(FUNCTION_NAME);
os.check return os;
(
"Ostream& operator<<(Ostream&, "
"const GeometricField<Type, PatchField, GeoMesh>&)"
);
return (os);
} }

View File

@ -329,7 +329,7 @@ Foam::Ostream& Foam::operator<<
{ {
ptf.write(os); ptf.write(os);
os.check("Ostream& operator<<(Ostream&, const pointPatchField<Type>&)"); os.check(FUNCTION_NAME);
return os; return os;
} }

View File

@ -63,7 +63,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const curve& c)
<< c.style_ << nl << c.style_ << nl
<< static_cast<const scalarField&>(c); << static_cast<const scalarField&>(c);
os.check("Ostream& operator>>(Ostream&, const curve&)"); os.check(FUNCTION_NAME);
return os; return os;
} }

View File

@ -298,7 +298,7 @@ void Foam::graph::write
Foam::Ostream& Foam::operator<<(Ostream& os, const graph& g) Foam::Ostream& Foam::operator<<(Ostream& os, const graph& g)
{ {
g.writeTable(os); g.writeTable(os);
os.check("Ostream& operator<<(Ostream&, const graph&)"); os.check(FUNCTION_NAME);
return os; return os;
} }

View File

@ -363,7 +363,7 @@ Foam::Ostream& Foam::operator<<
<< endl << endl; << endl << endl;
} }
os.check("Ostream& operator<<(Ostream&, const LduMatrix&"); os.check(FUNCTION_NAME);
return os; return os;
} }

View File

@ -48,7 +48,7 @@ Foam::Istream& Foam::operator>>(Istream& is, Matrix<Form, Type>& M)
// Anull matrix // Anull matrix
M.clear(); M.clear();
is.fatalCheck("operator>>(Istream&, Matrix<Form, Type>&)"); is.fatalCheck(FUNCTION_NAME);
token firstToken(is); token firstToken(is);
@ -250,9 +250,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const Matrix<Form, Type>& M)
} }
} }
// Check state of IOstream os.check(FUNCTION_NAME);
os.check("Ostream& operator<<(Ostream&, const Matrix&)");
return os; return os;
} }

View File

@ -338,7 +338,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const lduMatrix& ldum)
os << ldum.upper(); os << ldum.upper();
} }
os.check("Ostream& operator<<(Ostream&, const lduMatrix&"); os.check(FUNCTION_NAME);
return os; return os;
} }
@ -398,7 +398,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const InfoProxy<lduMatrix>& ip)
// os << endl; // os << endl;
//} //}
os.check("Ostream& operator<<(Ostream&, const lduMatrix&"); os.check(FUNCTION_NAME);
return os; return os;
} }

View File

@ -142,9 +142,7 @@ Ostream& operator<<(Ostream& os, const DynamicID<ObjectType>& dynId)
<< dynId.name() << token::SPACE << dynId.index() << dynId.name() << token::SPACE << dynId.index()
<< token::END_LIST; << token::END_LIST;
// Check state of Ostream os.check(FUNCTION_NAME);
os.check("Ostream& operator<<(Ostream&, const DynamicID<ObjectType>&)");
return os; return os;
} }

View File

@ -259,8 +259,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const boundBox& bb)
); );
} }
// Check state of Ostream os.check(FUNCTION_NAME);
os.check("Ostream& operator<<(Ostream&, const boundBox&)");
return os; return os;
} }
@ -280,8 +279,7 @@ Foam::Istream& Foam::operator>>(Istream& is, boundBox& bb)
); );
} }
// Check state of Istream is.check(FUNCTION_NAME);
is.check("Istream& operator>>(Istream&, boundBox&)");
return is; return is;
} }

View File

@ -139,7 +139,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const InfoProxy<lduMesh>& ip)
} }
} }
os.check("Ostream& operator<<(Ostream&, const lduMesh&"); os.check(FUNCTION_NAME);
return os; return os;
} }

View File

@ -176,9 +176,7 @@ inline Foam::Istream& Foam::operator>>(Istream& is, face& f)
is >> static_cast<labelList&>(f); is >> static_cast<labelList&>(f);
} }
// Check state of Ostream is.check(FUNCTION_NAME);
is.check("Istream& operator>>(Istream&, face&)");
return is; return is;
} }

View File

@ -137,9 +137,7 @@ inline Foam::Istream& Foam::operator>>(Istream& is, labelledTri& t)
is.read(reinterpret_cast<char*>(&t), sizeof(labelledTri)); is.read(reinterpret_cast<char*>(&t), sizeof(labelledTri));
} }
// Check state of Ostream is.check(FUNCTION_NAME);
is.check("Istream& operator>>(Istream&, labelledTri&)");
return is; return is;
} }
@ -161,9 +159,7 @@ inline Foam::Ostream& Foam::operator<<(Ostream& os, const labelledTri& t)
); );
} }
// Check state of Ostream
os.check(FUNCTION_NAME); os.check(FUNCTION_NAME);
return os; return os;
} }

View File

@ -545,7 +545,7 @@ void Foam::mapDistribute::operator=(const mapDistribute& rhs)
Foam::Istream& Foam::operator>>(Istream& is, mapDistribute& map) Foam::Istream& Foam::operator>>(Istream& is, mapDistribute& map)
{ {
is.fatalCheck("operator>>(Istream&, mapDistribute&)"); is.fatalCheck(FUNCTION_NAME);
is >> static_cast<mapDistributeBase&>(map) is >> static_cast<mapDistributeBase&>(map)
>> map.transformElements_ >> map.transformStart_; >> map.transformElements_ >> map.transformStart_;

View File

@ -1248,7 +1248,7 @@ void Foam::mapDistributeBase::operator=(const mapDistributeBase& rhs)
Foam::Istream& Foam::operator>>(Istream& is, mapDistributeBase& map) Foam::Istream& Foam::operator>>(Istream& is, mapDistributeBase& map)
{ {
is.fatalCheck("operator>>(Istream&, mapDistributeBase&)"); is.fatalCheck(FUNCTION_NAME);
is >> map.constructSize_ >> map.subMap_ >> map.constructMap_ is >> map.constructSize_ >> map.subMap_ >> map.constructMap_
>> map.subHasFlip_ >> map.constructHasFlip_; >> map.subHasFlip_ >> map.constructHasFlip_;

View File

@ -309,7 +309,7 @@ void Foam::mapDistributePolyMesh::operator=(const mapDistributePolyMesh& rhs)
Foam::Istream& Foam::operator>>(Istream& is, mapDistributePolyMesh& map) Foam::Istream& Foam::operator>>(Istream& is, mapDistributePolyMesh& map)
{ {
is.fatalCheck("operator>>(Istream&, mapDistributePolyMesh&)"); is.fatalCheck(FUNCTION_NAME);
is >> map.nOldPoints_ is >> map.nOldPoints_
>> map.nOldFaces_ >> map.nOldFaces_

View File

@ -58,8 +58,7 @@ inline objectMap::objectMap(Istream& is)
// Read master of objectMap // Read master of objectMap
is.readEnd("objectMap"); is.readEnd("objectMap");
// Check state of Istream is.check(FUNCTION_NAME);
is.check("objectMap::objectMap(Istream&)");
} }
@ -115,9 +114,7 @@ inline Ostream& operator<<(Ostream& os, const objectMap& a)
<< a.masterObjects_ << a.masterObjects_
<< token::END_LIST; << token::END_LIST;
// Check state of Ostream os.check(FUNCTION_NAME);
os.check("Ostream& operator<<(Ostream&, const objectMap&)");
return os; return os;
} }
@ -128,9 +125,7 @@ inline Istream& operator>>(Istream& is, objectMap& a)
is >> a.index_ >> a.masterObjects_; is >> a.index_ >> a.masterObjects_;
is.readEnd("objectMap"); is.readEnd("objectMap");
// Check state of Istream is.check(FUNCTION_NAME);
is.check("Istream& operator>>(Istream&, objectMap&)");
return is; return is;
} }

View File

@ -86,12 +86,7 @@ Foam::polyBoundaryMesh::polyBoundaryMesh
); );
} }
// Check state of IOstream is.check(FUNCTION_NAME);
is.check
(
"polyBoundaryMesh::polyBoundaryMesh"
"(const IOobject&, const polyMesh&)"
);
close(); close();
} }
@ -155,12 +150,7 @@ Foam::polyBoundaryMesh::polyBoundaryMesh
); );
} }
// Check state of IOstream is.check(FUNCTION_NAME);
is.check
(
"polyBoundaryMesh::polyBoundaryMesh"
"(const IOobject&, const polyMesh&, const polyPatchList&)"
);
close(); close();
} }
@ -1121,9 +1111,7 @@ bool Foam::polyBoundaryMesh::writeData(Ostream& os) const
os << decrIndent << token::END_LIST; os << decrIndent << token::END_LIST;
// Check state of IOstream os.check(FUNCTION_NAME);
os.check("polyBoundaryMesh::writeData(Ostream& os) const");
return os.good(); return os.good();
} }

View File

@ -114,12 +114,7 @@ Foam::Istream& Foam::operator>>(Istream& is, tetIndices& tI)
>> tI.facePtB() >> tI.facePtB()
>> tI.tetPt(); >> tI.tetPt();
// Check state of Istream is.check(FUNCTION_NAME);
is.check
(
"Foam::Istream& Foam::operator>>(Foam::Istream&, Foam::tetIndices&)"
);
return is; return is;
} }
@ -134,13 +129,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const tetIndices& tI)
<< tI.tetPt() << token::SPACE << tI.tetPt() << token::SPACE
<< endl; << endl;
// Check state of Ostream os.check(FUNCTION_NAME);
os.check
(
"Foam::Ostream& Foam::operator<<(Foam::Ostream&, "
"const Foam::tetIndices&)"
);
return os; return os;
} }

View File

@ -421,7 +421,7 @@ void Foam::polyPatch::operator=(const polyPatch& p)
Foam::Ostream& Foam::operator<<(Ostream& os, const polyPatch& p) Foam::Ostream& Foam::operator<<(Ostream& os, const polyPatch& p)
{ {
p.write(os); p.write(os);
os.check("Ostream& operator<<(Ostream& os, const polyPatch& p"); os.check(FUNCTION_NAME);
return os; return os;
} }

View File

@ -173,7 +173,7 @@ void Foam::cellZone::operator=(const Xfer<labelList>& addr)
Foam::Ostream& Foam::operator<<(Ostream& os, const cellZone& zn) Foam::Ostream& Foam::operator<<(Ostream& os, const cellZone& zn)
{ {
zn.write(os); zn.write(os);
os.check("Ostream& operator<<(Ostream&, const cellZone&"); os.check(FUNCTION_NAME);
return os; return os;
} }

View File

@ -544,7 +544,7 @@ void Foam::faceZone::writeDict(Ostream& os) const
Foam::Ostream& Foam::operator<<(Ostream& os, const faceZone& zn) Foam::Ostream& Foam::operator<<(Ostream& os, const faceZone& zn)
{ {
zn.write(os); zn.write(os);
os.check("Ostream& operator<<(Ostream&, const faceZone&"); os.check(FUNCTION_NAME);
return os; return os;
} }

View File

@ -225,7 +225,7 @@ void Foam::pointZone::operator=(const Xfer<labelList>& addr)
Foam::Ostream& Foam::operator<<(Ostream& os, const pointZone& zn) Foam::Ostream& Foam::operator<<(Ostream& os, const pointZone& zn)
{ {
zn.write(os); zn.write(os);
os.check("Ostream& operator<<(Ostream&, const pointZone&"); os.check(FUNCTION_NAME);
return os; return os;
} }

View File

@ -242,7 +242,7 @@ void Foam::zone::write(Ostream& os) const
Foam::Ostream& Foam::operator<<(Ostream& os, const zone& z) Foam::Ostream& Foam::operator<<(Ostream& os, const zone& z)
{ {
z.write(os); z.write(os);
os.check("Ostream& operator<<(Ostream& f, const zone& z"); os.check(FUNCTION_NAME);
return os; return os;
} }

View File

@ -280,7 +280,7 @@ inline Foam::Istream& Foam::operator>>
is >> l.a_ >> l.b_; is >> l.a_ >> l.b_;
is.readEnd("line"); is.readEnd("line");
is.check("Istream& operator>>(Istream&, line&)"); is.check(FUNCTION_NAME);
return is; return is;
} }

View File

@ -212,12 +212,11 @@ public:
); );
} }
// Check state of Ostream os.check(FUNCTION_NAME);
os.check("Ostream& operator<<(Ostream&, const PointIndexHit&)");
return os; return os;
} }
friend Istream& operator>>(Istream& is, PointIndexHit& pHit) friend Istream& operator>>(Istream& is, PointIndexHit& pHit)
{ {
if (is.format() == IOstream::ASCII) if (is.format() == IOstream::ASCII)
@ -233,9 +232,7 @@ public:
); );
} }
// Check state of Istream is.check(FUNCTION_NAME);
is.check("Istream& operator>>(Istream&, PointIndexHit&)");
return is; return is;
} }

View File

@ -45,7 +45,7 @@ template<class Point, class PointRef, class polygonRef>
inline Foam::pyramid<Point, PointRef, polygonRef>::pyramid(Istream& is) inline Foam::pyramid<Point, PointRef, polygonRef>::pyramid(Istream& is)
{ {
is >> base_ >> apex_; is >> base_ >> apex_;
is.check("pyramid::pyramid(Istream&)"); is.check(FUNCTION_NAME);
} }
@ -105,7 +105,7 @@ inline Foam::Istream& Foam::operator>>
) )
{ {
is >> p.base_ >> p.apex_; is >> p.base_ >> p.apex_;
is.check("Istream& operator>>(Istream&, pyramid&)"); is.check(FUNCTION_NAME);
return is; return is;
} }

View File

@ -967,7 +967,7 @@ inline Foam::Istream& Foam::operator>>
is >> t.a_ >> t.b_ >> t.c_ >> t.d_; is >> t.a_ >> t.b_ >> t.c_ >> t.d_;
is.readEnd("tetrahedron"); is.readEnd("tetrahedron");
is.check("Istream& operator>>(Istream&, tetrahedron&)"); is.check(FUNCTION_NAME);
return is; return is;
} }

View File

@ -869,7 +869,7 @@ inline Foam::Istream& Foam::operator>>
is >> t.a_ >> t.b_ >> t.c_; is >> t.a_ >> t.b_ >> t.c_;
is.readEnd("triangle"); is.readEnd("triangle");
is.check("Istream& operator>>(Istream&, triangle&)"); is.check(FUNCTION_NAME);
return is; return is;
} }

View File

@ -111,9 +111,7 @@ Istream& operator>>(Istream& is, Scalar& s)
return is; return is;
} }
// Check state of Istream is.check(FUNCTION_NAME);
is.check("Istream& operator>>(Istream&, Scalar&)");
return is; return is;
} }
@ -121,7 +119,7 @@ Istream& operator>>(Istream& is, Scalar& s)
Ostream& operator<<(Ostream& os, const Scalar s) Ostream& operator<<(Ostream& os, const Scalar s)
{ {
os.write(s); os.write(s);
os.check("Ostream& operator<<(Ostream&, const Scalar&)"); os.check(FUNCTION_NAME);
return os; return os;
} }

View File

@ -234,9 +234,7 @@ inline Istream& operator>>(Istream& is, Tuple2<Type1, Type2>& t2)
is >> t2.f_ >> t2.s_; is >> t2.f_ >> t2.s_;
is.readEnd("Tuple2"); is.readEnd("Tuple2");
// Check state of Istream is.check(FUNCTION_NAME);
is.check("operator>>(Istream&, Tuple2<Type1, Type2>&)");
return is; return is;
} }

View File

@ -48,7 +48,7 @@ Foam::VectorSpace<Form, Cmpt, Ncmpts>::VectorSpace
is.readEnd("VectorSpace<Form, Cmpt, Ncmpts>"); is.readEnd("VectorSpace<Form, Cmpt, Ncmpts>");
// Check state of Istream // Check state of Istream
is.check("VectorSpace<Form, Cmpt, Ncmpts>::VectorSpace(Istream&)"); is.check(FUNCTION_NAME);
} }
@ -94,7 +94,7 @@ Foam::Istream& Foam::operator>>
is.readEnd("VectorSpace<Form, Cmpt, Ncmpts>"); is.readEnd("VectorSpace<Form, Cmpt, Ncmpts>");
// Check state of Istream // Check state of Istream
is.check("operator>>(Istream&, VectorSpace<Form, Cmpt, Ncmpts>&)"); is.check(FUNCTION_NAME);
return is; return is;
} }
@ -116,9 +116,7 @@ Foam::Ostream& Foam::operator<<
os << token::END_LIST; os << token::END_LIST;
// Check state of Ostream os.check(FUNCTION_NAME);
os.check("operator<<(Ostream&, const VectorSpace<Form, Cmpt, Ncmpts>&)");
return os; return os;
} }

View File

@ -39,7 +39,7 @@ char Foam::readChar(Istream& is)
Foam::Istream& Foam::operator>>(Istream& is, char& c) Foam::Istream& Foam::operator>>(Istream& is, char& c)
{ {
is.read(c); is.read(c);
is.check("Istream& operator>>(Istream&, char&)"); is.check(FUNCTION_NAME);
return is; return is;
} }
@ -47,7 +47,7 @@ Foam::Istream& Foam::operator>>(Istream& is, char& c)
Foam::Ostream& Foam::operator<<(Ostream& os, const char c) Foam::Ostream& Foam::operator<<(Ostream& os, const char c)
{ {
os.write(c); os.write(c);
os.check("Ostream& operator<<(Ostream&, const char)"); os.check(FUNCTION_NAME);
return os; return os;
} }
@ -55,7 +55,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const char c)
Foam::Ostream& Foam::operator<<(Ostream& os, const char* s) Foam::Ostream& Foam::operator<<(Ostream& os, const char* s)
{ {
os.write(s); os.write(s);
os.check("Ostream& operator<<(Ostream&, const char*)"); os.check(FUNCTION_NAME);
return os; return os;
} }

View File

@ -95,7 +95,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const wchar_t wc)
os.write(char(0xBD)); os.write(char(0xBD));
} }
os.check("Ostream& operator<<(Ostream&, const wchar_t)"); os.check(FUNCTION_NAME);
return os; return os;
} }

View File

@ -64,9 +64,7 @@ Foam::Istream& Foam::operator>>(Istream& is, complex& c)
// Read end of complex // Read end of complex
is.readEnd("complex"); is.readEnd("complex");
// Check state of Istream is.check(FUNCTION_NAME);
is.check("operator>>(Istream&, complex&)");
return is; return is;
} }

View File

@ -133,11 +133,7 @@ Foam::Ostream& Foam::operator<<
const Function1<Type>& f1 const Function1<Type>& f1
) )
{ {
// Check state of Ostream os.check(FUNCTION_NAME);
os.check
(
"Ostream& operator<<(Ostream&, const Function1<Type>&)"
);
os << f1.name_; os << f1.name_;
f1.writeData(os); f1.writeData(os);

View File

@ -37,12 +37,7 @@ Foam::Ostream& Foam::operator<<
os << static_cast os << static_cast
<VectorSpace<Polynomial<PolySize>, scalar, PolySize>>(poly); <VectorSpace<Polynomial<PolySize>, scalar, PolySize>>(poly);
// Check state of Ostream os.check(FUNCTION_NAME);
os.check
(
"Ostream& operator<<(Ostream&, const Polynomial<PolySize>&)"
);
return os; return os;
} }

View File

@ -320,7 +320,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const polynomialFunction& poly)
// Check state of Ostream // Check state of Ostream
os.check("operator<<(Ostream&, const polynomialFunction&)"); os.check(FUNCTION_NAME);
return os; return os;
} }

View File

@ -107,7 +107,7 @@ Foam::Istream& Foam::operator>>(Istream& is, vectorTensorTransform& tr)
is.readEnd("vectorTensorTransform"); is.readEnd("vectorTensorTransform");
// Check state of Istream // Check state of Istream
is.check("operator>>(Istream&, vectorTensorTransform&)"); is.check(FUNCTION_NAME);
return is; return is;
} }

View File

@ -147,7 +147,7 @@ Foam::Ostream& Foam::SHA1Digest::write(Ostream& os, const bool prefixed) const
os.write(hexChars[(v_[i] & 0xF)]); os.write(hexChars[(v_[i] & 0xF)]);
} }
os.check("SHA1Digest::write(Ostream&, const bool)"); os.check(FUNCTION_NAME);
return os; return os;
} }
@ -268,7 +268,7 @@ Foam::Istream& Foam::operator>>(Istream& is, SHA1Digest& dig)
v[i] = (c1 << 4) + c2; v[i] = (c1 << 4) + c2;
} }
is.check("Istream& operator>>(Istream&, SHA1Digest&)"); is.check(FUNCTION_NAME);
return is; return is;
} }

View File

@ -71,9 +71,7 @@ Foam::Istream& Foam::operator>>(Istream& is, int32_t& i)
return is; return is;
} }
// Check state of Istream is.check(FUNCTION_NAME);
is.check("Istream& operator>>(Istream&, int32_t&)");
return is; return is;
} }
@ -102,7 +100,7 @@ bool Foam::read(const char* buf, int32_t& s)
Foam::Ostream& Foam::operator<<(Ostream& os, const int32_t i) Foam::Ostream& Foam::operator<<(Ostream& os, const int32_t i)
{ {
os.write(label(i)); os.write(label(i));
os.check("Ostream& operator<<(Ostream&, const int32_t)"); os.check(FUNCTION_NAME);
return os; return os;
} }

View File

@ -71,9 +71,7 @@ Foam::Istream& Foam::operator>>(Istream& is, int64_t& i)
return is; return is;
} }
// Check state of Istream is.check(FUNCTION_NAME);
is.check("Istream& operator>>(Istream&, int64_t&)");
return is; return is;
} }
@ -100,7 +98,7 @@ bool Foam::read(const char* buf, int64_t& s)
Foam::Ostream& Foam::operator<<(Ostream& os, const int64_t i) Foam::Ostream& Foam::operator<<(Ostream& os, const int64_t i)
{ {
os.write(label(i)); os.write(label(i));
os.check("Ostream& operator<<(Ostream&, const int64_t)"); os.check(FUNCTION_NAME);
return os; return os;
} }

View File

@ -69,9 +69,7 @@ Foam::Istream& Foam::operator>>(Istream& is, uint32_t& i)
return is; return is;
} }
// Check state of Istream is.check(FUNCTION_NAME);
is.check("Istream& operator>>(Istream&, uint32_t&)");
return is; return is;
} }
@ -97,7 +95,7 @@ bool Foam::read(const char* buf, uint32_t& s)
Foam::Ostream& Foam::operator<<(Ostream& os, const uint32_t i) Foam::Ostream& Foam::operator<<(Ostream& os, const uint32_t i)
{ {
os.write(label(i)); os.write(label(i));
os.check("Ostream& operator<<(Ostream&, const uint32_t)"); os.check(FUNCTION_NAME);
return os; return os;
} }

View File

@ -69,9 +69,7 @@ Foam::Istream& Foam::operator>>(Istream& is, uint64_t& i)
return is; return is;
} }
// Check state of Istream is.check(FUNCTION_NAME);
is.check("Istream& operator>>(Istream&, uint64_t&)");
return is; return is;
} }
@ -97,7 +95,7 @@ bool Foam::read(const char* buf, uint64_t& s)
Foam::Ostream& Foam::operator<<(Ostream& os, const uint64_t i) Foam::Ostream& Foam::operator<<(Ostream& os, const uint64_t i)
{ {
os.write(label(i)); os.write(label(i));
os.check("Ostream& operator<<(Ostream&, const uint64_t)"); os.check(FUNCTION_NAME);
return os; return os;
} }

View File

@ -159,9 +159,7 @@ Foam::Istream& Foam::operator>>(Istream& is, quaternion& q)
// Read end of quaternion // Read end of quaternion
is.readEnd("quaternion"); is.readEnd("quaternion");
// Check state of Istream is.check(FUNCTION_NAME);
is.check("operator>>(Istream&, quaternion&)");
return is; return is;
} }

View File

@ -185,7 +185,7 @@ Foam::Istream& Foam::operator>>(Istream& is, labelRange& range)
is >> range.start_ >> range.size_; is >> range.start_ >> range.size_;
is.readEnd("labelRange"); is.readEnd("labelRange");
is.check("operator>>(Istream&, labelRange&)"); is.check(FUNCTION_NAME);
// Disallow invalid sizes // Disallow invalid sizes
if (range.size_ < 0) if (range.size_ < 0)
@ -204,7 +204,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const labelRange& range)
<< range.start() << token::SPACE << range.size() << range.start() << token::SPACE << range.size()
<< token::END_LIST; << token::END_LIST;
os.check("operator<<(Ostream&, const labelRange&)"); os.check(FUNCTION_NAME);
return os; return os;
} }

View File

@ -111,9 +111,7 @@ Foam::Istream& Foam::operator>>(Istream& is, septernion& s)
// Read end of septernion // Read end of septernion
is.readEnd("septernion"); is.readEnd("septernion");
// Check state of Istream is.check(FUNCTION_NAME);
is.check("operator>>(Istream&, septernion&)");
return is; return is;
} }

View File

@ -62,9 +62,7 @@ Foam::Istream& Foam::operator>>(Istream& is, fileName& fn)
fn.stripInvalid(); fn.stripInvalid();
// Check state of Istream is.check(FUNCTION_NAME);
is.check("Istream& operator>>(Istream&, fileName&)");
return is; return is;
} }
@ -72,7 +70,7 @@ Foam::Istream& Foam::operator>>(Istream& is, fileName& fn)
Foam::Ostream& Foam::operator<<(Ostream& os, const fileName& fn) Foam::Ostream& Foam::operator<<(Ostream& os, const fileName& fn)
{ {
os.write(fn); os.write(fn);
os.check("Ostream& operator<<(Ostream&, const fileName&)"); os.check(FUNCTION_NAME);
return os; return os;
} }

View File

@ -104,9 +104,7 @@ Foam::Istream& Foam::operator>>(Istream& is, keyType& kw)
return is; return is;
} }
// Check state of IOstream is.check(FUNCTION_NAME);
is.check("Istream& operator>>(Istream&, keyType&)");
return is; return is;
} }
@ -114,7 +112,7 @@ Foam::Istream& Foam::operator>>(Istream& is, keyType& kw)
Foam::Ostream& Foam::operator<<(Ostream& os, const keyType& kw) Foam::Ostream& Foam::operator<<(Ostream& os, const keyType& kw)
{ {
os.write(kw); os.write(kw);
os.check("Ostream& operator<<(Ostream&, const keyType&)"); os.check(FUNCTION_NAME);
return os; return os;
} }

View File

@ -60,9 +60,7 @@ Foam::Istream& Foam::operator>>(Istream& is, string& s)
return is; return is;
} }
// Check state of Istream is.check(FUNCTION_NAME);
is.check("Istream& operator>>(Istream&, string&)");
return is; return is;
} }
@ -70,7 +68,7 @@ Foam::Istream& Foam::operator>>(Istream& is, string& s)
Foam::Ostream& Foam::operator<<(Ostream& os, const string& s) Foam::Ostream& Foam::operator<<(Ostream& os, const string& s)
{ {
os.write(s); os.write(s);
os.check("Ostream& operator<<(Ostream&, const string&)"); os.check(FUNCTION_NAME);
return os; return os;
} }
@ -78,7 +76,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const string& s)
Foam::Ostream& Foam::operator<<(Ostream& os, const std::string& s) Foam::Ostream& Foam::operator<<(Ostream& os, const std::string& s)
{ {
os.write(string(s)); os.write(string(s));
os.check("Ostream& operator<<(Ostream&, const std::string&)"); os.check(FUNCTION_NAME);
return os; return os;
} }

View File

@ -79,9 +79,7 @@ Foam::Istream& Foam::operator>>(Istream& is, word& w)
return is; return is;
} }
// Check state of IOstream is.check(FUNCTION_NAME);
is.check("Istream& operator>>(Istream&, word&)");
return is; return is;
} }
@ -89,7 +87,7 @@ Foam::Istream& Foam::operator>>(Istream& is, word& w)
Foam::Ostream& Foam::operator<<(Ostream& os, const word& w) Foam::Ostream& Foam::operator<<(Ostream& os, const word& w)
{ {
os.write(w); os.write(w);
os.check("Ostream& operator<<(Ostream&, const word&)"); os.check(FUNCTION_NAME);
return os; return os;
} }

View File

@ -85,9 +85,7 @@ Foam::Istream& Foam::operator>>(Istream& is, wordRe& w)
return is; return is;
} }
// Check state of IOstream is.check(FUNCTION_NAME);
is.check("Istream& operator>>(Istream&, wordRe&)");
return is; return is;
} }
@ -95,7 +93,7 @@ Foam::Istream& Foam::operator>>(Istream& is, wordRe& w)
Foam::Ostream& Foam::operator<<(Ostream& os, const wordRe& w) Foam::Ostream& Foam::operator<<(Ostream& os, const wordRe& w)
{ {
os.writeQuoted(w, w.isPattern()); os.writeQuoted(w, w.isPattern());
os.check("Ostream& operator<<(Ostream&, const wordRe&)"); os.check(FUNCTION_NAME);
return os; return os;
} }

View File

@ -100,7 +100,7 @@ void Foam::boundaryPatch::write(Ostream& os) const
Foam::Ostream& Foam::operator<<(Ostream& os, const boundaryPatch& p) Foam::Ostream& Foam::operator<<(Ostream& os, const boundaryPatch& p)
{ {
p.write(os); p.write(os);
os.check("Ostream& operator<<(Ostream& f, const boundaryPatch&)"); os.check(FUNCTION_NAME);
return os; return os;
} }

View File

@ -218,10 +218,8 @@ Foam::Ostream& Foam::operator<<
); );
} }
// Check state of Ostream os.check(FUNCTION_NAME);
os.check("Ostream& operator<<(Ostream&, const directionInfo&)");
return os; return os;
} }
@ -240,8 +238,7 @@ Foam::Istream& Foam::operator>>(Foam::Istream& is, Foam::directionInfo& wDist)
); );
} }
// Check state of Istream is.check(FUNCTION_NAME);
is.check("Istream& operator>>(Istream&, directionInfo&)");
return is; return is;
} }

View File

@ -46,11 +46,11 @@ Foam::Ostream& Foam::operator<<
); );
} }
// Check state of Ostream os.check(FUNCTION_NAME);
os.check("Ostream& operator<<(Ostream&, const wallNormalInfo&)");
return os; return os;
} }
Foam::Istream& Foam::operator>>(Foam::Istream& is, Foam::wallNormalInfo& wDist) Foam::Istream& Foam::operator>>(Foam::Istream& is, Foam::wallNormalInfo& wDist)
{ {
if (is.format() == IOstream::ASCII) if (is.format() == IOstream::ASCII)
@ -66,9 +66,9 @@ Foam::Istream& Foam::operator>>(Foam::Istream& is, Foam::wallNormalInfo& wDist)
); );
} }
// Check state of Istream is.check(FUNCTION_NAME);
is.check("Istream& operator>>(Istream&, wallNormalInfo&)");
return is; return is;
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -77,7 +77,7 @@ const Foam::polyTopoChanger& Foam::polyMeshModifier::topoChanger() const
Foam::Ostream& Foam::operator<<(Ostream& os, const polyMeshModifier& pmm) Foam::Ostream& Foam::operator<<(Ostream& os, const polyMeshModifier& pmm)
{ {
pmm.write(os); pmm.write(os);
os.check("Ostream& operator<<(Ostream& f, const polyMeshModifier& pmm)"); os.check(FUNCTION_NAME);
return os; return os;
} }

View File

@ -46,8 +46,7 @@ Foam::Ostream& Foam::operator<<
); );
} }
// Check state of Ostream os.check(FUNCTION_NAME);
os.check("Ostream& operator<<(Ostream&, const refinementData&)");
return os; return os;
} }
@ -67,8 +66,7 @@ Foam::Istream& Foam::operator>>(Foam::Istream& is, Foam::refinementData& wDist)
); );
} }
// Check state of Istream is.check(FUNCTION_NAME);
is.check("Istream& operator>>(Istream&, refinementData&)");
return is; return is;
} }

View File

@ -74,7 +74,7 @@ void Foam::polyTopoChanger::readModifiers()
} }
// Check state of IOstream // Check state of IOstream
is.check("polyTopoChanger::readModifiers()"); is.check(FUNCTION_NAME);
close(); close();
} }

View File

@ -58,7 +58,7 @@ Foam::ignitionSite::ignitionSite
timeIndex_(db_.timeIndex()) timeIndex_(db_.timeIndex())
{ {
// Check state of Istream // Check state of Istream
is.check("ignitionSite::ignitionSite(Istream&)"); is.check(FUNCTION_NAME);
findIgnitionCells(mesh_); findIgnitionCells(mesh_);
} }
@ -94,7 +94,7 @@ Foam::ignitionSite::ignitionSite
timeIndex_(db_.timeIndex()) timeIndex_(db_.timeIndex())
{ {
// Check state of Istream // Check state of Istream
is.check("ignitionSite::ignitionSite(Istream&)"); is.check(FUNCTION_NAME);
findIgnitionCells(mesh_); findIgnitionCells(mesh_);
} }

View File

@ -39,7 +39,7 @@ Foam::eddy::eddy(Istream& is)
c1_(readScalar(is)), c1_(readScalar(is)),
dir1_(readLabel(is)) dir1_(readLabel(is))
{ {
is.check("Foam::eddy::eddy(Foam::Istream&)"); is.check(FUNCTION_NAME);
} }
@ -62,11 +62,7 @@ void Foam::eddy::operator=(const eddy& e)
Foam::Istream& Foam::operator>>(Istream& is, eddy& e) Foam::Istream& Foam::operator>>(Istream& is, eddy& e)
{ {
is.check is.check(FUNCTION_NAME);
(
"Foam::Istream& Foam::operator>>"
"(Foam::Istream&, Foam::eddy&)"
);
is >> e.patchFaceI_ is >> e.patchFaceI_
>> e.position0_ >> e.position0_
@ -77,23 +73,14 @@ Foam::Istream& Foam::operator>>(Istream& is, eddy& e)
>> e.c1_ >> e.c1_
>> e.dir1_; >> e.dir1_;
is.check is.check(FUNCTION_NAME);
(
"Foam::Istream& Foam::operator>>"
"(Foam::Istream&, Foam::eddy&)"
);
return is; return is;
} }
Foam::Ostream& Foam::operator<<(Ostream& os, const eddy& e) Foam::Ostream& Foam::operator<<(Ostream& os, const eddy& e)
{ {
os.check os.check(FUNCTION_NAME);
(
"Foam::Ostream& Foam::operator<<"
"(Foam::Ostream&, const Foam::eddy&)"
);
os << e.patchFaceI_ << token::SPACE os << e.patchFaceI_ << token::SPACE
<< e.position0_ << token::SPACE << e.position0_ << token::SPACE
@ -104,12 +91,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const eddy& e)
<< e.c1_ << token::SPACE << e.c1_ << token::SPACE
<< e.dir1_; << e.dir1_;
os.check os.check(FUNCTION_NAME);
(
"Foam::Ostream& Foam::operator<<"
"(Foam::Ostream&, const Foam::eddy&)"
);
return os; return os;
} }

View File

@ -594,7 +594,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const fvPatchField<Type>& ptf)
{ {
ptf.write(os); ptf.write(os);
os.check("Ostream& operator<<(Ostream&, const fvPatchField<Type>&"); os.check(FUNCTION_NAME);
return os; return os;
} }

View File

@ -376,7 +376,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const fvsPatchField<Type>& ptf)
{ {
ptf.write(os); ptf.write(os);
os.check("Ostream& operator<<(Ostream&, const fvsPatchField<Type>&"); os.check(FUNCTION_NAME);
return os; return os;
} }

View File

@ -2387,7 +2387,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const fvMatrix<Type>& fvm)
<< fvm.internalCoeffs_ << nl << fvm.internalCoeffs_ << nl
<< fvm.boundaryCoeffs_ << endl; << fvm.boundaryCoeffs_ << endl;
os.check("Ostream& operator<<(Ostream&, fvMatrix<Type>&"); os.check(FUNCTION_NAME);
return os; return os;
} }

View File

@ -40,11 +40,7 @@ Foam::functionObjects::fieldAverageItem::fieldAverageItem(Istream& is)
base_(ITER), base_(ITER),
window_(-1.0) window_(-1.0)
{ {
is.check is.check(FUNCTION_NAME);
(
"Foam::functionObjects::fieldAverageItem::fieldAverageItem"
"(Foam::Istream&)"
);
const dictionaryEntry entry(dictionary::null, is); const dictionaryEntry entry(dictionary::null, is);
@ -73,11 +69,7 @@ Foam::Istream& Foam::functionObjects::operator>>
fieldAverageItem& faItem fieldAverageItem& faItem
) )
{ {
is.check is.check(FUNCTION_NAME);
(
"Foam::Istream& Foam::operator>>"
"(Foam::Istream&, Foam::functionObjects::fieldAverageItem&)"
);
const dictionaryEntry entry(dictionary::null, is); const dictionaryEntry entry(dictionary::null, is);
@ -111,11 +103,7 @@ Foam::Ostream& Foam::functionObjects::operator<<
const fieldAverageItem& faItem const fieldAverageItem& faItem
) )
{ {
os.check os.check(FUNCTION_NAME);
(
"Foam::Ostream& Foam::operator<<"
"(Foam::Ostream&, const Foam::functionObjects::fieldAverageItem&)"
);
os << faItem.fieldName_ << nl << token::BEGIN_BLOCK << nl; os << faItem.fieldName_ << nl << token::BEGIN_BLOCK << nl;
os.writeKeyword("mean") << faItem.mean_ << token::END_STATEMENT << nl; os.writeKeyword("mean") << faItem.mean_ << token::END_STATEMENT << nl;
@ -138,12 +126,7 @@ Foam::Ostream& Foam::functionObjects::operator<<
os << token::END_BLOCK << nl; os << token::END_BLOCK << nl;
os.check os.check(FUNCTION_NAME);
(
"Foam::Ostream& Foam::operator<<"
"(Foam::Ostream&, const Foam::functionObjects::fieldAverageItem&)"
);
return os; return os;
} }

View File

@ -70,12 +70,7 @@ Foam::findCellParticle::findCellParticle
} }
} }
// Check state of Istream is.check(FUNCTION_NAME);
is.check
(
"findCellParticle::findCellParticle"
"(const Cloud<findCellParticle>&, Istream&, bool)"
);
} }
@ -227,9 +222,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const findCellParticle& p)
); );
} }
// Check state of Ostream os.check(FUNCTION_NAME);
os.check("Ostream& operator<<(Ostream&, const findCellParticle&)");
return os; return os;
} }

View File

@ -148,12 +148,7 @@ Foam::streamLineParticle::streamLineParticle
} }
} }
// Check state of Istream is.check(FUNCTION_NAME);
is.check
(
"streamLineParticle::streamLineParticle"
"(const Cloud<streamLineParticle>&, Istream&, bool)"
);
} }
@ -497,9 +492,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const streamLineParticle& p)
<< token::SPACE << p.sampledScalars_ << token::SPACE << p.sampledScalars_
<< token::SPACE << p.sampledVectors_; << token::SPACE << p.sampledVectors_;
// Check state of Ostream os.check(FUNCTION_NAME);
os.check("Ostream& operator<<(Ostream&, const streamLineParticle&)");
return os; return os;
} }

View File

@ -331,12 +331,7 @@ Foam::wallBoundedParticle::wallBoundedParticle
} }
} }
// Check state of Istream is.check(FUNCTION_NAME);
is.check
(
"wallBoundedParticle::wallBoundedParticle"
"(const Cloud<wallBoundedParticle>&, Istream&, bool)"
);
} }

View File

@ -185,12 +185,7 @@ Foam::wallBoundedStreamLineParticle::wallBoundedStreamLineParticle
} }
} }
// Check state of Istream is.check(FUNCTION_NAME);
is.check
(
"wallBoundedStreamLineParticle::wallBoundedStreamLineParticle"
"(const Cloud<wallBoundedStreamLineParticle>&, Istream&, bool)"
);
} }
@ -422,12 +417,7 @@ Foam::Ostream& Foam::operator<<
<< token::SPACE << p.sampledScalars_ << token::SPACE << p.sampledScalars_
<< token::SPACE << p.sampledVectors_; << token::SPACE << p.sampledVectors_;
// Check state of Ostream os.check(FUNCTION_NAME);
os.check
(
"Ostream& operator<<(Ostream&, const wallBoundedStreamLineParticle&)"
);
return os; return os;
} }

View File

@ -66,12 +66,7 @@ Foam::DSMCParcel<ParcelType>::DSMCParcel
} }
} }
// Check state of Istream is.check(FUNCTION_NAME);
is.check
(
"DSMCParcel<ParcelType>::DSMCParcel"
"(const Cloud<ParcelType>&, Istream&, bool)"
);
} }
@ -164,12 +159,7 @@ Foam::Ostream& Foam::operator<<
); );
} }
// Check state of Ostream os.check(FUNCTION_NAME);
os.check
(
"Ostream& operator<<(Ostream&, const DSMCParcel<ParcelType>&)"
);
return os; return os;
} }

Some files were not shown because too many files have changed in this diff Show More