@@ -53,9 +53,8 @@ class VersionedIface : public C
5353public:
5454 VersionedIface () { }
5555
56- private:
57- VersionedIface (const VersionedIface&);
58- VersionedIface& operator =(const VersionedIface&);
56+ VersionedIface (const VersionedIface&) = delete ;
57+ VersionedIface& operator =(const VersionedIface&) = delete ;
5958};
6059
6160// Helps to implement versioned interfaces on stack or static
@@ -123,7 +122,7 @@ class RefCntIface : public VersionedIface<C>, public GlobalStorage
123122 }
124123
125124protected:
126- void refCntDPrt (char f)
125+ void refCntDPrt (char f) noexcept
127126 {
128127#ifdef DEV_BUILD
129128 if (mark)
@@ -194,27 +193,27 @@ class SimpleFactory : public Static<SimpleFactoryBase<P> >
194193class CachedMasterInterface
195194{
196195public:
197- static void set (IMaster* master);
196+ static void set (IMaster* master) noexcept ;
198197
199198protected:
200- static IMaster* getMasterInterface ();
199+ static IMaster* getMasterInterface () noexcept ;
201200};
202201
203202// Base for interface type independent accessors
204203template <typename C>
205204class AccessAutoInterface : public CachedMasterInterface
206205{
207206public:
208- explicit AccessAutoInterface (C* aPtr)
207+ explicit AccessAutoInterface (C* aPtr) noexcept
209208 : ptr(aPtr)
210209 { }
211210
212- operator C*()
211+ operator C*() noexcept
213212 {
214213 return ptr;
215214 }
216215
217- C* operator ->()
216+ C* operator ->() noexcept
218217 {
219218 return ptr;
220219 }
@@ -224,17 +223,17 @@ class AccessAutoInterface : public CachedMasterInterface
224223};
225224
226225// Master interface access
227- class MasterInterfacePtr : public AccessAutoInterface <IMaster>
226+ class MasterInterfacePtr final : public AccessAutoInterface<IMaster>
228227{
229228public:
230- MasterInterfacePtr ()
229+ MasterInterfacePtr () noexcept
231230 : AccessAutoInterface<IMaster>(getMasterInterface())
232231 { }
233232};
234233
235234
236235// Generic plugins interface access
237- class PluginManagerInterfacePtr : public AccessAutoInterface <IPluginManager>
236+ class PluginManagerInterfacePtr final : public AccessAutoInterface<IPluginManager>
238237{
239238public:
240239 PluginManagerInterfacePtr ()
@@ -244,7 +243,7 @@ class PluginManagerInterfacePtr : public AccessAutoInterface<IPluginManager>
244243
245244
246245// Control timer interface access
247- class TimerInterfacePtr : public AccessAutoInterface <ITimerControl>
246+ class TimerInterfacePtr final : public AccessAutoInterface<ITimerControl>
248247{
249248public:
250249 TimerInterfacePtr ()
@@ -254,7 +253,7 @@ class TimerInterfacePtr : public AccessAutoInterface<ITimerControl>
254253
255254
256255// Distributed transactions coordinator access
257- class DtcInterfacePtr : public AccessAutoInterface <IDtc>
256+ class DtcInterfacePtr final : public AccessAutoInterface<IDtc>
258257{
259258public:
260259 DtcInterfacePtr ()
@@ -264,7 +263,7 @@ class DtcInterfacePtr : public AccessAutoInterface<IDtc>
264263
265264
266265// Dispatcher access
267- class DispatcherPtr : public AccessAutoInterface <IProvider>
266+ class DispatcherPtr final : public AccessAutoInterface<IProvider>
268267{
269268public:
270269 DispatcherPtr ()
@@ -279,7 +278,7 @@ class DispatcherPtr : public AccessAutoInterface<IProvider>
279278
280279
281280// Misc utl access
282- class UtilInterfacePtr : public AccessAutoInterface <IUtil>
281+ class UtilInterfacePtr final : public AccessAutoInterface<IUtil>
283282{
284283public:
285284 UtilInterfacePtr ()
@@ -325,22 +324,22 @@ class UnloadDetectorHelper final :
325324 }
326325 }
327326
328- bool unloadStarted ()
327+ bool unloadStarted () const noexcept
329328 {
330329 return !flagOsUnload;
331330 }
332331
333- void setCleanup (VoidNoParam* function)
332+ void setCleanup (VoidNoParam* function) noexcept
334333 {
335334 cleanup = function;
336335 }
337336
338- void setThreadDetach (VoidNoParam* function)
337+ void setThreadDetach (VoidNoParam* function) noexcept
339338 {
340339 thdDetach = function;
341340 }
342341
343- void doClean ()
342+ void doClean () override
344343 {
345344 flagOsUnload = false ;
346345
@@ -351,7 +350,7 @@ class UnloadDetectorHelper final :
351350 }
352351 }
353352
354- void threadDetach ()
353+ void threadDetach () override
355354 {
356355 if (thdDetach)
357356 thdDetach ();
@@ -364,10 +363,10 @@ class UnloadDetectorHelper final :
364363};
365364
366365typedef GlobalPtr<UnloadDetectorHelper, InstanceControl::PRIORITY_DETECT_UNLOAD> UnloadDetector;
367- UnloadDetectorHelper* getUnloadDetector ();
366+ UnloadDetectorHelper* getUnloadDetector () noexcept ;
368367
369368// Generic status checker
370- inline void check (IStatus* status, ISC_STATUS exclude = 0 )
369+ inline void check (const IStatus* status, ISC_STATUS exclude = 0 )
371370{
372371 if (status->getState () & IStatus::STATE_ERRORS)
373372 {
@@ -377,14 +376,14 @@ inline void check(IStatus* status, ISC_STATUS exclude = 0)
377376}
378377
379378// Config keys cache
380- class ConfigKeys : private HalfStaticArray <unsigned int , 8 >
379+ class ConfigKeys final : private HalfStaticArray<unsigned int , 8 >
381380{
382381public:
383382 ConfigKeys (MemoryPool& p)
384383 : HalfStaticArray<unsigned int , 8 >(p)
385384 { }
386385
387- const static unsigned int INVALID_KEY = ~0u ;
386+ static constexpr unsigned int INVALID_KEY = ~0u ;
388387
389388 unsigned int getKey (IFirebirdConf* config, const char * keyName);
390389};
0 commit comments