X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fupdate%2Fnodes%2Fnode.h;h=a38bda5c3131965b1b0d9541f4c5f0b9b8877341;hb=01c39de261f6eb4e759c7a249e5d67dfef83bca2;hp=71102fba4a8cf38affacd487e3de08a1f1f3abac;hpb=7ee7b82e5ab4c99f36bf3c70ba5ebdc436bf4dce;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/update/nodes/node.h b/dali/internal/update/nodes/node.h old mode 100644 new mode 100755 index 71102fb..a38bda5 --- a/dali/internal/update/nodes/node.h +++ b/dali/internal/update/nodes/node.h @@ -102,8 +102,9 @@ public: /** * Construct a new Node. + * @param[in] id The unique ID of the node */ - static Node* New(); + static Node* New( unsigned int id ); /** * Deletes a Node. @@ -785,8 +786,9 @@ protected: /** * Protected constructor; See also Node::New() + * @param[in] id The Unique ID of the actor creating the node */ - Node(); + Node( unsigned int id ); /** * Protected virtual destructor; See also Node::Delete( Node* ) @@ -867,6 +869,7 @@ public: // Default properties InheritedColor mWorldColor; ///< Full inherited color uint32_t mClippingSortModifier; ///< Contains bit-packed clipping information for quick access when sorting + const unsigned int mId; ///< The Unique ID of the node. protected: @@ -887,9 +890,9 @@ protected: // flags, compressed to bitfield unsigned int mRegenerateUniformMap:2; ///< Indicate if the uniform map has to be regenerated this frame int mDirtyFlags:8; ///< A composite set of flags for each of the Node properties - DrawMode::Type mDrawMode:2; ///< How the Node and its children should be drawn - ColorMode mColorMode:2; ///< Determines whether mWorldColor is inherited, 2 bits is enough - ClippingMode::Type mClippingMode:2; ///< The clipping mode of this node + DrawMode::Type mDrawMode:3; ///< How the Node and its children should be drawn + ColorMode mColorMode:3; ///< Determines whether mWorldColor is inherited, 2 bits is enough + ClippingMode::Type mClippingMode:3; ///< The clipping mode of this node bool mIsRoot:1; ///< True if the node cannot have a parent bool mIsLayer:1; ///< True if the node is a layer bool mPositionUsesAnchorPoint:1; ///< True if the node should use the anchor-point when calculating the position @@ -1035,14 +1038,22 @@ inline void SetPositionUsesAnchorPointMessage( EventThreadServices& eventThreadS // Template specialisation for OwnerPointer, because delete is protected template <> -void OwnerPointer::Reset(); - +inline void OwnerPointer::Reset() +{ + if (mObject != NULL) + { + Dali::Internal::SceneGraph::Node::Delete(mObject); + mObject = NULL; + } +} } // namespace Internal // Template specialisations for OwnerContainer, because delete is protected template <> -void OwnerContainer::Delete( Dali::Internal::SceneGraph::Node* pointer ); - +inline void OwnerContainer::Delete( Dali::Internal::SceneGraph::Node* pointer ) +{ + Dali::Internal::SceneGraph::Node::Delete(pointer); +} } // namespace Dali #endif // DALI_INTERNAL_SCENE_GRAPH_NODE_H