ArmNN
 20.02
CommandHandlerKey Class Reference

#include <CommandHandlerKey.hpp>

Public Member Functions

 CommandHandlerKey (uint32_t familyId, uint32_t packetId, uint32_t version)
 
uint32_t GetFamilyId () const
 
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
 

Detailed Description

Definition at line 16 of file CommandHandlerKey.hpp.

Constructor & Destructor Documentation

◆ CommandHandlerKey()

CommandHandlerKey ( uint32_t  familyId,
uint32_t  packetId,
uint32_t  version 
)
inline

Member Function Documentation

◆ GetFamilyId()

uint32_t GetFamilyId ( ) const

Definition at line 14 of file CommandHandlerKey.cpp.

Referenced by CommandHandlerKey::CommandHandlerKey().

15 {
16  return m_FamilyId;
17 }

◆ GetPacketId()

uint32_t GetPacketId ( ) const

Definition at line 19 of file CommandHandlerKey.cpp.

Referenced by BOOST_AUTO_TEST_CASE(), CommandHandlerKey::CommandHandlerKey(), and CommandHandlerHash::operator()().

20 {
21  return m_PacketId;
22 }

◆ GetVersion()

uint32_t GetVersion ( ) const

Definition at line 24 of file CommandHandlerKey.cpp.

Referenced by BOOST_AUTO_TEST_CASE(), CommandHandlerKey::CommandHandlerKey(), and CommandHandlerHash::operator()().

25 {
26  return m_Version;
27 }

◆ operator!=()

bool operator!= ( const CommandHandlerKey rhs) const

Definition at line 70 of file CommandHandlerKey.cpp.

Referenced by CommandHandlerKey::CommandHandlerKey().

71 {
72  return !(*this == rhs);
73 }

◆ operator<()

bool operator< ( const CommandHandlerKey rhs) const

Definition at line 29 of file CommandHandlerKey.cpp.

Referenced by CommandHandlerKey::CommandHandlerKey().

30 {
31  bool result = true;
32  if (m_FamilyId == rhs.m_FamilyId)
33  {
34  if (m_PacketId == rhs.m_PacketId)
35  {
36  result = m_Version < rhs.m_Version;
37  }
38  else if (m_PacketId > rhs.m_PacketId)
39  {
40  result = false;
41  }
42  }
43  else if (m_FamilyId > rhs.m_FamilyId)
44  {
45  result = false;
46  }
47  return result;
48 }

◆ operator<=()

bool operator<= ( const CommandHandlerKey rhs) const

Definition at line 55 of file CommandHandlerKey.cpp.

Referenced by CommandHandlerKey::CommandHandlerKey().

56 {
57  return !(*this > rhs);
58 }

◆ operator==()

bool operator== ( const CommandHandlerKey rhs) const

Definition at line 65 of file CommandHandlerKey.cpp.

Referenced by CommandHandlerKey::CommandHandlerKey().

66 {
67  return m_FamilyId == rhs.m_FamilyId && m_PacketId == rhs.m_PacketId && m_Version == rhs.m_Version;
68 }

◆ operator>()

bool operator> ( const CommandHandlerKey rhs) const

Definition at line 50 of file CommandHandlerKey.cpp.

Referenced by CommandHandlerKey::CommandHandlerKey().

51 {
52  return rhs < *this;
53 }

◆ operator>=()

bool operator>= ( const CommandHandlerKey rhs) const

Definition at line 60 of file CommandHandlerKey.cpp.

Referenced by CommandHandlerKey::CommandHandlerKey().

61 {
62  return !(*this < rhs);
63 }

The documentation for this class was generated from the following files: