KoduConditionHear.h
Go to the documentation of this file.00001 #ifndef KODU_CONDITION_HEAR_H_
00002 #define KODU_CONDITION_HEAR_H_
00003
00004
00005
00006 #include "Kodu/Primitives/KoduCondition.h"
00007
00008
00009 #include <iostream>
00010
00011 namespace Kodu {
00012
00013
00014 class KoduWorld;
00015
00016 class KoduConditionHear : public KoduCondition {
00017 public:
00018
00019 KoduConditionHear(bool useNot, const std::string& kObjectType, const std::string& kObjectColor, const std::string& kSaid)
00020 : KoduCondition("KoduConditionHear", KoduCondition::CT_HEAR),
00021 notModifierEnabled(useNot),
00022 objType(kObjectType),
00023 objColor(kObjectColor),
00024 said(kSaid)
00025 { }
00026
00027
00028 KoduConditionHear(const KoduConditionHear& kCondition)
00029 : KoduCondition(kCondition),
00030 notModifierEnabled(kCondition.notModifierEnabled),
00031 objType(kCondition.objType),
00032 objColor(kCondition.objColor),
00033 said(kCondition.said)
00034 { }
00035
00036
00037 ~KoduConditionHear() {
00038
00039 }
00040
00041
00042 KoduConditionHear& operator=(const KoduConditionHear& kCondition) {
00043 if (this != &kCondition) {
00044 KoduCondition::operator=(kCondition);
00045 notModifierEnabled = kCondition.notModifierEnabled;
00046 objType = kCondition.objType;
00047 objColor = kCondition.objColor;
00048 said = kCondition.said;
00049 }
00050 return *this;
00051 }
00052
00053
00054 virtual bool evaluate(const KoduWorld&);
00055
00056
00057 const std::string& getObjectColor() const { return objColor; }
00058
00059
00060 const std::string& getObjectType() const { return objType; }
00061
00062
00063 const DualCoding::ShapeRoot getTargetObject();
00064
00065
00066 virtual void reinitialize();
00067
00068
00069 virtual void printAttrs() const;
00070
00071 private:
00072 bool notModifierEnabled;
00073 std::string objType;
00074 std::string objColor;
00075 std::string said;
00076 };
00077 }
00078
00079 #endif // KODU_CONDITION_HEAR_H_