aboutsummaryrefslogtreecommitdiff
path: root/src/profiling/CommandHandlerKey.hpp
diff options
context:
space:
mode:
authorFrancis Murtagh <francis.murtagh@arm.com>2019-08-14 09:49:34 +0100
committerFrancis Murtagh <francis.murtagh@arm.com>2019-08-14 09:49:34 +0100
commit1f7db45b73522752115ea482d1e85e88c044a664 (patch)
tree5f338c8cce8db41720be973de7bc9eb137a1e3fe /src/profiling/CommandHandlerKey.hpp
parent566e4adc16e4aa3bc1107c32af5df45f027424ca (diff)
downloadarmnn-1f7db45b73522752115ea482d1e85e88c044a664.tar.gz
IVGCVSW-3416 Create Command Handler Key class
* Add CommandHandlerKey class with all comparison operators * Add UnitTests to check key sorting in collection Change-Id: Icbd493d1e51e681cbe22a9e70ab9428a8a2ad107 Signed-off-by: Francis Murtagh <francis.murtagh@arm.com>
Diffstat (limited to 'src/profiling/CommandHandlerKey.hpp')
-rw-r--r--src/profiling/CommandHandlerKey.hpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/profiling/CommandHandlerKey.hpp b/src/profiling/CommandHandlerKey.hpp
new file mode 100644
index 0000000000..12bafbe49b
--- /dev/null
+++ b/src/profiling/CommandHandlerKey.hpp
@@ -0,0 +1,28 @@
+//
+// Copyright © 2017 Arm Ltd. All rights reserved.
+// SPDX-License-Identifier: MIT
+//
+
+#pragma once
+
+#include <cstdint>
+
+class CommandHandlerKey
+{
+public:
+ CommandHandlerKey(uint32_t packetId, uint32_t version) : m_PacketId(packetId), m_Version(version) {};
+
+ uint32_t GetPacketId() const;
+ uint32_t GetVersion() const;
+
+ bool operator< (const CommandHandlerKey& rhs) const;
+ bool operator> (const CommandHandlerKey& rhs) const;
+ bool operator<=(const CommandHandlerKey& rhs) const;
+ bool operator>=(const CommandHandlerKey& rhs) const;
+ bool operator==(const CommandHandlerKey& rhs) const;
+ bool operator!=(const CommandHandlerKey& rhs) const;
+
+private:
+ uint32_t m_PacketId;
+ uint32_t m_Version;
+};