DP3
ParmDBMeta.h
Go to the documentation of this file.
1 // ParmDBMeta.h: Meta information for the name and type of a ParmDB
2 //
3 // Copyright (C) 2020 ASTRON (Netherlands Institute for Radio Astronomy)
4 // SPDX-License-Identifier: GPL-3.0-or-later
5 
9 
10 #ifndef LOFAR_PARMDB_PARMDBMETA_H
11 #define LOFAR_PARMDB_PARMDBMETA_H
12 
13 #include <string>
14 
15 namespace dp3 {
16 namespace blob {
17 class BlobOStream;
18 class BlobIStream;
19 } // namespace blob
20 
21 namespace parmdb {
22 
25 
27 class ParmDBMeta {
28  public:
30 
35  ParmDBMeta(const std::string& type, const std::string& tableName);
36 
37  void setSQLMeta(const std::string& dbName, const std::string& userName,
38  const std::string& dbPwd, const std::string& hostName);
39 
40  const std::string& getType() const { return itsType; }
41 
42  const std::string& getTableName() const { return itsTableName; }
43 
44  const std::string& getDBName() const { return itsDBName; }
45 
46  const std::string& getUserName() const { return itsUserName; }
47 
48  const std::string& getDBPwd() const { return itsDBPwd; }
49 
50  const std::string& getHostName() const { return itsHostName; }
51 
54 
57 
58  private:
59  std::string itsType;
60  std::string itsTableName;
63  std::string itsDBName;
64  std::string itsUserName;
65  std::string itsDBPwd;
66  std::string itsHostName;
68 };
69 
71 
72 } // namespace parmdb
73 } // namespace dp3
74 
75 #endif
Input stream for a blob.
Definition: BlobIStream.h:43
Output stream for a blob.
Definition: BlobOStream.h:40
Meta information for the name and type of a ParmDB.
Definition: ParmDBMeta.h:27
const std::string & getDBPwd() const
Definition: ParmDBMeta.h:48
friend blob::BlobOStream & operator<<(blob::BlobOStream &, const ParmDBMeta &)
Write the object into a blob.
const std::string & getUserName() const
Definition: ParmDBMeta.h:46
const std::string & getHostName() const
Definition: ParmDBMeta.h:50
void setSQLMeta(const std::string &dbName, const std::string &userName, const std::string &dbPwd, const std::string &hostName)
ParmDBMeta(const std::string &type, const std::string &tableName)
const std::string & getTableName() const
Definition: ParmDBMeta.h:42
const std::string & getDBName() const
Definition: ParmDBMeta.h:44
friend blob::BlobIStream & operator>>(blob::BlobIStream &, ParmDBMeta &)
Read the object from a blob.
const std::string & getType() const
Definition: ParmDBMeta.h:40
This file has generic helper routines for testing steps.
Definition: AntennaConfig.h:53