MINT2
NamedParameterStream.h
Go to the documentation of this file.
1 #ifndef NAMEDPARAMETERSTREAM_HH
2 #define NAMEDPARAMETERSTREAM_HH
3 // author: Jonas Rademacker (Jonas.Rademacker@bristol.ac.uk)
4 // status: Mon 9 Feb 2009 19:17:56 GMT
5 
6 /*
7  The NamedParameterStream is essentially a stringstream, but
8  creating my own class allows specialisations on how
9  certain data types are read in by NamedParameter
10  (previously attempted with template
11  specialisation, of NamedParameter, but compiler won't have it)
12 */
13 
14 #include <string>
15 #include <sstream>
16 
17 namespace MINT{
18 class NamedParameterStream : public std::stringstream{
19  public:
20  explicit NamedParameterStream( openmode which = ios_base::out|ios_base::in )
21  : std::stringstream(which){}
22  explicit NamedParameterStream( const std::string & str,
23  openmode which = ios_base::out|ios_base::in )
24  : std::stringstream(str, which){}
25 
26  // NamedParameterStream(const NamedParameterStream& other)
27  // : std::stringstream(other){}
28 };
29 
30 NamedParameterStream& operator>>(NamedParameterStream& eam
31  , std::string& ing
32  );
33 
34 }// namespace MINT
35 #endif
36 //
NamedParameterStream & operator>>(NamedParameterStream &eam, std::string &ing)
NamedParameterStream(openmode which=ios_base::out|ios_base::in)
NamedParameterStream(const std::string &str, openmode which=ios_base::out|ios_base::in)