pTraits::read: Moved the read<Type>(Istream&) from read.H to pTraits.H
so that primitives can be read from Istream without the need to include IStringStream.H
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -71,6 +71,13 @@ public:
|
||||
};
|
||||
|
||||
|
||||
template<typename Type>
|
||||
inline Type read(Istream& is)
|
||||
{
|
||||
return pTraits<Type>(is);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
@ -32,6 +32,7 @@ Description
|
||||
#ifndef read_H
|
||||
#define read_H
|
||||
|
||||
#include "pTraits.H"
|
||||
#include "IStringStream.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -41,12 +42,6 @@ namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
template<typename Type>
|
||||
inline Type read(Istream& is)
|
||||
{
|
||||
return pTraits<Type>(is);
|
||||
}
|
||||
|
||||
template<typename Type>
|
||||
inline Type read(const string& str)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user