blob: 8261ea13eb290f848385d7f66f57d58ec331dfb6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
/* -*- C++ -*- */
// $Id$
#if !defined (_CONSUMER_MAP_C)
#define _CONSUMER_MAP_C
#include "Event_Forwarding_Discriminator.h"
// Bind the Event_Addr to the INT_ID.
int
Event_Forwarding_Discriminator::bind (Event_Addr event_addr,
Dispatch_Set *Dispatch_Set)
{
return this->map_.bind (event_addr, Dispatch_Set);
}
// Find the Dispatch_Set corresponding to the Event_Addr.
int
Event_Forwarding_Discriminator::find (Event_Addr event_addr,
Dispatch_Set *&Dispatch_Set)
{
return this->map_.find (event_addr, Dispatch_Set);
}
// Unbind (remove) the Event_Addr from the map.
int
Event_Forwarding_Discriminator::unbind (Event_Addr event_addr)
{
return this->map_.unbind (event_addr);
}
Event_Forwarding_Discriminator_Iterator::Event_Forwarding_Discriminator_Iterator (Event_Forwarding_Discriminator &rt)
: map_iter_ (rt.map_)
{
}
int
Event_Forwarding_Discriminator_Iterator::next (Dispatch_Set *&ss)
{
// Loop in order to skip over inactive entries if necessary.
for (ACE_Map_Entry<Event_Addr, Dispatch_Set *> *temp = 0;
this->map_iter_.next (temp) != 0;
this->advance ())
{
// Otherwise, return the next item.
ss = temp->int_id_;
return 1;
}
return 0;
}
int
Event_Forwarding_Discriminator_Iterator::advance (void)
{
return this->map_iter_.advance ();
}
#endif /* _CONSUMER_MAP_C */
|