Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

KoduActionPageSwitch.h

Go to the documentation of this file.
00001 #ifndef KODU_ACTION_PAGE_SWITCH_H_
00002 #define KODU_ACTION_PAGE_SWITCH_H_
00003 
00004 #include <iostream>
00005 
00006 // Kodu Library
00007 #include "Kodu/Primitives/KoduAction.h"
00008 #include "Kodu/Generators/KoduGenerators.h"
00009 
00010 // TODO
00011 
00012 namespace Kodu {
00013 
00014     //! Kodu Action Page Switch class (derived from Kodu Action)
00015     class KoduActionPageSwitch : public KoduAction {
00016     public:
00017         //! Constructor
00018         KoduActionPageSwitch(const NumericGenerator& pageNumber)
00019           : KoduAction ("KoduActionPageSwitch", KoduAction::AT_PAGE_SWITCH, false, false),
00020             pageNumb(pageNumber)
00021         { }
00022 
00023         //! Copy constructor
00024         KoduActionPageSwitch(const KoduActionPageSwitch& kAction)
00025           : KoduAction(kAction),
00026             pageNumb(kAction.pageNumb)
00027         { }
00028         
00029         //! KoduActionPageSwitch
00030         ~KoduActionPageSwitch() {
00031             // no explicit implementation
00032         }
00033         
00034         //! Assignment operator
00035         KoduActionPageSwitch& operator=(const KoduActionPageSwitch& kAction) {
00036             if (this != &kAction) {
00037                 KoduAction::operator=(kAction);
00038                 pageNumb = kAction.pageNumb;
00039             }
00040             return *this;
00041         }
00042 
00043         //! Returns the new requested page number
00044         int getPageNumber();
00045         
00046         //! Tests if the primitive argument is the same as the calling class
00047         static bool isSameTypeAs(const KoduPrimitive*);
00048         
00049         //! Used to reinitialize certain variables (e.g. when switching to another page)
00050         virtual void reinitialize();
00051 
00052         //! Prints the attributes of a particular instance
00053         virtual void printAttrs() const;
00054 
00055     private:
00056         NumericGenerator pageNumb;
00057     };
00058 }
00059 
00060 #endif // KODU_ACTION_PAGE_SWITCH_H_

Tekkotsu v5.1CVS
Generated Mon May 9 04:58:43 2016 by Doxygen 1.6.3