From 2c815e5b84f805a5d219739ab08d736a7e736b87 Mon Sep 17 00:00:00 2001 From: Mark Olesen <Mark.Olesen@Germany> Date: Tue, 15 Dec 2009 12:59:50 +0100 Subject: [PATCH] Improve ITstream constructors. - Use (const UList<token>&) instead of (const List<token>&) - Add (const Xfer< List<token> >&) constructor. --- src/OpenFOAM/db/IOstreams/Tstreams/ITstream.H | 24 ++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/src/OpenFOAM/db/IOstreams/Tstreams/ITstream.H b/src/OpenFOAM/db/IOstreams/Tstreams/ITstream.H index 891c8f0dab8..fdc1717069e 100644 --- a/src/OpenFOAM/db/IOstreams/Tstreams/ITstream.H +++ b/src/OpenFOAM/db/IOstreams/Tstreams/ITstream.H @@ -70,7 +70,26 @@ public: ITstream ( const string& name, - const tokenList& tokens, + const UList<token>& tokens, + streamFormat format=ASCII, + versionNumber version=currentVersion + ) + : + Istream(format, version), + tokenList(tokens), + name_(name), + tokenIndex_(0) + { + setOpened(); + setGood(); + } + + + //- Construct from components, transferring the tokens + ITstream + ( + const string& name, + const Xfer< List<token> >& tokens, streamFormat format=ASCII, versionNumber version=currentVersion ) @@ -98,8 +117,7 @@ public: } - // Destructor - + //- Destructor virtual ~ITstream() {} -- GitLab