Jpp  master_rocky
the software that should make you happy
JDBString.hh
Go to the documentation of this file.
1 #ifndef __JDB_JDBString__
2 #define __JDB_JDBString__
3 
4 #include <TROOT.h>
5 
6 #include <string>
7 #include <istream>
8 
9 /**
10  * \author mdejong
11  */
12 namespace JDATABASE {}
13 namespace JPP { using namespace JDATABASE; }
14 
15 namespace JDATABASE {
16 
17  /**
18  * Wrapper class to read string until end-of-line.
19  */
20  struct JDBString :
21  public std::string
22  {
23  /**
24  * Copy constructor.
25  *
26  * \param buffer buffer
27  */
28  JDBString(const std::string& buffer = "") :
29  std::string(buffer)
30  {}
31 
32  /**
33  * Read database string from input stream.
34  *
35  * \param in input stream
36  * \param object database string
37  * \return input stream
38  */
39  friend inline std::istream& operator>>(std::istream& in, JDBString& object)
40  {
41  using namespace std;
42 
43  return getline(in, object);
44  }
45 
47  };
48 }
49 
50 #endif
Auxiliary classes and methods for database I/O.
Definition: JAHRS.hh:14
std::istream & getline(std::istream &in, JString &object)
Read string from input stream until end of line.
Definition: JString.hh:478
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Definition: JSTDTypes.hh:14
Wrapper class to read string until end-of-line.
Definition: JDBString.hh:22
JDBString(const std::string &buffer="")
Copy constructor.
Definition: JDBString.hh:28
ClassDefNV(JDBString, 1)
friend std::istream & operator>>(std::istream &in, JDBString &object)
Read database string from input stream.
Definition: JDBString.hh:39