cocos2d-x  3.0-alpha0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Object Class Reference

#include <CCObject.h>

Inheritance diagram for Object:
Action ActionManager Animation AnimationCache AnimationFrame Array AutoreleasePool Bool Camera CCBMFontConfiguration Component Configuration Data Dictionary Director Double EventListener ActionFrame ActionFrameEasing ActionManagerEx ActionNode ActionObject AnimationData ArmatureData ArmatureDataManager BaseData ColliderBody ColliderDetector ContourData ContourVertex2 DataReaderHelper DecorativeDisplay DisplayData DisplayManager MovementBoneData MovementData ProcessBase TextureData CCBAnimationManager CCBKeyframe CCBReader CCBSequence CCBSequenceProperty CCBValue CCSGUIReader Color3bObject Color3BWapper HttpClient HttpRequest HttpResponse Invocation LayoutParameter NodeLoader NodeLoaderLibrary SIOClient UIWidget Float Font FontAtlas FontDefinitionTTF GLProgram Grabber GridBase Image Integer LuaStack Node NotificationCenter NotificationObserver PhysicsBody PhysicsJoint PhysicsShape PointArray Profiler ProfilingTimer ScheduleHandlerDelegate Scheduler ScriptHandlerEntry Set ShaderCache SpriteFrame SpriteFrameCache String Texture2D TextureAtlas TextureCache Timer TMXLayerInfo TMXMapInfo TMXObjectGroup TMXTilesetInfo Touch

Public Member Functions

 Object ()
 Constructor. More...
 
virtual ~Object ()
void release ()
 Release the ownership immediately. More...
 
void retain ()
 Retains the ownership. More...
 
Objectautorelease ()
 Release the ownership sometime soon automatically. More...
 
bool isSingleReference () const
 Returns a boolean value that indicates whether there is only one reference to the object. More...
 
unsigned int retainCount () const
 Returns the object's current reference count. More...
 
virtual bool isEqual (const Object *object)
 Returns a boolean value that indicates whether this object and a given object are equal. More...
 
virtual void acceptVisitor (DataVisitor &visitor)
virtual void update (float dt)

Public Attributes

unsigned int _ID
 object id, ScriptSupport need public _ID More...
 
int _luaID
 Lua reference id. More...
 

Protected Attributes

unsigned int _reference
 count of references More...
 
var _reference
 count of references More...
 
local _reference
 count of references More...
 
unsigned int _autoReleaseCount
 count of autorelease More...
 
var _autoReleaseCount
 count of autorelease More...
 
local _autoReleaseCount
 count of autorelease More...
 

Friends

class AutoreleasePool

Constructor & Destructor Documentation

Object ( )

Constructor.

The object's reference count is 1 after construction.

local Object ( )

Constructor.

The object's reference count is 1 after construction.

virtual ~Object ( )
virtual

Member Function Documentation

virtual void acceptVisitor ( DataVisitor visitor)
virtual

Reimplemented in Array, Dictionary, String, Set, Data, Integer, Bool, Double, and Float.

Object* autorelease ( )

Release the ownership sometime soon automatically.

This descrements the object's reference count at the end of current autorelease pool block.

If the reference count reaches 0 after the descrement, this object is destructed.

Returns
The object itself.
See Also
AutoreleasePool, retain, release
virtual bool isEqual ( const Object object)
virtual

Returns a boolean value that indicates whether this object and a given object are equal.

Parameters
objectThe object to be compared to this object.
Returns
True if this object and object are equal, otherwise false.

Reimplemented in String.

bool isSingleReference ( ) const

Returns a boolean value that indicates whether there is only one reference to the object.

That is, whether the reference count is 1.

Returns
Whether the object's reference count is 1.
local isSingleReference ( )

Returns a boolean value that indicates whether there is only one reference to the object.

That is, whether the reference count is 1.

Returns
Whether the object's reference count is 1.
void release ( )
inline

Release the ownership immediately.

This decrements the object's reference count.

If the reference count reaches 0 after the descrement, this object is destructed.

See Also
retain, autorelease
local release ( )
inline

Release the ownership immediately.

This decrements the object's reference count.

If the reference count reaches 0 after the descrement, this object is destructed.

See Also
retain, autorelease
void retain ( )
inline

Retains the ownership.

This increases the object's reference count.

See Also
release, autorelease
local retain ( )
inline

Retains the ownership.

This increases the object's reference count.

See Also
release, autorelease
unsigned int retainCount ( ) const

Returns the object's current reference count.

Returns
The object's reference count.
local retainCount ( )

Returns the object's current reference count.

Returns
The object's reference count.

Friends And Related Function Documentation

friend class AutoreleasePool
friend
var AutoreleasePool
friend
local AutoreleasePool
friend

Member Data Documentation

unsigned int _autoReleaseCount
protected

count of autorelease

var _autoReleaseCount
protected

count of autorelease

local _autoReleaseCount
protected

count of autorelease

unsigned int _ID

object id, ScriptSupport need public _ID

int _luaID

Lua reference id.

var _luaID

Lua reference id.

local _luaID

Lua reference id.

unsigned int _reference
protected

count of references

var _reference
protected

count of references

local _reference
protected

count of references


The documentation for this class was generated from the following file: