2022-07-30 12:24:03 -04:00
|
|
|
#ifndef __CCINTEGER_H__
|
|
|
|
#define __CCINTEGER_H__
|
|
|
|
|
|
|
|
#include "CCObject.h"
|
|
|
|
|
|
|
|
NS_CC_BEGIN
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @addtogroup data_structures
|
|
|
|
* @{
|
|
|
|
* @js NA
|
|
|
|
*/
|
|
|
|
|
|
|
|
class CC_DLL CCInteger : public CCObject
|
|
|
|
{
|
|
|
|
GEODE_FRIEND_MODIFY
|
|
|
|
public:
|
|
|
|
CCInteger(int v)
|
|
|
|
: m_nValue(v) {}
|
|
|
|
int getValue() const {return m_nValue;}
|
2023-12-20 21:14:53 -05:00
|
|
|
void setValue(int v) { m_nValue = v; };
|
2022-07-30 12:24:03 -04:00
|
|
|
|
|
|
|
static CCInteger* create(int v)
|
|
|
|
{
|
|
|
|
CCInteger* pRet = new CCInteger(v);
|
|
|
|
pRet->autorelease();
|
|
|
|
return pRet;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* override functions
|
|
|
|
* @lua NA
|
|
|
|
*/
|
|
|
|
virtual void acceptVisitor(CCDataVisitor &visitor) { visitor.visit(this); }
|
|
|
|
|
|
|
|
private:
|
|
|
|
int m_nValue;
|
|
|
|
};
|
|
|
|
|
|
|
|
// end of data_structure group
|
|
|
|
/// @}
|
|
|
|
|
|
|
|
NS_CC_END
|
|
|
|
|
|
|
|
#endif /* __CCINTEGER_H__ */
|