annotate OrthancServer/Sources/Search/ISqlLookupFormatter.h @ 4785:61da49321754 openssl-3.x

integration mainline->openssl-3.x
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 30 Aug 2021 22:21:24 +0200
parents f0038043fb97
children 70d2a97ca8cb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3058
6faf575ba9cc refactoring: class ISqlLookupFormatter to be used in orthanc-databases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 /**
6faf575ba9cc refactoring: class ISqlLookupFormatter to be used in orthanc-databases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 * Orthanc - A Lightweight, RESTful DICOM Store
6faf575ba9cc refactoring: class ISqlLookupFormatter to be used in orthanc-databases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
6faf575ba9cc refactoring: class ISqlLookupFormatter to be used in orthanc-databases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 * Department, University Hospital of Liege, Belgium
4437
d9473bd5ed43 upgrade to year 2021
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4096
diff changeset
5 * Copyright (C) 2017-2021 Osimis S.A., Belgium
3058
6faf575ba9cc refactoring: class ISqlLookupFormatter to be used in orthanc-databases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 *
6faf575ba9cc refactoring: class ISqlLookupFormatter to be used in orthanc-databases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 * This program is free software: you can redistribute it and/or
6faf575ba9cc refactoring: class ISqlLookupFormatter to be used in orthanc-databases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 * modify it under the terms of the GNU General Public License as
6faf575ba9cc refactoring: class ISqlLookupFormatter to be used in orthanc-databases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 * published by the Free Software Foundation, either version 3 of the
6faf575ba9cc refactoring: class ISqlLookupFormatter to be used in orthanc-databases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 * License, or (at your option) any later version.
6faf575ba9cc refactoring: class ISqlLookupFormatter to be used in orthanc-databases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 *
6faf575ba9cc refactoring: class ISqlLookupFormatter to be used in orthanc-databases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful, but
6faf575ba9cc refactoring: class ISqlLookupFormatter to be used in orthanc-databases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
6faf575ba9cc refactoring: class ISqlLookupFormatter to be used in orthanc-databases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
6faf575ba9cc refactoring: class ISqlLookupFormatter to be used in orthanc-databases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 * General Public License for more details.
6faf575ba9cc refactoring: class ISqlLookupFormatter to be used in orthanc-databases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 *
6faf575ba9cc refactoring: class ISqlLookupFormatter to be used in orthanc-databases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 * You should have received a copy of the GNU General Public License
6faf575ba9cc refactoring: class ISqlLookupFormatter to be used in orthanc-databases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
6faf575ba9cc refactoring: class ISqlLookupFormatter to be used in orthanc-databases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 **/
6faf575ba9cc refactoring: class ISqlLookupFormatter to be used in orthanc-databases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20
6faf575ba9cc refactoring: class ISqlLookupFormatter to be used in orthanc-databases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21
6faf575ba9cc refactoring: class ISqlLookupFormatter to be used in orthanc-databases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 #pragma once
6faf575ba9cc refactoring: class ISqlLookupFormatter to be used in orthanc-databases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23
4096
d633e5bb7ba3 reusing of ISqlLookupFormatter and DatabaseConstraint in orthanc-databases project
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
24 #if ORTHANC_BUILDING_SERVER_LIBRARY == 1
d633e5bb7ba3 reusing of ISqlLookupFormatter and DatabaseConstraint in orthanc-databases project
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
25 # include "../../../OrthancFramework/Sources/Enumerations.h"
d633e5bb7ba3 reusing of ISqlLookupFormatter and DatabaseConstraint in orthanc-databases project
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
26 #else
d633e5bb7ba3 reusing of ISqlLookupFormatter and DatabaseConstraint in orthanc-databases project
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
27 # include <Enumerations.h>
d633e5bb7ba3 reusing of ISqlLookupFormatter and DatabaseConstraint in orthanc-databases project
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4045
diff changeset
28 #endif
3100
f6de9d25b20d removing build dependency on plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3079
diff changeset
29
f6de9d25b20d removing build dependency on plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3079
diff changeset
30 #include <boost/noncopyable.hpp>
f6de9d25b20d removing build dependency on plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3079
diff changeset
31 #include <vector>
3058
6faf575ba9cc refactoring: class ISqlLookupFormatter to be used in orthanc-databases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32
6faf575ba9cc refactoring: class ISqlLookupFormatter to be used in orthanc-databases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 namespace Orthanc
6faf575ba9cc refactoring: class ISqlLookupFormatter to be used in orthanc-databases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 {
3100
f6de9d25b20d removing build dependency on plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3079
diff changeset
35 class DatabaseConstraint;
f6de9d25b20d removing build dependency on plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3079
diff changeset
36
3058
6faf575ba9cc refactoring: class ISqlLookupFormatter to be used in orthanc-databases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 // This class is also used by the "orthanc-databases" project
6faf575ba9cc refactoring: class ISqlLookupFormatter to be used in orthanc-databases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 class ISqlLookupFormatter : public boost::noncopyable
6faf575ba9cc refactoring: class ISqlLookupFormatter to be used in orthanc-databases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 {
6faf575ba9cc refactoring: class ISqlLookupFormatter to be used in orthanc-databases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 public:
6faf575ba9cc refactoring: class ISqlLookupFormatter to be used in orthanc-databases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 virtual ~ISqlLookupFormatter()
6faf575ba9cc refactoring: class ISqlLookupFormatter to be used in orthanc-databases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 {
6faf575ba9cc refactoring: class ISqlLookupFormatter to be used in orthanc-databases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 }
6faf575ba9cc refactoring: class ISqlLookupFormatter to be used in orthanc-databases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44
6faf575ba9cc refactoring: class ISqlLookupFormatter to be used in orthanc-databases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 virtual std::string GenerateParameter(const std::string& value) = 0;
6faf575ba9cc refactoring: class ISqlLookupFormatter to be used in orthanc-databases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46
3078
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3062
diff changeset
47 virtual std::string FormatResourceType(ResourceType level) = 0;
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3062
diff changeset
48
3079
65e2bfa953ef ISqlLookupFormatter::FormatWildcardEscape()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3078
diff changeset
49 virtual std::string FormatWildcardEscape() = 0;
65e2bfa953ef ISqlLookupFormatter::FormatWildcardEscape()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3078
diff changeset
50
3058
6faf575ba9cc refactoring: class ISqlLookupFormatter to be used in orthanc-databases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 static void Apply(std::string& sql,
6faf575ba9cc refactoring: class ISqlLookupFormatter to be used in orthanc-databases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 ISqlLookupFormatter& formatter,
6faf575ba9cc refactoring: class ISqlLookupFormatter to be used in orthanc-databases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 const std::vector<DatabaseConstraint>& lookup,
6faf575ba9cc refactoring: class ISqlLookupFormatter to be used in orthanc-databases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54 ResourceType queryLevel,
6faf575ba9cc refactoring: class ISqlLookupFormatter to be used in orthanc-databases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 size_t limit);
6faf575ba9cc refactoring: class ISqlLookupFormatter to be used in orthanc-databases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 };
6faf575ba9cc refactoring: class ISqlLookupFormatter to be used in orthanc-databases
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57 }