cocos2d-x  3.0-beta2
 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 CCBMFontConfiguration Component Configuration Director Event EventDispatcher EventListener Color3bObject Invocation Font FontAtlas 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...
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...
unsigned int getReferenceCount () const
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 _referenceCount
 count of references More...


class AutoreleasePool

Constructor & Destructor Documentation

Object ( )


The object's reference count is 1 after construction.

virtual ~Object ( )

Member Function Documentation

virtual void acceptVisitor ( DataVisitor visitor)
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.

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

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

objectThe object to be compared to this object.
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.

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

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 ( )

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.

The object's reference count.
virtual void update ( float  dt)

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, CCBRotateYTo, EaseSineIn, EaseQuinticActionInOut, DeccelAmplitude, CCBRotateXTo, Liquid, Place, TurnOffTiles, EaseExponentialInOut, EaseQuinticActionOut, CCBRotateTo, AccelAmplitude, EaseExponentialOut, EaseQuinticActionIn, Shaky3D, FlipY, CCBSoundEffect, CardinalSplineTo, EaseExponentialIn, EaseQuarticActionInOut, AccelDeccelAmplitude, CCBSetSpriteFrame, Ripple3D, ArmatureAnimation, FlipX, Repeat, EaseQuarticActionOut, Armature, EaseInOut, Scheduler, RemoveSelf, EaseQuarticActionIn, PageView, EaseOut, FadeOutTRTiles, Bone, Lens3D, ActionManager, OrbitCamera, TextField, ToggleVisibility, Sequence, EaseQuadraticActionInOut, EaseIn, FlipY3D, ProcessBase, ShuffleTiles, Hide, EaseQuadraticActionOut, Timer, MotionStreak, Action, ProgressFromTo, FlipX3D, ControlStepper, ActionTween, Scene, Show, ShatteredTiles3D, EaseQuadraticActionIn, Skeleton, SkeletonAnimation, ComController, Waves3D, ScheduleHandlerDelegate, ActionEase, ActionInstant, Component, PageTurn3D, ProgressTo, ShakyTiles3D, EaseBezierAction, and SimpleRunLoop.

Friends And Related Function Documentation

friend class AutoreleasePool

Member Data Documentation

unsigned int _ID

object id, ScriptSupport need public _ID

int _luaID

Lua reference id.

unsigned int _referenceCount

count of references

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