axmol/cocos2dx/cocoa/CCDouble.h

39 lines
571 B
C
Raw Normal View History

2012-12-27 22:15:13 +08:00
#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_dValue(v) {}
double getValue() const {return m_dValue;}
2012-12-27 22:15:13 +08:00
static CCDouble* create(double v)
{
CCDouble* pRet = new CCDouble(v);
if (pRet)
{
pRet->autorelease();
}
2012-12-27 22:15:13 +08:00
return pRet;
}
private:
double m_dValue;
2012-12-27 22:15:13 +08:00
};
// end of data_structure group
/// @}
NS_CC_END
#endif /* __CCDOUBLE_H__ */