Jpp 19.3.0-rc.1
the software that should make you happy
Loading...
Searching...
No Matches
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 */
12namespace JDATABASE {}
13namespace JPP { using namespace JDATABASE; }
14
15namespace 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
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
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