X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fupdate%2Fnodes%2Fnode-messages.h;h=0fc422f3ade0c6885d382cfcb249558e55d1ac83;hb=4ed3f18aef1b98525880b7bc42393e77ea0b3497;hp=af3cf6d7a5c9334cec8886188450858cfe50512b;hpb=2415d4f81cf9784289d4a7afbbc8b19cda2e105f;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/internal/update/nodes/node-messages.h b/dali/internal/update/nodes/node-messages.h index af3cf6d..0fc422f 100644 --- a/dali/internal/update/nodes/node-messages.h +++ b/dali/internal/update/nodes/node-messages.h @@ -1,8 +1,8 @@ -#ifndef __DALI_INTERNAL_SCENE_GRAPH_NODE_MESSAGES_H__ -#define __DALI_INTERNAL_SCENE_GRAPH_NODE_MESSAGES_H__ +#ifndef DALI_INTERNAL_SCENE_GRAPH_NODE_MESSAGES_H +#define DALI_INTERNAL_SCENE_GRAPH_NODE_MESSAGES_H /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2019 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -47,7 +47,7 @@ public: /** * Virtual destructor */ - virtual ~NodePropertyMessageBase(); + ~NodePropertyMessageBase() override; private: @@ -67,8 +67,7 @@ template< typename P > class NodePropertyMessage : public NodePropertyMessageBase { public: - - typedef void(AnimatableProperty
::*MemberFunction)( BufferIndex, typename ParameterType< P >::PassingType ); + using MemberFunction = void ( AnimatableProperty
::* )( BufferIndex, typename ParameterType
::PassingType ); /** * Create a message. @@ -87,7 +86,7 @@ public: typename ParameterType< P >::PassingType value ) { // Reserve some memory inside the message queue - unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( NodePropertyMessage ) ); + uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( NodePropertyMessage ) ); // Construct message in the message queue memory; note that delete should not be called on the return value new (slot) NodePropertyMessage( eventThreadServices.GetUpdateManager(), node, property, member, value ); @@ -96,14 +95,12 @@ public: /** * Virtual destructor */ - virtual ~NodePropertyMessage() - { - } + ~NodePropertyMessage() override = default; /** * @copydoc MessageBase::Process */ - virtual void Process( BufferIndex updateBufferIndex ) + void Process( BufferIndex updateBufferIndex ) override { (mProperty->*mMemberFunction)( updateBufferIndex, mParam ); } @@ -148,8 +145,7 @@ template< typename P > class NodePropertyComponentMessage : public NodePropertyMessageBase { public: - - typedef void(AnimatableProperty
::*MemberFunction)( BufferIndex, float ); + using MemberFunction = void ( AnimatableProperty
::* )( BufferIndex, float );
/**
* Send a message.
@@ -168,7 +164,7 @@ public:
float value )
{
// Reserve some memory inside the message queue
- unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( NodePropertyComponentMessage ) );
+ uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( NodePropertyComponentMessage ) );
// Construct message in the message queue memory; note that delete should not be called on the return value
new (slot) NodePropertyComponentMessage( eventThreadServices.GetUpdateManager(), node, property, member, value );
@@ -177,14 +173,12 @@ public:
/**
* Virtual destructor
*/
- virtual ~NodePropertyComponentMessage()
- {
- }
+ ~NodePropertyComponentMessage() override = default;
/**
* @copydoc MessageBase::Process
*/
- virtual void Process( BufferIndex updateBufferIndex )
+ void Process( BufferIndex updateBufferIndex ) override
{
(mProperty->*mMemberFunction)( updateBufferIndex, mParam );
}
@@ -227,8 +221,7 @@ template ::*MemberFunction)( BufferIndex, const P& );
+ using MemberFunction = void ( TransformManagerPropertyHandler ::* )( BufferIndex, const P& );
/**
* Create a message.
@@ -247,7 +240,7 @@ public:
const P& value )
{
// Reserve some memory inside the message queue
- unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( NodeTransformPropertyMessage ) );
+ uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( NodeTransformPropertyMessage ) );
// Construct message in the message queue memory; note that delete should not be called on the return value
new (slot) NodeTransformPropertyMessage( eventThreadServices.GetUpdateManager(), node, property, member, value );
@@ -256,14 +249,12 @@ public:
/**
* Virtual destructor
*/
- virtual ~NodeTransformPropertyMessage()
- {
- }
+ ~NodeTransformPropertyMessage() override = default;
/**
* @copydoc MessageBase::Process
*/
- virtual void Process( BufferIndex updateBufferIndex )
+ void Process( BufferIndex updateBufferIndex ) override
{
(mProperty->*mMemberFunction)( updateBufferIndex, mParam );
}
@@ -306,8 +297,7 @@ template ::*MemberFunction)( BufferIndex, float );
+ using MemberFunction = void ( TransformManagerPropertyHandler ::* )( BufferIndex, float );
/**
* Send a message.
@@ -326,7 +316,7 @@ public:
float value )
{
// Reserve some memory inside the message queue
- unsigned int* slot = eventThreadServices.ReserveMessageSlot( sizeof( NodeTransformComponentMessage ) );
+ uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( NodeTransformComponentMessage ) );
// Construct message in the message queue memory; note that delete should not be called on the return value
new (slot) NodeTransformComponentMessage( eventThreadServices.GetUpdateManager(), node, property, member, value );
@@ -335,14 +325,12 @@ public:
/**
* Virtual destructor
*/
- virtual ~NodeTransformComponentMessage()
- {
- }
+ ~NodeTransformComponentMessage() override = default;
/**
* @copydoc MessageBase::Process
*/
- virtual void Process( BufferIndex updateBufferIndex )
+ void Process( BufferIndex updateBufferIndex ) override
{
(mProperty->*mMemberFunction)( updateBufferIndex, mParam );
}
@@ -386,4 +374,4 @@ private:
} // namespace Dali
-#endif // __DALI_INTERNAL_SCENE_GRAPH_NODE_MESSAGES_H__
+#endif // DALI_INTERNAL_SCENE_GRAPH_NODE_MESSAGES_H