mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: more consistent order of ITstream constructor parameters
This commit is contained in:
@ -210,9 +210,9 @@ Foam::ITstream::ITstream
|
||||
|
||||
Foam::ITstream::ITstream
|
||||
(
|
||||
const string& name,
|
||||
const UList<token>& tokens,
|
||||
IOstreamOption streamOpt
|
||||
IOstreamOption streamOpt,
|
||||
const string& name
|
||||
)
|
||||
:
|
||||
Istream(streamOpt.format(), streamOpt.version()),
|
||||
@ -227,9 +227,9 @@ Foam::ITstream::ITstream
|
||||
|
||||
Foam::ITstream::ITstream
|
||||
(
|
||||
const string& name,
|
||||
List<token>&& tokens,
|
||||
IOstreamOption streamOpt
|
||||
IOstreamOption streamOpt,
|
||||
const string& name
|
||||
)
|
||||
:
|
||||
Istream(streamOpt.format(), streamOpt.version()),
|
||||
|
||||
@ -101,20 +101,20 @@ public:
|
||||
IOstreamOption streamOpt = IOstreamOption()
|
||||
);
|
||||
|
||||
//- Copy construct from tokens, with given name
|
||||
ITstream
|
||||
//- Copy construct from tokens, optionally with given name
|
||||
explicit ITstream
|
||||
(
|
||||
const string& name,
|
||||
const UList<token>& tokens,
|
||||
IOstreamOption streamOpt = IOstreamOption()
|
||||
IOstreamOption streamOpt = IOstreamOption(),
|
||||
const string& name = "input"
|
||||
);
|
||||
|
||||
//- Move construct from tokens, with given name
|
||||
ITstream
|
||||
//- Move construct from tokens, optionally with given name
|
||||
explicit ITstream
|
||||
(
|
||||
const string& name,
|
||||
List<token>&& tokens,
|
||||
IOstreamOption streamOpt = IOstreamOption()
|
||||
IOstreamOption streamOpt = IOstreamOption(),
|
||||
const string& name = "input"
|
||||
);
|
||||
|
||||
//- Construct token list by parsing the input character sequence
|
||||
@ -145,6 +145,31 @@ public:
|
||||
);
|
||||
|
||||
|
||||
// Additional constructors
|
||||
|
||||
//- Copy construct from tokens, with given name
|
||||
ITstream
|
||||
(
|
||||
const string& name,
|
||||
const UList<token>& tokens,
|
||||
IOstreamOption streamOpt = IOstreamOption()
|
||||
)
|
||||
:
|
||||
ITstream(tokens, streamOpt, name)
|
||||
{}
|
||||
|
||||
//- Move construct from tokens, with given name
|
||||
ITstream
|
||||
(
|
||||
const string& name,
|
||||
List<token>&& tokens,
|
||||
IOstreamOption streamOpt = IOstreamOption()
|
||||
)
|
||||
:
|
||||
ITstream(std::move(tokens), streamOpt, name)
|
||||
{}
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~ITstream() = default;
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@ void Foam::simpleObjectRegistry::setValues
|
||||
IStringStream is(os.str());
|
||||
|
||||
// Or alternatively?
|
||||
// ITstream is(name, dEntry.dict().tokens());
|
||||
// ITstream is(dEntry.dict().tokens());
|
||||
|
||||
for (simpleRegIOobject* obj : objects)
|
||||
{
|
||||
@ -129,11 +129,11 @@ void Foam::simpleObjectRegistry::setNamedValue
|
||||
|
||||
if (objPtr)
|
||||
{
|
||||
// The generic interface requires an Istream.
|
||||
ITstream is("", tokenList(Foam::one{}, tok));
|
||||
|
||||
Log << name.c_str() << '=' << tok << nl;
|
||||
|
||||
// The generic interface requires an Istream.
|
||||
ITstream is(tokenList(Foam::one{}, std::move(tok)));
|
||||
|
||||
const List<simpleRegIOobject*>& objects = *objPtr;
|
||||
|
||||
for (simpleRegIOobject* obj : objects)
|
||||
|
||||
Reference in New Issue
Block a user