Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
ae2815e7
Commit
ae2815e7
authored
Oct 11, 2010
by
Andrew Heather
Browse files
ENH: Added INew construct from dictionary
parent
f2c3ba65
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/OpenFOAM/db/IOstreams/IOstreams/INew.H
View file @
ae2815e7
...
...
@@ -25,7 +25,7 @@ Class
Foam::INew
Description
A helper class when constructing from an Istream
A helper class when constructing from an Istream
or dictionary
\*---------------------------------------------------------------------------*/
...
...
@@ -52,18 +52,33 @@ class INew
public:
//- Construct null
INew
()
{}
//- Construct from Istream
autoPtr
<
T
>
operator
()(
Istream
&
is
)
const
{
return
T
::
New
(
is
);
}
//- Construct from word and Istream
autoPtr
<
T
>
operator
()(
const
word
&
,
Istream
&
is
)
const
{
return
T
::
New
(
is
);
}
//- Construct from dictionary
autoPtr
<
T
>
operator
()(
const
dictionary
&
dict
)
const
{
return
T
::
New
(
dict
);
}
//- Construct from word and dictionary
autoPtr
<
T
>
operator
()(
const
word
&
,
const
dictionary
&
dict
)
const
{
return
T
::
New
(
dict
);
}
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment