mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: Ostream: streaming of unexpanded variables over processorstreams
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -172,6 +172,13 @@ Foam::Istream& Foam::UIPstream::read(token& t)
|
||||
t.type() = token::VERBATIMSTRING;
|
||||
return *this;
|
||||
}
|
||||
case token::VARIABLE :
|
||||
{
|
||||
// Recurse to read actual string
|
||||
read(t);
|
||||
t.type() = token::VARIABLE;
|
||||
return *this;
|
||||
}
|
||||
case token::STRING :
|
||||
{
|
||||
string* pval = new string;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -159,6 +159,11 @@ Foam::Ostream& Foam::UOPstream::write(const token& t)
|
||||
write(char(token::VERBATIMSTRING));
|
||||
write(t.stringToken());
|
||||
}
|
||||
else if (t.type() == token::VARIABLE)
|
||||
{
|
||||
write(char(token::VARIABLE));
|
||||
write(t.stringToken());
|
||||
}
|
||||
else
|
||||
{
|
||||
notImplemented("Ostream& UOPstream::write(const token&)");
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -39,6 +39,10 @@ Foam::Ostream& Foam::OSstream::write(const token& t)
|
||||
write(char(token::HASH));
|
||||
write(char(token::END_BLOCK));
|
||||
}
|
||||
else if (t.type() == token::VARIABLE)
|
||||
{
|
||||
writeQuoted( t.stringToken(), false);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -75,6 +75,10 @@ Foam::Ostream& Foam::prefixOSstream::write(const token& t)
|
||||
write(char(token::HASH));
|
||||
write(char(token::END_BLOCK));
|
||||
}
|
||||
else if (t.type() == token::VARIABLE)
|
||||
{
|
||||
writeQuoted(t.stringToken(), false);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -75,8 +75,8 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const token& t)
|
||||
break;
|
||||
|
||||
case token::VARIABLE:
|
||||
// Write variable as word so without ""
|
||||
os.writeQuoted(*t.stringTokenPtr_, false);
|
||||
// Behaviour differs according to stream type
|
||||
os.write(t);
|
||||
break;
|
||||
|
||||
case token::LABEL:
|
||||
|
||||
Reference in New Issue
Block a user