Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / ACE / examples / Smart_Pointers / Gadget_Impl.h
blobd0731c31b22f3483b0a48a03fa0da03f594e8f77
1 /* -*- C++ -*- */
2 //=============================================================================
3 /**
4 * @file Gadget_Impl.h
6 * @author Christopher Kohlhoff <chris@kohlhoff.com>
7 */
8 //=============================================================================
10 #ifndef GADGET_IMPL_H
11 #define GADGET_IMPL_H
13 #include "ace/Unbounded_Queue.h"
14 #include "Gadget.h"
15 #include "Gadget_Part.h"
17 /**
18 * @class Gadget_Impl
20 * @brief An implementation of the Gadget interface.
22 class Gadget_Impl : public Gadget
24 public:
25 /// Constructor.
26 Gadget_Impl ();
28 /// Destructor.
29 virtual ~Gadget_Impl ();
31 /// Add a new part to the gadget. The gadget takes ownership of the part
32 /// object.
33 virtual void add_part (Gadget_Part_var part);
35 /// Remove a random part from the gadget. Ownership of the part is returned
36 /// to the caller.
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 ();
42 private:
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 */