src/simulator/event-id.cc
changeset 5521 37c6c83d4252
parent 1696 0de65f4c8c43
equal deleted inserted replaced
5520:e054501e67c1 5521:37c6c83d4252
    24 namespace ns3 {
    24 namespace ns3 {
    25 
    25 
    26 EventId::EventId ()
    26 EventId::EventId ()
    27   : m_eventImpl (0),
    27   : m_eventImpl (0),
    28     m_ts (0),
    28     m_ts (0),
       
    29     m_context (0),
    29     m_uid (0)
    30     m_uid (0)
    30 {}
    31 {}
    31   
    32   
    32 EventId::EventId (const Ptr<EventImpl> &impl, uint64_t ts, uint32_t uid)
    33 EventId::EventId (const Ptr<EventImpl> &impl, uint64_t ts, uint32_t context, uint32_t uid)
    33   : m_eventImpl (impl),
    34   : m_eventImpl (impl),
    34     m_ts (ts),
    35     m_ts (ts),
       
    36     m_context (context),
    35     m_uid (uid)
    37     m_uid (uid)
    36 {}
    38 {}
    37 void 
    39 void 
    38 EventId::Cancel (void)
    40 EventId::Cancel (void)
    39 {
    41 {
    58 EventId::GetTs (void) const
    60 EventId::GetTs (void) const
    59 {
    61 {
    60   return m_ts;
    62   return m_ts;
    61 }
    63 }
    62 uint32_t 
    64 uint32_t 
       
    65 EventId::GetContext (void) const
       
    66 {
       
    67   return m_context;
       
    68 }
       
    69 uint32_t 
    63 EventId::GetUid (void) const
    70 EventId::GetUid (void) const
    64 {
    71 {
    65   return m_uid;
    72   return m_uid;
    66 }
    73 }
    67 
    74 
    68 bool operator == (const EventId &a, const EventId &b)
    75 bool operator == (const EventId &a, const EventId &b)
    69 {
    76 {
    70   return 
    77   return 
    71     a.m_uid == b.m_uid && 
    78     a.m_uid == b.m_uid && 
       
    79     a.m_context == b.m_context && 
    72     a.m_ts == b.m_ts && 
    80     a.m_ts == b.m_ts && 
    73     a.m_eventImpl == b.m_eventImpl;
    81     a.m_eventImpl == b.m_eventImpl;
    74 }
    82 }
    75 bool operator != (const EventId &a, const EventId &b)
    83 bool operator != (const EventId &a, const EventId &b)
    76 {
    84 {