summaryrefslogtreecommitdiff
path: root/ACE/examples/Smart_Pointers/Widget.h
diff options
context:
space:
mode:
Diffstat (limited to 'ACE/examples/Smart_Pointers/Widget.h')
-rw-r--r--ACE/examples/Smart_Pointers/Widget.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/ACE/examples/Smart_Pointers/Widget.h b/ACE/examples/Smart_Pointers/Widget.h
new file mode 100644
index 00000000000..a38245ca999
--- /dev/null
+++ b/ACE/examples/Smart_Pointers/Widget.h
@@ -0,0 +1,40 @@
+/* -*- C++ -*- */
+//=============================================================================
+/**
+ * @file Widget.h
+ *
+ * $Id$
+ *
+ * @author Christopher Kohlhoff <chris@kohlhoff.com>
+ */
+//=============================================================================
+
+#ifndef WIDGET_H
+#define WIDGET_H
+
+#include "Widget_Part.h"
+
+/**
+ * @class Widget
+ *
+ * @brief An interface for some high-level application object.
+ */
+class Widget
+{
+public:
+ /// Destructor.
+ virtual ~Widget (void);
+
+ /// Add a new part to the widget. The widget takes ownership of the part
+ /// object.
+ virtual void add_part (Widget_Part *part) = 0;
+
+ /// Remove a random part from the widget. Ownership of the part is returned
+ /// to the caller.
+ virtual Widget_Part *remove_part (void) = 0;
+
+ /// Ask the widget to print information about the parts that it contains.
+ virtual void list_parts (void) = 0;
+};
+
+#endif /* WIDGET_H */