blob: 6d16601f9496757c7c47293256b53809d3e4355d (
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 "Consumer_Map.h"
// Bind the Event_Addr to the INT_ID.
int
Consumer_Map::bind (Event_Addr event_addr,
Consumer_Entry *Consumer_Entry)
{
return this->map_.bind (event_addr, Consumer_Entry);
}
// Find the Consumer_Entry corresponding to the Event_Addr.
int
Consumer_Map::find (Event_Addr event_addr,
Consumer_Entry *&Consumer_Entry)
{
return this->map_.find (event_addr, Consumer_Entry);
}
// Unbind (remove) the Event_Addr from the map.
int
Consumer_Map::unbind (Event_Addr event_addr)
{
return this->map_.unbind (event_addr);
}
Consumer_Map_Iterator::Consumer_Map_Iterator (Consumer_Map &rt)
: map_iter_ (rt.map_)
{
}
int
Consumer_Map_Iterator::next (Consumer_Entry *&ss)
{
// Loop in order to skip over inactive entries if necessary.
for (ACE_Map_Entry<Event_Addr, Consumer_Entry *> *temp = 0;
this->map_iter_.next (temp) != 0;
this->advance ())
{
// Otherwise, return the next item.
ss = temp->int_id_;
return 1;
}
return 0;
}
int
Consumer_Map_Iterator::advance (void)
{
return this->map_iter_.advance ();
}
#endif /* _CONSUMER_MAP_C */
|