diff --git a/cocos2dx/cocoa/CCBool.h b/cocos2dx/cocoa/CCBool.h new file mode 100755 index 0000000000..baded01efe --- /dev/null +++ b/cocos2dx/cocoa/CCBool.h @@ -0,0 +1,35 @@ +#ifndef __CCBOOL_H__ +#define __CCBOOL_H__ + +#include "CCObject.h" + +NS_CC_BEGIN + +/** + * @addtogroup data_structures + * @{ + */ + +class CC_DLL CCBool : public CCObject +{ +public: + CCBool(bool v) + : m_nValue(v) {} + bool getValue() const {return m_nValue;} + + static CCBool* create(bool v) + { + CCBool* pRet = new CCBool(v); + pRet->autorelease(); + return pRet; + } +private: + double m_nValue; +}; + +// end of data_structure group +/// @} + +NS_CC_END + +#endif /* __CCBOOL_H__ */ diff --git a/cocos2dx/cocoa/CCDouble.h b/cocos2dx/cocoa/CCDouble.h new file mode 100755 index 0000000000..e0b4dbf9ac --- /dev/null +++ b/cocos2dx/cocoa/CCDouble.h @@ -0,0 +1,35 @@ +#ifndef __CCDOUBLE_H__ +#define __CCDOUBLE_H__ + +#include "CCObject.h" + +NS_CC_BEGIN + +/** + * @addtogroup data_structures + * @{ + */ + +class CC_DLL CCDouble : public CCObject +{ +public: + CCDouble(double v) + : m_nValue(v) {} + double getValue() const {return m_nValue;} + + static CCDouble* create(double v) + { + CCDouble* pRet = new CCDouble(v); + pRet->autorelease(); + return pRet; + } +private: + double m_nValue; +}; + +// end of data_structure group +/// @} + +NS_CC_END + +#endif /* __CCDOUBLE_H__ */ diff --git a/cocos2dx/cocoa/CCFloat.h b/cocos2dx/cocoa/CCFloat.h new file mode 100755 index 0000000000..cf8fb38352 --- /dev/null +++ b/cocos2dx/cocoa/CCFloat.h @@ -0,0 +1,35 @@ +#ifndef __CCFLOAT_H__ +#define __CCFLOAT_H__ + +#include "CCObject.h" + +NS_CC_BEGIN + +/** + * @addtogroup data_structures + * @{ + */ + +class CC_DLL CCFloat : public CCObject +{ +public: + CCFloat(float v) + : m_nValue(v) {} + float getValue() const {return m_nValue;} + + static CCFloat* create(float v) + { + CCFloat* pRet = new CCFloat(v); + pRet->autorelease(); + return pRet; + } +private: + float m_nValue; +}; + +// end of data_structure group +/// @} + +NS_CC_END + +#endif /* __CCFLOAT_H__ */ diff --git a/cocos2dx/include/cocos2d.h b/cocos2dx/include/cocos2d.h index af695dc8ce..f11931f7ef 100755 --- a/cocos2dx/include/cocos2d.h +++ b/cocos2dx/include/cocos2d.h @@ -64,6 +64,9 @@ THE SOFTWARE. #include "cocoa/CCSet.h" #include "cocoa/CCAutoreleasePool.h" #include "cocoa/CCInteger.h" +#include "cocoa/CCFloat.h" +#include "cocoa/CCDouble.h" +#include "cocoa/CCBool.h" #include "cocoa/CCString.h" #include "cocoa/CCNS.h" #include "cocoa/CCZone.h"