Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

KoduActionGrab.h

Go to the documentation of this file.
00001 #ifndef KODU_ACTION_GRAB_H_
00002 #define KODU_ACTION_GRAB_H_
00003 
00004 // Tekkodu Library
00005 #include "Kodu/Primitives/KoduAction.h"
00006 
00007 // Tekkotsu Library
00008 #include "DualCoding/ShapeRoot.h"
00009 
00010 namespace Kodu {
00011 
00012     //! Kodu Action Grab (derived from Kodu Action)
00013     class KoduActionGrab : public KoduAction {
00014     public:
00015         //! Constructor
00016         KoduActionGrab(bool actionIsUsingIt, bool useOnce)
00017           : KoduAction("KoduActionGrab", KoduAction::AT_GRAB, true, useOnce),
00018             usingItModifier(actionIsUsingIt)
00019         { }
00020 
00021         //! Copy constructor
00022         KoduActionGrab(const KoduActionGrab& kAction)
00023           : KoduAction(kAction),
00024             usingItModifier(kAction.usingItModifier)
00025         { }
00026 
00027         //! Destructor
00028         ~KoduActionGrab() {
00029             // no explicit implementation
00030         }
00031 
00032         //! Assignment operator
00033         KoduActionGrab& operator=(const KoduActionGrab& kAction) {
00034             if (this != & kAction) {
00035                 KoduAction::operator=(kAction);
00036                 usingItModifier = kAction.usingItModifier;
00037             }
00038             return *this;
00039         }
00040 
00041         //! Returns the target object (the object to grab)
00042         const DualCoding::ShapeRoot getTargetObject() const;
00043 
00044         //! Tests if the primitive argument is the same as the clling class
00045         static bool isSameTypeAs(const KoduPrimitive*);
00046 
00047         //! Used to reinitialize certain variables (e.g. when switching to another page)
00048         virtual void reinitialize();
00049 
00050         //! Prints the attributes of a particular instance
00051         virtual void printAttrs() const;
00052 
00053     private:
00054         bool usingItModifier;   //!< States whether or not the "it" modifier was specified (by the user)
00055     };
00056 
00057 }
00058 
00059 #endif // end of KODU_ACTION_GRAB_H_

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