Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
KoduConditionAlways.hGo to the documentation of this file.00001 #ifndef KODU_CONDITION_ALWAYS_H_ 00002 #define KODU_CONDITION_ALWAYS_H_ 00003 00004 // Kodu Library 00005 #include "Kodu/KoduWorld.h" 00006 #include "Kodu/Primitives/KoduCondition.h" 00007 00008 namespace Kodu { 00009 00010 class KoduWorld; 00011 00012 //! Kodu Condition Always (derived from Kodu Condition) 00013 class KoduConditionAlways : public KoduCondition { 00014 public: 00015 //! Constructor 00016 KoduConditionAlways() 00017 : KoduCondition ("KoduConditionAlways", KoduCondition::CT_ALWAYS) 00018 { } 00019 00020 //! Copy constructor 00021 KoduConditionAlways(const KoduConditionAlways& kCondition) 00022 : KoduCondition(kCondition) 00023 { } 00024 00025 //! Destructor 00026 ~KoduConditionAlways () { 00027 // no explicit implementation 00028 } 00029 00030 //! Assignment operator 00031 KoduConditionAlways& operator=(const KoduConditionAlways& kCondition) { 00032 if (this != &kCondition) { 00033 KoduCondition::operator=(kCondition); 00034 } 00035 return *this; 00036 } 00037 00038 //! Evaluates true (always) 00039 virtual bool evaluate(const KoduWorld& kWorldState) { 00040 return true; 00041 } 00042 00043 //! Tests if the primitive argument is the same as the calling class 00044 static bool isSameTypeAs(const KoduPrimitive* kPrimitive) { 00045 return (dynamic_cast<const KoduConditionAlways*>(kPrimitive) != NULL); 00046 } 00047 00048 //! Used to reinitialize certain variables (e.g. when switching to another page) 00049 virtual void reinitialize() { 00050 KoduCondition::reinitialize(); 00051 } 00052 00053 //! Prints the attributes of a particular instance 00054 virtual void printAttrs() const { 00055 KoduCondition::printAttrs(); 00056 } 00057 }; 00058 } // end of Kodu namespace 00059 00060 #endif // KODU_CONDITION_ALWAYS_H_ |
Tekkotsu v5.1CVS |
Generated Mon May 9 04:58:43 2016 by Doxygen 1.6.3 |