2 //=============================================================================
4 * @file Gadget_Impl.cpp
6 * @author Christopher Kohlhoff <chris@kohlhoff.com>
8 //=============================================================================
10 #include "Gadget_Impl.h"
11 #include "ace/Log_Msg.h"
13 Gadget_Impl::Gadget_Impl ()
15 ACE_DEBUG ((LM_DEBUG
, "Gadget_Impl constructor\n"));
18 Gadget_Impl::~Gadget_Impl ()
20 ACE_DEBUG ((LM_DEBUG
, "Gadget_Impl destructor\n"));
23 void Gadget_Impl::add_part (Gadget_Part_var part
)
25 parts_
.enqueue_tail (part
);
28 Gadget_Part_var
Gadget_Impl::remove_part ()
30 Gadget_Part_var removed_part
;
31 if (parts_
.dequeue_head (removed_part
) == -1)
32 return Gadget_Part_var();
36 void Gadget_Impl::list_parts ()
38 ACE_Unbounded_Queue_Iterator
<Gadget_Part_var
> iter (parts_
);
39 Gadget_Part_var
*current_part
;
40 while (iter
.next (current_part
))
42 (*current_part
)->print_info ();