2 //=============================================================================
6 * @author Christopher Kohlhoff <chris@kohlhoff.com>
8 //=============================================================================
13 #include "ace/Unbounded_Queue.h"
15 #include "Gadget_Part.h"
20 * @brief An implementation of the Gadget interface.
22 class Gadget_Impl
: public Gadget
29 virtual ~Gadget_Impl ();
31 /// Add a new part to the gadget. The gadget takes ownership of the part
33 virtual void add_part (Gadget_Part_var part
);
35 /// Remove a random part from the gadget. Ownership of the part is returned
37 virtual Gadget_Part_var
remove_part ();
39 /// Ask the gadget to print information about the parts that it contains.
40 virtual void list_parts ();
43 /// The parts which make up this gadget. The set actually contains instances
44 /// of Gadget_Part_var to automatically manage the lifetimes of the
45 /// constituent parts.
46 ACE_Unbounded_Queue
<Gadget_Part_var
> parts_
;
49 #endif /* GADGET_IMPL_H */