STYLE: relegate special purpose readList<T> function to points of use

- the readList<T>(Istream&) function was introduced to handle command
  -options with either a single or a list value, but was also used for
  the #remove dictionary directive. However, the parsing was fragile
  if the list did not start with a '('.
  Now handle command-line arg/option list directly (via ITstream)
  and #remove with special-purpose reading of a string or word list.

  This removes ambiguity and reduces potential future problems.

STYLE: use ITstream instead of IStringStream for command-line lookups

- parses directly to a tokenList without a string copy.
This commit is contained in:
Mark Olesen
2017-11-26 12:45:49 +01:00
parent 5947f9a337
commit 2787a8664d
10 changed files with 115 additions and 71 deletions

View File

@ -27,7 +27,7 @@ License
#include "IOstreams.H"
#include "ISstream.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
@ -47,7 +47,7 @@ namespace Foam
}
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
Foam::token Foam::functionEntry::readLine(const word& key, Istream& is)
{