Minor code formatting cleanups.

This commit is contained in:
casey langen 2020-10-20 22:45:14 -07:00
parent 2424d2e534
commit 3d58d6ade4
3 changed files with 23 additions and 21 deletions

View File

@ -37,24 +37,22 @@
#include "IMessage.h"
#include "IMessageTarget.h"
namespace musik {
namespace core {
namespace runtime {
class IMessageQueue {
public:
virtual ~IMessageQueue() { }
virtual void Post(IMessagePtr message, int64_t delayMs = 0) = 0;
virtual int Remove(IMessageTarget *target, int type = -1) = 0;
virtual void Broadcast(IMessagePtr message, int64_t delayMs = 0) = 0;
virtual bool Contains(IMessageTarget *target, int type = -1) = 0;
virtual void Debounce(IMessagePtr message, int64_t delayMs = 0) = 0;
virtual void Register(IMessageTarget* target) = 0;
virtual void Unregister(IMessageTarget* target) = 0;
virtual void RegisterForBroadcasts(IMessageTargetPtr target) = 0;
virtual void UnregisterForBroadcasts(IMessageTarget *target) = 0;
virtual void WaitAndDispatch(int64_t timeoutMillis = -1) = 0;
virtual void Dispatch() = 0;
};
}
}
}
namespace musik { namespace core { namespace runtime {
class IMessageQueue {
public:
virtual ~IMessageQueue() { }
virtual void Post(IMessagePtr message, int64_t delayMs = 0) = 0;
virtual int Remove(IMessageTarget *target, int type = -1) = 0;
virtual void Broadcast(IMessagePtr message, int64_t delayMs = 0) = 0;
virtual bool Contains(IMessageTarget *target, int type = -1) = 0;
virtual void Debounce(IMessagePtr message, int64_t delayMs = 0) = 0;
virtual void Register(IMessageTarget* target) = 0;
virtual void Unregister(IMessageTarget* target) = 0;
virtual void RegisterForBroadcasts(IMessageTargetPtr target) = 0;
virtual void UnregisterForBroadcasts(IMessageTarget *target) = 0;
virtual void WaitAndDispatch(int64_t timeoutMillis = -1) = 0;
virtual void Dispatch() = 0;
};
} } }

View File

@ -37,6 +37,7 @@
#include "IMessage.h"
namespace musik { namespace core { namespace runtime {
class Message : public IMessage {
protected:
Message(
@ -65,4 +66,5 @@ namespace musik { namespace core { namespace runtime {
int messageType;
int64_t data1, data2;
};
} } }

View File

@ -44,6 +44,7 @@
#include <set>
namespace musik { namespace core { namespace runtime {
class MessageQueue : public IMessageQueue {
public:
MessageQueue();
@ -93,4 +94,5 @@ namespace musik { namespace core { namespace runtime {
void Dispatch(IMessagePtr message);
};
} } }