mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
make output compatible with dictionary entries
This commit is contained in:
@ -77,7 +77,7 @@ Foam::Istream& Foam::operator>>(Foam::Istream& is, FixedList<T, Size>& L)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Putback the openning bracket
|
// Putback the opening bracket
|
||||||
is.putBack(firstToken);
|
is.putBack(firstToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -190,8 +190,9 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const FixedList<T, Size>& L)
|
|||||||
|
|
||||||
if (uniform)
|
if (uniform)
|
||||||
{
|
{
|
||||||
// Write size of list and start contents delimiter
|
// Write size of list (so it is valid dictionary entry) and
|
||||||
os << token::BEGIN_BLOCK;
|
// start contents delimiter
|
||||||
|
os << L.size() << token::BEGIN_BLOCK;
|
||||||
|
|
||||||
// Write list contents
|
// Write list contents
|
||||||
os << L[0];
|
os << L[0];
|
||||||
@ -201,7 +202,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const FixedList<T, Size>& L)
|
|||||||
}
|
}
|
||||||
else if (Size < 11 && contiguous<T>())
|
else if (Size < 11 && contiguous<T>())
|
||||||
{
|
{
|
||||||
// Write size of list and start contents delimiter
|
// Write start of contents delimiter
|
||||||
os << token::BEGIN_LIST;
|
os << token::BEGIN_LIST;
|
||||||
|
|
||||||
// Write list contents
|
// Write list contents
|
||||||
@ -216,7 +217,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const FixedList<T, Size>& L)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Write size of list and start contents delimiter
|
// Write start of contents delimiter
|
||||||
os << nl << token::BEGIN_LIST;
|
os << nl << token::BEGIN_LIST;
|
||||||
|
|
||||||
// Write list contents
|
// Write list contents
|
||||||
|
|||||||
Reference in New Issue
Block a user