Mercurial > hg > orthanc-databases
comparison MySQL/Plugins/MySQLStorageArea.h @ 186:6fe74f9a516e
cppcheck
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 16 Dec 2020 15:05:19 +0100 |
parents | 0b3e9ee53c46 |
children | 3236894320d6 |
comparison
equal
deleted
inserted
replaced
185:7c46155b5bb4 | 186:6fe74f9a516e |
---|---|
34 { | 34 { |
35 private: | 35 private: |
36 MySQLStorageArea& that_; | 36 MySQLStorageArea& that_; |
37 | 37 |
38 public: | 38 public: |
39 Factory(MySQLStorageArea& that) : | 39 explicit Factory(MySQLStorageArea& that) : |
40 that_(that) | 40 that_(that) |
41 { | 41 { |
42 } | 42 } |
43 | 43 |
44 virtual Dialect GetDialect() const | 44 virtual Dialect GetDialect() const ORTHANC_OVERRIDE |
45 { | 45 { |
46 return Dialect_MySQL; | 46 return Dialect_MySQL; |
47 } | 47 } |
48 | 48 |
49 virtual IDatabase* Open() | 49 virtual IDatabase* Open() ORTHANC_OVERRIDE |
50 { | 50 { |
51 return that_.OpenInternal(); | 51 return that_.OpenInternal(); |
52 } | 52 } |
53 | 53 |
54 virtual void GetConnectionRetriesParameters(unsigned int& maxConnectionRetries, unsigned int& connectionRetryInterval) | 54 virtual void GetConnectionRetriesParameters(unsigned int& maxConnectionRetries, |
55 unsigned int& connectionRetryInterval) ORTHANC_OVERRIDE | |
55 { | 56 { |
56 maxConnectionRetries = that_.parameters_.GetMaxConnectionRetries(); | 57 maxConnectionRetries = that_.parameters_.GetMaxConnectionRetries(); |
57 connectionRetryInterval = that_.parameters_.GetConnectionRetryInterval(); | 58 connectionRetryInterval = that_.parameters_.GetConnectionRetryInterval(); |
58 } | 59 } |
59 }; | 60 }; |
60 | 61 |
61 OrthancPluginContext* context_; | |
62 MySQLParameters parameters_; | 62 MySQLParameters parameters_; |
63 bool clearAll_; | 63 bool clearAll_; |
64 | 64 |
65 IDatabase* OpenInternal(); | 65 IDatabase* OpenInternal(); |
66 | 66 |
67 public: | 67 public: |
68 MySQLStorageArea(const MySQLParameters& parameters); | 68 explicit MySQLStorageArea(const MySQLParameters& parameters); |
69 | 69 |
70 void SetClearAll(bool clear) | 70 void SetClearAll(bool clear) |
71 { | 71 { |
72 clearAll_ = clear; | 72 clearAll_ = clear; |
73 } | 73 } |