mirror of https://github.com/axmolengine/axmol.git
34 lines
608 B
C++
34 lines
608 B
C++
#ifndef __CCINTEGER_H__
|
|
#define __CCINTEGER_H__
|
|
|
|
#include "CCObject.h"
|
|
|
|
NS_CC_BEGIN
|
|
|
|
class CC_DLL CCInteger : public CCObject
|
|
{
|
|
public:
|
|
CCInteger(int v)
|
|
: m_nValue(v) {}
|
|
int getValue() const {return m_nValue;}
|
|
|
|
// @warning: This interface will be deprecated in future.
|
|
// static CCInteger* integerWithInt(int v)
|
|
// {
|
|
// return CCInteger::create(v);
|
|
// }
|
|
|
|
static CCInteger* create(int v)
|
|
{
|
|
CCInteger* pRet = new CCInteger(v);
|
|
pRet->autorelease();
|
|
return pRet;
|
|
}
|
|
private:
|
|
int m_nValue;
|
|
};
|
|
|
|
NS_CC_END
|
|
|
|
#endif /* __CCINTEGER_H__ */
|