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

#include <CCObject.h>

Inheritance diagram for Object:
__Array __Bool __Dictionary __Double __Float __Integer __NotificationCenter __Set __String Action ActionManager Animation AnimationCache AnimationFrame AutoreleasePool CCBMFontConfiguration Component Configuration Console Director Event EventDispatcher EventListener Color3bObject Invocation Font FontAtlas FontDefinitionTTF GLProgram Grabber GridBase GroupCommandManager LayoutParameter Image LuaStack MaterialManager HttpRequest HttpResponse SIOClient Node NotificationObserver PointArray Profiler ProfilingTimer ScheduleHandlerDelegate Scheduler ScriptHandlerEntry ShaderCache SpriteFrame SpriteFrameCache Texture2D TextureAtlas TextureCache Timer TMXLayerInfo TMXMapInfo TMXObjectGroup TMXTilesetInfo Touch CCBAnimationManager CCBKeyframe CCBReader CCBSequence CCBSequenceProperty NodeLoader NodeLoaderLibrary ActionFrame ActionFrameEasing ActionManagerEx ActionNode ActionObject AnimationData ArmatureData ArmatureDataManager ArmatureMovementDispatcher BaseData BaseTriggerAction BaseTriggerCondition ColliderBody ColliderDetector ContourData DataReaderHelper DecorativeDisplay DisplayData DisplayManager GUIReader MovementBoneData MovementData ProcessBase TextureData TriggerObj WidgetPropertiesReader LuaMinXmlHttpRequest MinXmlHttpRequest SimpleRunLoop

Public Member Functions

 Object ()
 Constructor. More...
 
 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...
 
local retainCount ()
 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...
 
var _luaID
 Lua reference id. More...
 
local _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
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.
virtual void update ( float  dt)
inlinevirtual

Reimplemented in Node, TargetedAction, Animate, ReverseTime, DelayTime, TintBy, TintTo, FadeTo, FadeOut, FadeIn, Blink, ScaleTo, EaseBackInOut, BezierBy, EaseBackOut, EaseBackIn, EaseBounceInOut, JumpBy, EaseBounceOut, EaseBounceIn, SkewTo, EaseElasticInOut, EaseElasticOut, EaseCubicActionInOut, MoveBy, EaseCubicActionOut, EaseElasticIn, ParticleSystem, SplitCols, EaseCubicActionIn, RotateBy, SplitRows, EaseCircleActionInOut, Twirl, EaseSineInOut, JumpTiles3D, RotateTo, EaseCircleActionOut, CallFunc, ScrollView, EaseSineOut, EaseCircleActionIn, CCBEaseInstant, Waves, Spawn, WavesTiles3D, EaseSineIn, CCBRotateYTo, EaseQuinticActionInOut, DeccelAmplitude, Liquid, CCBRotateXTo, Place, TurnOffTiles, EaseExponentialInOut, EaseQuinticActionOut, CCBRotateTo, AccelAmplitude, EaseQuinticActionIn, EaseExponentialOut, Shaky3D, FlipY, CCBSoundEffect, CardinalSplineTo, EaseQuarticActionInOut, EaseExponentialIn, AccelDeccelAmplitude, Ripple3D, ArmatureAnimation, FlipX, CCBSetSpriteFrame, Repeat, EaseQuarticActionOut, Armature, EaseInOut, Scheduler, RemoveSelf, EaseQuarticActionIn, PageView, EaseOut, FadeOutTRTiles, Bone, OrbitCamera, Lens3D, ActionManager, TextField, ToggleVisibility, EaseQuadraticActionInOut, Sequence, EaseIn, FlipY3D, ProcessBase, ShuffleTiles, Hide, EaseQuadraticActionOut, Timer, MotionStreak, Action, ProgressFromTo, FlipX3D, ControlStepper, ActionTween, Scene, Show, EaseQuadraticActionIn, ShatteredTiles3D, Skeleton, SkeletonAnimation, ComController, Waves3D, ScheduleHandlerDelegate, ActionEase, ActionInstant, Component, PageTurn3D, ProgressTo, ShakyTiles3D, EaseBezierAction, and SimpleRunLoop.

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: