INET Framework for OMNeT++/OMNEST
inet::MessageDispatcher::Key Class Reference

#include <MessageDispatcher.h>

Public Member Functions

 Key (int protocolId, ServicePrimitive servicePrimitive)
 
bool operator< (const MessageDispatcher::Key &other) const
 

Protected Attributes

int protocolId
 
int servicePrimitive
 

Friends

std::ostream & operator<< (std::ostream &out, const MessageDispatcher::Key &foo)
 

Constructor & Destructor Documentation

◆ Key()

inet::MessageDispatcher::Key::Key ( int  protocolId,
ServicePrimitive  servicePrimitive 
)
inline

Member Function Documentation

◆ operator<()

bool inet::MessageDispatcher::Key::operator< ( const MessageDispatcher::Key other) const
inline
43  {
44  if (protocolId < other.protocolId)
45  return true;
46  else if (protocolId > other.protocolId)
47  return false;
48  else
49  return servicePrimitive < other.servicePrimitive;
50  }

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
const MessageDispatcher::Key foo 
)
friend
103  {
104  out << "[" << foo.protocolId << ", " << omnetpp::cEnum::get("inet::ServicePrimitive")->getStringFor(foo.servicePrimitive) << "]";
105  return out;
106 }

Member Data Documentation

◆ protocolId

int inet::MessageDispatcher::Key::protocolId
protected

Referenced by operator<(), and inet::operator<<().

◆ servicePrimitive

int inet::MessageDispatcher::Key::servicePrimitive
protected

Referenced by operator<(), and inet::operator<<().


The documentation for this class was generated from the following file:
inet::MessageDispatcher::Key::protocolId
int protocolId
Definition: MessageDispatcher.h:37
inet::MessageDispatcher::Key::servicePrimitive
int servicePrimitive
Definition: MessageDispatcher.h:38