Marc Bax / Mbed 2 deprecated Flexbook180111a

Dependencies:   SDFileSystem app epson mbed msp430 pl tests

Revision:
0:c643d398cdb6
diff -r 000000000000 -r c643d398cdb6 book.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/book.h	Thu Jan 11 13:42:27 2018 +0000
@@ -0,0 +1,54 @@
+//
+// Filename: book.h
+//
+// Container for Flexbook pages.
+//
+
+// include guards
+#ifndef BOOK_H
+#define BOOK_H
+
+#include "page.h"
+
+namespace Flexbook
+{
+
+class Page;
+class PageFactory;
+
+typedef int PageType;
+
+class Book
+{
+public:
+    // Constructor needs to be explicit.
+    explicit Book(PageFactory &factory);
+
+    // Destructor.
+    ~Book();
+
+    // Page change notification.
+    void PageChange(PageType type);
+
+    // Return the type of the currently active page.
+    PageType GetPageType() const;
+
+    void HandleActions();
+
+private:
+    // Disable the copy constructor.
+    Book(const Book &);
+
+    // Disable assignment.
+    Book &operator=(const Book &);
+
+    PageFactory &factory;
+    PageType    pagetype;
+
+    BookPage page;
+};
+
+} // End Flexbook namespace.
+
+#endif // BOOK_H
+