axmol/cocos2dx/cocoa/CCInteger.h

40 lines
630 B
C
Raw Normal View History

#ifndef __CCINTEGER_H__
#define __CCINTEGER_H__
#include "CCObject.h"
NS_CC_BEGIN
2012-06-20 18:09:11 +08:00
/**
* @addtogroup data_structures
* @{
*/
class CC_DLL CCInteger : public CCObject
{
public:
CCInteger(int v)
: _value(v) {}
int getValue() const {return _value;}
static CCInteger* create(int v)
{
CCInteger* pRet = new CCInteger(v);
pRet->autorelease();
return pRet;
}
/* override functions */
virtual void acceptVisitor(CCDataVisitor &visitor) { visitor.visit(this); }
private:
int _value;
};
2012-06-20 18:09:11 +08:00
// end of data_structure group
/// @}
NS_CC_END
#endif /* __CCINTEGER_H__ */