Mercurial > hg > orthanc-databases
annotate Framework/Plugins/DatabaseBackendAdapterV2.h @ 395:a7a029043670 db-protobuf
integration mainline->db-protobuf
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 05 Apr 2023 14:53:57 +0200 |
parents | 3d6886f3e5b3 |
children | ecd0b719cff5 |
rev | line source |
---|---|
0 | 1 /** |
2 * Orthanc - A Lightweight, RESTful DICOM Store | |
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics | |
4 * Department, University Hospital of Liege, Belgium | |
389
3d6886f3e5b3
upgrade to year 2023
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
359
diff
changeset
|
5 * Copyright (C) 2017-2023 Osimis S.A., Belgium |
3d6886f3e5b3
upgrade to year 2023
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
359
diff
changeset
|
6 * Copyright (C) 2021-2023 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
0 | 7 * |
8 * This program is free software: you can redistribute it and/or | |
9 * modify it under the terms of the GNU Affero General Public License | |
10 * as published by the Free Software Foundation, either version 3 of | |
11 * the License, or (at your option) any later version. | |
12 * | |
13 * This program is distributed in the hope that it will be useful, but | |
14 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
16 * Affero General Public License for more details. | |
17 * | |
18 * You should have received a copy of the GNU Affero General Public License | |
19 * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
20 **/ | |
21 | |
22 | |
23 | |
24 /** | |
25 * NOTE: Until Orthanc 1.4.0, this file was part of the Orthanc source | |
26 * distribution. This file is now part of "orthanc-databases", in | |
27 * order to uncouple its evolution from the Orthanc core. | |
28 **/ | |
29 | |
30 #pragma once | |
31 | |
202 | 32 #include "IDatabaseBackend.h" |
152 | 33 |
204 | 34 |
203
2089d4071408
moving classes out of OrthancPlugins namespace, to OrthancDatabases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
202
diff
changeset
|
35 namespace OrthancDatabases |
204 | 36 { |
0 | 37 /** |
38 * @brief Bridge between C and C++ database engines. | |
39 * | |
40 * Class creating the bridge between the C low-level primitives for | |
41 * custom database engines, and the high-level IDatabaseBackend C++ | |
204 | 42 * interface, for Orthanc <= 1.9.1. |
0 | 43 * |
44 * @ingroup Callbacks | |
45 **/ | |
200 | 46 class DatabaseBackendAdapterV2 |
0 | 47 { |
48 private: | |
49 // This class cannot be instantiated | |
200 | 50 DatabaseBackendAdapterV2() |
0 | 51 { |
52 } | |
53 | |
205
873e37048f96
renaming OrthancCppDatabasePlugin.h as DatabaseBackendAdapterV2.h
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
204
diff
changeset
|
54 public: |
224
61c309e06797
added internal class DatabaseBackendAdapterV2::Adapter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
222
diff
changeset
|
55 class Adapter; |
205
873e37048f96
renaming OrthancCppDatabasePlugin.h as DatabaseBackendAdapterV2.h
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
204
diff
changeset
|
56 class Output; |
0 | 57 |
204 | 58 class Factory : public IDatabaseBackendOutput::IFactory |
59 { | |
60 private: | |
61 OrthancPluginContext* context_; | |
62 OrthancPluginDatabaseContext* database_; | |
63 | |
64 public: | |
65 Factory(OrthancPluginContext* context, | |
66 OrthancPluginDatabaseContext* database) : | |
67 context_(context), | |
68 database_(database) | |
69 { | |
70 } | |
71 | |
205
873e37048f96
renaming OrthancCppDatabasePlugin.h as DatabaseBackendAdapterV2.h
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
204
diff
changeset
|
72 virtual IDatabaseBackendOutput* CreateOutput() ORTHANC_OVERRIDE; |
204 | 73 }; |
74 | |
222
c8e06b41feec
refactoring registration/finalization of index backend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
207
diff
changeset
|
75 static void Register(IDatabaseBackend* backend); |
204 | 76 |
222
c8e06b41feec
refactoring registration/finalization of index backend
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
207
diff
changeset
|
77 static void Finalize(); |
0 | 78 }; |
79 } |