mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Add final specifiers in implementation files
This commit is contained in:
parent
aee5a3a45e
commit
6bf9bb9a2e
315 changed files with 1031 additions and 1025 deletions
|
|
@ -23,7 +23,7 @@
|
|||
namespace juce
|
||||
{
|
||||
|
||||
class ActionBroadcaster::ActionMessage : public MessageManager::MessageBase
|
||||
class ActionBroadcaster::ActionMessage final : public MessageManager::MessageBase
|
||||
{
|
||||
public:
|
||||
ActionMessage (const ActionBroadcaster* ab,
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
namespace juce
|
||||
{
|
||||
|
||||
class AsyncUpdater::AsyncUpdaterMessage : public CallbackMessage
|
||||
class AsyncUpdater::AsyncUpdaterMessage final : public CallbackMessage
|
||||
{
|
||||
public:
|
||||
AsyncUpdaterMessage (AsyncUpdater& au) : owner (au) {}
|
||||
|
|
|
|||
|
|
@ -43,8 +43,8 @@ static String getCommandLinePrefix (const String& commandLineUniqueID)
|
|||
//==============================================================================
|
||||
// This thread sends and receives ping messages every second, so that it
|
||||
// can find out if the other process has stopped running.
|
||||
struct ChildProcessPingThread : public Thread,
|
||||
private AsyncUpdater
|
||||
struct ChildProcessPingThread : public Thread,
|
||||
private AsyncUpdater
|
||||
{
|
||||
ChildProcessPingThread (int timeout) : Thread ("IPC ping"), timeoutMs (timeout)
|
||||
{
|
||||
|
|
@ -86,8 +86,8 @@ private:
|
|||
};
|
||||
|
||||
//==============================================================================
|
||||
struct ChildProcessCoordinator::Connection : public InterprocessConnection,
|
||||
private ChildProcessPingThread
|
||||
struct ChildProcessCoordinator::Connection final : public InterprocessConnection,
|
||||
private ChildProcessPingThread
|
||||
{
|
||||
Connection (ChildProcessCoordinator& m, const String& pipeName, int timeout)
|
||||
: InterprocessConnection (false, magicCoordWorkerConnectionHeader),
|
||||
|
|
@ -196,8 +196,8 @@ void ChildProcessCoordinator::killWorkerProcess()
|
|||
}
|
||||
|
||||
//==============================================================================
|
||||
struct ChildProcessWorker::Connection : public InterprocessConnection,
|
||||
private ChildProcessPingThread
|
||||
struct ChildProcessWorker::Connection final : public InterprocessConnection,
|
||||
private ChildProcessPingThread
|
||||
{
|
||||
Connection (ChildProcessWorker& p, const String& pipeName, int timeout)
|
||||
: InterprocessConnection (false, magicCoordWorkerConnectionHeader),
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
namespace juce
|
||||
{
|
||||
|
||||
struct InterprocessConnection::ConnectionThread : public Thread
|
||||
struct InterprocessConnection::ConnectionThread final : public Thread
|
||||
{
|
||||
ConnectionThread (InterprocessConnection& c) : Thread ("JUCE IPC"), owner (c) {}
|
||||
void run() override { owner.runThread(); }
|
||||
|
|
@ -65,7 +65,7 @@ private:
|
|||
bool safe = false;
|
||||
};
|
||||
|
||||
class InterprocessConnection::SafeAction : public SafeActionImpl
|
||||
class InterprocessConnection::SafeAction final : public SafeActionImpl
|
||||
{
|
||||
using SafeActionImpl::SafeActionImpl;
|
||||
};
|
||||
|
|
@ -246,7 +246,7 @@ void InterprocessConnection::initialiseWithPipe (std::unique_ptr<NamedPipe> newP
|
|||
}
|
||||
|
||||
//==============================================================================
|
||||
struct ConnectionStateMessage : public MessageManager::MessageBase
|
||||
struct ConnectionStateMessage final : public MessageManager::MessageBase
|
||||
{
|
||||
ConnectionStateMessage (std::shared_ptr<SafeActionImpl> ipc, bool connected) noexcept
|
||||
: safeAction (ipc), connectionMade (connected)
|
||||
|
|
@ -295,7 +295,7 @@ void InterprocessConnection::connectionLostInt()
|
|||
}
|
||||
}
|
||||
|
||||
struct DataDeliveryMessage : public Message
|
||||
struct DataDeliveryMessage final : public Message
|
||||
{
|
||||
DataDeliveryMessage (std::shared_ptr<SafeActionImpl> ipc, const MemoryBlock& d)
|
||||
: safeAction (ipc), data (d)
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ void JUCEApplicationBase::sendUnhandledException (const std::exception* const e,
|
|||
#endif
|
||||
|
||||
#if JUCE_HANDLE_MULTIPLE_INSTANCES
|
||||
struct JUCEApplicationBase::MultipleInstanceHandler : public ActionListener
|
||||
struct JUCEApplicationBase::MultipleInstanceHandler final : public ActionListener
|
||||
{
|
||||
MultipleInstanceHandler (const String& appName)
|
||||
: appLock ("juceAppLock_" + appName)
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ namespace detail
|
|||
bool dispatchNextMessageOnSystemQueue (bool returnIfNoPendingMessages);
|
||||
} // namespace detail
|
||||
|
||||
class MessageManager::QuitMessage : public MessageManager::MessageBase
|
||||
class MessageManager::QuitMessage final : public MessageManager::MessageBase
|
||||
{
|
||||
public:
|
||||
QuitMessage() {}
|
||||
|
|
@ -149,7 +149,7 @@ bool MessageManager::runDispatchLoopUntil (int millisecondsToRunFor)
|
|||
#endif
|
||||
|
||||
//==============================================================================
|
||||
class AsyncFunctionCallback : public MessageManager::MessageBase
|
||||
class AsyncFunctionCallback final : public MessageManager::MessageBase
|
||||
{
|
||||
public:
|
||||
AsyncFunctionCallback (MessageCallbackFunction* const f, void* const param)
|
||||
|
|
@ -194,7 +194,7 @@ void* MessageManager::callFunctionOnMessageThread (MessageCallbackFunction* func
|
|||
|
||||
bool MessageManager::callAsync (std::function<void()> fn)
|
||||
{
|
||||
struct AsyncCallInvoker : public MessageBase
|
||||
struct AsyncCallInvoker final : public MessageBase
|
||||
{
|
||||
AsyncCallInvoker (std::function<void()> f) : callback (std::move (f)) {}
|
||||
void messageCallback() override { callback(); }
|
||||
|
|
@ -282,7 +282,7 @@ bool MessageManager::existsAndIsCurrentThread() noexcept
|
|||
accessed from another thread inside a MM lock, you're screwed. (this is exactly what happens
|
||||
in Cocoa).
|
||||
*/
|
||||
struct MessageManager::Lock::BlockingMessage : public MessageManager::MessageBase
|
||||
struct MessageManager::Lock::BlockingMessage final : public MessageManager::MessageBase
|
||||
{
|
||||
explicit BlockingMessage (const MessageManager::Lock* parent) noexcept
|
||||
: owner (parent) {}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ using MenuTrackingChangedCallback = void (*)(bool);
|
|||
MenuTrackingChangedCallback menuTrackingChangedCallback = nullptr;
|
||||
|
||||
//==============================================================================
|
||||
struct AppDelegateClass : public ObjCClass<NSObject>
|
||||
struct AppDelegateClass final : public ObjCClass<NSObject>
|
||||
{
|
||||
AppDelegateClass() : ObjCClass ("JUCEAppDelegate_")
|
||||
{
|
||||
|
|
@ -353,7 +353,7 @@ void MessageManager::stopDispatchLoop()
|
|||
}
|
||||
else
|
||||
{
|
||||
struct QuitCallback : public CallbackMessage
|
||||
struct QuitCallback final : public CallbackMessage
|
||||
{
|
||||
QuitCallback() {}
|
||||
void messageCallback() override { MessageManager::getInstance()->stopDispatchLoop(); }
|
||||
|
|
@ -463,7 +463,7 @@ private:
|
|||
MountedVolumeListChangeDetector& owner;
|
||||
id delegate;
|
||||
|
||||
struct ObserverClass : public ObjCClass<NSObject>
|
||||
struct ObserverClass final : public ObjCClass<NSObject>
|
||||
{
|
||||
ObserverClass() : ObjCClass<NSObject> ("JUCEDriveObserver_")
|
||||
{
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ namespace juce
|
|||
//==============================================================================
|
||||
namespace Android
|
||||
{
|
||||
class Runnable : public juce::AndroidInterfaceImplementer
|
||||
class Runnable : public juce::AndroidInterfaceImplementer
|
||||
{
|
||||
public:
|
||||
virtual void run() = 0;
|
||||
|
|
@ -67,7 +67,7 @@ namespace Android
|
|||
}
|
||||
|
||||
//==============================================================================
|
||||
struct AndroidMessageQueue : private Android::Runnable
|
||||
struct AndroidMessageQueue final : private Android::Runnable
|
||||
{
|
||||
JUCE_DECLARE_SINGLETON_SINGLETHREADED (AndroidMessageQueue, true)
|
||||
|
||||
|
|
@ -134,7 +134,7 @@ void MessageManager::runDispatchLoop()
|
|||
|
||||
void MessageManager::stopDispatchLoop()
|
||||
{
|
||||
struct QuitCallback : public CallbackMessage
|
||||
struct QuitCallback final : public CallbackMessage
|
||||
{
|
||||
QuitCallback() {}
|
||||
|
||||
|
|
@ -169,7 +169,7 @@ void MessageManager::stopDispatchLoop()
|
|||
}
|
||||
|
||||
//==============================================================================
|
||||
class JuceAppLifecycle : public ActivityLifecycleCallbacks
|
||||
class JuceAppLifecycle final : public ActivityLifecycleCallbacks
|
||||
{
|
||||
public:
|
||||
JuceAppLifecycle (juce::JUCEApplicationBase* (*initSymbolAddr)())
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ private:
|
|||
{
|
||||
if (data != nullptr && data->dwData == broadcastMessageMagicNumber)
|
||||
{
|
||||
struct BroadcastMessage : public CallbackMessage
|
||||
struct BroadcastMessage final : public CallbackMessage
|
||||
{
|
||||
BroadcastMessage (CharPointer_UTF32 text, size_t length) : message (text, length) {}
|
||||
void messageCallback() override { MessageManager::getInstance()->deliverBroadcastMessage (message); }
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
namespace juce
|
||||
{
|
||||
|
||||
struct MultiTimerCallback : public Timer
|
||||
struct MultiTimerCallback final : public Timer
|
||||
{
|
||||
MultiTimerCallback (const int tid, MultiTimer& mt) noexcept
|
||||
: owner (mt), timerID (tid)
|
||||
|
|
|
|||
|
|
@ -23,9 +23,9 @@
|
|||
namespace juce
|
||||
{
|
||||
|
||||
class Timer::TimerThread : private Thread,
|
||||
private DeletedAtShutdown,
|
||||
private AsyncUpdater
|
||||
class Timer::TimerThread final : private Thread,
|
||||
private DeletedAtShutdown,
|
||||
private AsyncUpdater
|
||||
{
|
||||
public:
|
||||
using LockType = CriticalSection; // (mysteriously, using a SpinLock here causes problems on some XP machines..)
|
||||
|
|
@ -171,7 +171,7 @@ private:
|
|||
|
||||
WaitableEvent callbackArrived;
|
||||
|
||||
struct CallTimersMessage : public MessageManager::MessageBase
|
||||
struct CallTimersMessage final : public MessageManager::MessageBase
|
||||
{
|
||||
CallTimersMessage() {}
|
||||
|
||||
|
|
@ -371,7 +371,7 @@ void JUCE_CALLTYPE Timer::callPendingTimersSynchronously()
|
|||
TimerThread::instance->callTimersSynchronously();
|
||||
}
|
||||
|
||||
struct LambdaInvoker : private Timer
|
||||
struct LambdaInvoker final : private Timer
|
||||
{
|
||||
LambdaInvoker (int milliseconds, std::function<void()> f) : function (f)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue