FlexBook / Mbed 2 deprecated FlexBook171204a

Dependencies:   SDFileSystem app epson mbed msp430 pl tests

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers pagefactory.h Source File

pagefactory.h

00001 //
00002 // Filename: pagefactory.h
00003 //
00004 // Flexbook page creator.
00005 //
00006 
00007 // include guards
00008 #ifndef PAGEFACTORY_H
00009 #define PAGEFACTORY_H
00010 
00011 #include "book.h"
00012 
00013 #include <memory>
00014 
00015 namespace Flexbook
00016 {
00017 
00018 typedef int PageType;
00019 
00020 class Page;
00021 
00022 enum
00023 {
00024 PageType_PageSensor =     (1 << 0),
00025 PageType_PageTouch =      (1 << 1),
00026 PageType_PageNFC =        (1 << 2),
00027 PageType_PageFlexEnable = (1 << 6),
00028 PageType_PageOLED =       (1 << 7),
00029 PageType_PageDice =       (1 << 3),
00030 PageType_PageNull =        0
00031 };
00032 
00033 class PageFactory
00034 {
00035 public:
00036     // Constructor needs to be explicit.
00037     explicit PageFactory();
00038 
00039     // Destructor.
00040     ~PageFactory();
00041 
00042     BookPage CreatePages(PageType &type);
00043   
00044 private:
00045     // Disable the copy constructor.
00046     PageFactory(const PageFactory &);
00047 
00048     // Disable assignment.
00049     PageFactory &operator=(const PageFactory &);
00050 };
00051 
00052 } // End Flexbook namespace.
00053 
00054 #endif // PAGEFACTORY_H
00055