// // SimpleValue.h // SteveMaggieCpp // // Created by Katarzyna Kalinowska-Górska on 01.06.2017. // // #ifndef SimpleValue_h #define SimpleValue_h #include "ScenarioObject.h" #include "cocos2d.h" #include #include //TODO getType class SimpleValue : public ScenarioObject, public cocos2d::Ref { public: SimpleValue(const SimpleValue& val){ _stringValue = val._stringValue; _numberValue = val._numberValue; _boolValue = val._boolValue; _pointValue = val._pointValue; }; SimpleValue(std::string stringValue) { _stringValue = stringValue; }; SimpleValue(float number){ _numberValue = number; }; SimpleValue(bool boolValue){ _boolValue = boolValue; }; SimpleValue(cocos2d::Point point){ _pointValue = point; }; virtual std::string getPropertyAsString(std::string propertyName = ""){ if(propertyName == ""){ return _stringValue; } return "NULL"; }; float getNumberValue(){ return _numberValue; } bool getBoolValue(){ return _boolValue; } cocos2d::Point getPointValue(){ return _pointValue; } std::string getStringValue(){ return _stringValue; } void setBoolValue(bool pBoolValue){ _boolValue = pBoolValue; } void setNumberValue(float pNumberValue){ _numberValue = pNumberValue; } protected: std::string _stringValue; float _numberValue; cocos2d::Point _pointValue; bool _boolValue; }; #endif /* SimpleString_h */