~vbursian/research-assistant/intervers

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
////////////////////////////////////////////////////////////////////////////////
/*! @file Database.h   Class sDatabase.
- Part of RANet - Research Assistant Net Library.
- Uses  Qt v.5  - http://qt.io/
- Copyright(C) 2013-2018, Viktor E. Bursian, St.Petersburg, Russia.
                          VBursian AT gmail DOT com
*///////////////////////////////////////////////////////////////////////////////
#ifndef Database_H
#define Database_H
#include "DB_Link.h"
#include "QtSQLWrapper.hpp"
namespace RA {
//------------------------------------------------------------------------------

ANNOUNCE_CLASS(sDatabase)

//---------------------------------------------------------------- sDatabase ---
/*!
*/
class RANet_EXPORT  sDatabase : public sDB_Link
{
  public:
                              ~sDatabase ();
                              sDatabase (rcsDB_Link);
    rsDatabase                operator = (rcsDB_Info  other_partition_info)
                                {
                                  sDB_Info::operator =(other_partition_info);
                                  return *this;
                                }
    sDBConnection             Connection (const QString &  name_suffix
                                                                  =QString());
    void                      CloseBackgroundConnection ();

  public://fields
    psDBConnection            MainConnection;
    psDBConnection            BackgroundConnection;

  private://the current implementation does not allow these:
                              sDatabase (rcsDatabase);
    void                      operator = (rcsDatabase) {}
};

//------------------------------------------------------------------------------
} //namespace RA
#endif