2012-04-19 14:35:52 +08:00
|
|
|
#ifndef __CCINTEGER_H__
|
|
|
|
#define __CCINTEGER_H__
|
|
|
|
|
|
|
|
#include "CCObject.h"
|
|
|
|
|
|
|
|
NS_CC_BEGIN
|
|
|
|
|
2012-06-20 18:09:11 +08:00
|
|
|
/**
|
|
|
|
* @addtogroup data_structures
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
class CC_DLL CCInteger : public CCObject
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CCInteger(int v)
|
2012-04-20 15:23:00 +08:00
|
|
|
: m_nValue(v) {}
|
|
|
|
int getValue() const {return m_nValue;}
|
|
|
|
|
2012-06-14 16:05:58 +08:00
|
|
|
static CCInteger* create(int v)
|
2012-04-20 15:23:00 +08:00
|
|
|
{
|
|
|
|
CCInteger* pRet = new CCInteger(v);
|
|
|
|
pRet->autorelease();
|
|
|
|
return pRet;
|
|
|
|
}
|
|
|
|
private:
|
|
|
|
int m_nValue;
|
2012-04-19 14:35:52 +08:00
|
|
|
};
|
|
|
|
|
2012-06-20 18:09:11 +08:00
|
|
|
// end of data_structure group
|
|
|
|
/// @}
|
|
|
|
|
2012-04-19 14:35:52 +08:00
|
|
|
NS_CC_END
|
|
|
|
|
|
|
|
#endif /* __CCINTEGER_H__ */
|