Jpp test-rotations-old-533-g2bdbdb559
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 * Default constructor.
25 */
27 std::string()
28 {}
29
30 /**
31 * Copy constructor.
32 *
33 * \param buffer buffer
34 */
35 JDBString(const std::string& buffer) :
36 std::string(buffer)
37 {}
38
39 /**
40 * Copy constructor.
41 *
42 * \param buffer buffer
43 */
44 JDBString(const char* const buffer) :
45 std::string(buffer)
46 {}
47
48 /**
49 * Read database string from input stream.
50 *
51 * \param in input stream
52 * \param object database string
53 * \return input stream
54 */
55 friend inline std::istream& operator>>(std::istream& in, JDBString& object)
56 {
57 using namespace std;
58
59 return getline(in, object);
60 }
61
63 };
64}
65
66#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
ClassDefNV(JDBString, 1)
JDBString(const std::string &buffer)
Copy constructor.
Definition JDBString.hh:35
JDBString(const char *const buffer)
Copy constructor.
Definition JDBString.hh:44
JDBString()
Default constructor.
Definition JDBString.hh:26
friend std::istream & operator>>(std::istream &in, JDBString &object)
Read database string from input stream.
Definition JDBString.hh:55