2012-12-27 22:15:13 +08:00
|
|
|
#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)
|
2012-12-28 11:24:28 +08:00
|
|
|
: m_fValue(v) {}
|
|
|
|
float getValue() const {return m_fValue;}
|
2012-12-27 22:15:13 +08:00
|
|
|
|
|
|
|
static CCFloat* create(float v)
|
|
|
|
{
|
|
|
|
CCFloat* pRet = new CCFloat(v);
|
2012-12-28 11:24:28 +08:00
|
|
|
if (pRet)
|
|
|
|
{
|
|
|
|
pRet->autorelease();
|
|
|
|
}
|
2012-12-27 22:15:13 +08:00
|
|
|
return pRet;
|
|
|
|
}
|
|
|
|
private:
|
2012-12-28 11:24:28 +08:00
|
|
|
float m_fValue;
|
2012-12-27 22:15:13 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
// end of data_structure group
|
|
|
|
/// @}
|
|
|
|
|
|
|
|
NS_CC_END
|
|
|
|
|
|
|
|
#endif /* __CCFLOAT_H__ */
|