From: Subhransu Mohanty Date: Mon, 7 Sep 2020 01:14:15 +0000 (+0900) Subject: Use modern construct 'using' instead of typedef. X-Git-Tag: dali_1.9.29~14 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-core.git;a=commitdiff_plain;h=5826321b721c2dc09abda23e9d845cb4cf8edc92 Use modern construct 'using' instead of typedef. this patch is auto generated by clang-tidy using 'modernize-use-using' check. Change-Id: I269203c391d6a676db65a28ac7dd4b19301bdbd1 --- diff --git a/dali/devel-api/actors/actor-devel.h b/dali/devel-api/actors/actor-devel.h index 9a82366..a55bb0e 100644 --- a/dali/devel-api/actors/actor-devel.h +++ b/dali/devel-api/actors/actor-devel.h @@ -136,7 +136,7 @@ enum Type } // namespace VisibilityChange -typedef Signal< void ( Actor, bool, VisibilityChange::Type ) > VisibilityChangedSignalType; ///< Signal type of VisibilityChangedSignalType +using VisibilityChangedSignalType = Signal; ///< Signal type of VisibilityChangedSignalType /** * @brief This signal is emitted when the visible property of this or a parent actor is changed. @@ -161,9 +161,7 @@ DALI_CORE_API VisibilityChangedSignalType& VisibilityChangedSignal( Actor actor */ DALI_CORE_API Rect<> CalculateScreenExtents( Actor actor ); - - -typedef Signal< void (Actor) > ChildChangedSignalType; ///< Called when the actor has a child added or removed +using ChildChangedSignalType = Signal; ///< Called when the actor has a child added or removed /** * @brief This signal is emitted when a child is added to this actor. @@ -205,8 +203,7 @@ DALI_CORE_API ChildChangedSignalType& ChildAddedSignal( Actor actor ); */ DALI_CORE_API ChildChangedSignalType& ChildRemovedSignal( Actor actor ); - -typedef Signal< void (Actor) > ChildOrderChangedSignalType; ///< Used when the actor's children have changed order +using ChildOrderChangedSignalType = Signal; ///< Used when the actor's children have changed order /** * @brief This signal is emitted when an actor's children change their sibling order diff --git a/dali/devel-api/animation/animation-data.h b/dali/devel-api/animation/animation-data.h index d90b82b..de8e06f 100644 --- a/dali/devel-api/animation/animation-data.h +++ b/dali/devel-api/animation/animation-data.h @@ -70,8 +70,7 @@ public: * @brief AnimationData holds the required data required to define an * animation to be performed on an actor or actors. */ - typedef Dali::Vector< AnimationDataElement* > AnimationDataList; - + using AnimationDataList = Dali::Vector; /** * @brief Adds one AnimationDataElement to the list to describe one animation. diff --git a/dali/devel-api/common/owner-container.h b/dali/devel-api/common/owner-container.h index 5637d57..c6be817 100644 --- a/dali/devel-api/common/owner-container.h +++ b/dali/devel-api/common/owner-container.h @@ -42,10 +42,9 @@ template< class T > class OwnerContainer : public Dali::Vector< T > { public: - - typedef typename Dali::Vector< T >::SizeType SizeType; - typedef typename Vector< T >::Iterator Iterator; - typedef typename Vector< T >::ConstIterator ConstIterator; + using SizeType = typename Dali::Vector::SizeType; + using Iterator = typename Vector::Iterator; + using ConstIterator = typename Vector::ConstIterator; /** * Create a pointer-container. diff --git a/dali/devel-api/common/stage-devel.h b/dali/devel-api/common/stage-devel.h old mode 100755 new mode 100644 index a5c31a1..fd93853 --- a/dali/devel-api/common/stage-devel.h +++ b/dali/devel-api/common/stage-devel.h @@ -38,7 +38,7 @@ enum class Rendering CONTINUOUSLY, ///< Will render continuously. }; -typedef Signal< bool (const KeyEvent&) > KeyEventGeneratedSignalType; ///< Stage key event generated signal type +using KeyEventGeneratedSignalType = Signal; ///< Stage key event generated signal type /** * @brief The user would connect to this signal to get a KeyEvent when KeyEvent is generated. diff --git a/dali/devel-api/common/stage.h b/dali/devel-api/common/stage.h index 90d572c..7c8dffa 100644 --- a/dali/devel-api/common/stage.h +++ b/dali/devel-api/common/stage.h @@ -85,13 +85,12 @@ class KeyEvent; class DALI_CORE_API Stage : public BaseHandle { public: - - typedef Signal< void (const KeyEvent&) > KeyEventSignalType; ///< Key event signal type - typedef Signal< void () > EventProcessingFinishedSignalType; ///< Event Processing finished signal type - typedef Signal< void (const TouchEvent&) > TouchEventSignalType; ///< Touch signal type - typedef Signal< void (const WheelEvent&) > WheelEventSignalType; ///< Wheel signal type - typedef Signal< void () > ContextStatusSignal; ///< Context status signal type - typedef Signal< void () > SceneCreatedSignalType; ///< Scene created signal type + using KeyEventSignalType = Signal; ///< Key event signal type + using EventProcessingFinishedSignalType = Signal; ///< Event Processing finished signal type + using TouchEventSignalType = Signal; ///< Touch signal type + using WheelEventSignalType = Signal; ///< Wheel signal type + using ContextStatusSignal = Signal; ///< Context status signal type + using SceneCreatedSignalType = Signal; ///< Scene created signal type /** * @brief Allows the creation of an empty stage handle. diff --git a/dali/devel-api/events/hit-test-algorithm.h b/dali/devel-api/events/hit-test-algorithm.h index 8435e85..c3f1c5a 100644 --- a/dali/devel-api/events/hit-test-algorithm.h +++ b/dali/devel-api/events/hit-test-algorithm.h @@ -126,7 +126,7 @@ struct Results * * @return true, if the actor is hittable, false otherwise. */ -typedef bool (*HitTestFunction)(Actor actor, TraverseType type); +using HitTestFunction = bool ( * )( Actor, TraverseType ); /** * @brief Given screen coordinates, this method returns the hit actor & the local coordinates relative to diff --git a/dali/devel-api/events/touch-point.h b/dali/devel-api/events/touch-point.h index 3cda040..414e630 100644 --- a/dali/devel-api/events/touch-point.h +++ b/dali/devel-api/events/touch-point.h @@ -107,9 +107,9 @@ struct DALI_CORE_API TouchPoint Vector2 screen; }; -typedef std::vector TouchPointContainer; ///< Container of touch points. @SINCE_1_0.0 -typedef TouchPointContainer::iterator TouchPointContainerIterator; ///< Iterator for Dali::TouchPointContainer @SINCE_1_0.0 -typedef TouchPointContainer::const_iterator TouchPointContainerConstIterator; ///< Const iterator for Dali::TouchPointContainer @SINCE_1_0.0 +using TouchPointContainer = std::vector; ///< Container of touch points. @SINCE_1_0.0 +using TouchPointContainerIterator = TouchPointContainer::iterator; ///< Iterator for Dali::TouchPointContainer @SINCE_1_0.0 +using TouchPointContainerConstIterator = TouchPointContainer::const_iterator; ///< Const iterator for Dali::TouchPointContainer @SINCE_1_0.0 /** * @} diff --git a/dali/devel-api/object/csharp-type-info.h b/dali/devel-api/object/csharp-type-info.h index ecffb2a..3d147f7 100644 --- a/dali/devel-api/object/csharp-type-info.h +++ b/dali/devel-api/object/csharp-type-info.h @@ -34,9 +34,9 @@ namespace CSharpTypeInfo * @param[in] typeName The type name of the object to be created. * @return Pointer to a BaseHandle */ - typedef BaseHandle* (*CreateFunction)(const char* const typeName); +using CreateFunction = BaseHandle *(*)( const char *const ); - /** +/** * @brief Callback to set an event-thread only property. * * @param[in] object The object whose property should be set. @@ -44,10 +44,9 @@ namespace CSharpTypeInfo * @param[in] value The new value of the property for the object specified. * @see PropertyRegistration. */ - typedef void (*SetPropertyFunction)( BaseObject* object, const char* const propertyName , Property::Value* value ); - +using SetPropertyFunction = void ( * )( BaseObject *, const char *const, Property::Value * ); - /** +/** * @brief Callback to get the value of an event-thread only property. * * @param[in] object The object whose property value is required. @@ -55,7 +54,7 @@ namespace CSharpTypeInfo * @return The current value of the property for the object specified. * @see PropertyRegistration. */ - typedef Property::Value* (*GetPropertyFunction)( BaseObject* object, const char* const propertyName ); +using GetPropertyFunction = Property::Value *(*)( BaseObject *, const char *const ); } diff --git a/dali/integration-api/bitmap.h b/dali/integration-api/bitmap.h index b3c2f98..80083b1 100644 --- a/dali/integration-api/bitmap.h +++ b/dali/integration-api/bitmap.h @@ -42,8 +42,8 @@ namespace Integration DALI_CORE_API void ConvertToGlFormat(Pixel::Format pixelformat, unsigned& pixelDataType, unsigned& internalFormat); class Bitmap; -typedef IntrusivePtr BitmapPtr; -typedef uint8_t PixelBuffer; ///< Pixel data buffers are composed of these +using BitmapPtr = IntrusivePtr; +using PixelBuffer = uint8_t; ///< Pixel data buffers are composed of these /** * Bitmap class. diff --git a/dali/integration-api/debug.h b/dali/integration-api/debug.h old mode 100755 new mode 100644 index 06f4da2..e95bebf --- a/dali/integration-api/debug.h +++ b/dali/integration-api/debug.h @@ -49,9 +49,9 @@ class Quaternion; // Less opaque types for debugger typedef std::vector DebugPropertyValueArray; -typedef std::pair< Property::Index, Property::Value > DebugIndexValuePair; -typedef std::vector DebugStringValueContainer; -typedef std::vector< DebugIndexValuePair > DebugIndexValueContainer; +using DebugIndexValuePair = std::pair; +using DebugStringValueContainer = std::vector; +using DebugIndexValueContainer = std::vector; struct DebugPropertyValueMap { @@ -87,7 +87,7 @@ DALI_CORE_API void LogMessage(enum DebugPriority level,const char *format, ...); /** * typedef for the logging function. */ -typedef void (*LogFunction)(DebugPriority priority, std::string& message); +using LogFunction = void ( * )( DebugPriority, std::string & ); /** * A log function has to be installed for every thread that wants to use logging. @@ -183,8 +183,8 @@ enum LogLevel class DALI_CORE_API Filter { public: - typedef std::list FilterList; - typedef std::list::iterator FilterIter; + using FilterList = std::list; + using FilterIter = std::list::iterator; public: diff --git a/dali/integration-api/events/multi-point-event-integ.h b/dali/integration-api/events/multi-point-event-integ.h index a3331d2..14007a8 100644 --- a/dali/integration-api/events/multi-point-event-integ.h +++ b/dali/integration-api/events/multi-point-event-integ.h @@ -28,10 +28,9 @@ namespace Dali namespace Integration { - -typedef std::vector< Point > PointContainer; ///< Container of points -typedef PointContainer::iterator PointContainerIterator; ///< Iterator for Dali::Integration::PointContainer -typedef PointContainer::const_iterator PointContainerConstIterator; ///< Const iterator for Dali::Integration::PointContainer +using PointContainer = std::vector; ///< Container of points +using PointContainerIterator = PointContainer::iterator; ///< Iterator for Dali::Integration::PointContainer +using PointContainerConstIterator = PointContainer::const_iterator; ///< Const iterator for Dali::Integration::PointContainer /** * An instance of this structure should be used by the adaptor to send a multi-point event to Dali core. diff --git a/dali/integration-api/gl-abstraction.h b/dali/integration-api/gl-abstraction.h index 121efc2..bffcd67 100644 --- a/dali/integration-api/gl-abstraction.h +++ b/dali/integration-api/gl-abstraction.h @@ -60,30 +60,30 @@ namespace Dali /* OpenGL ES 2.0 */ -typedef void GLvoid; -typedef char GLchar; -typedef unsigned int GLenum; -typedef unsigned char GLboolean; -typedef unsigned int GLbitfield; -typedef int8_t GLbyte; -typedef short GLshort; -typedef int GLint; -typedef int GLsizei; -typedef uint8_t GLubyte; -typedef unsigned short GLushort; -typedef unsigned int GLuint; -typedef float GLfloat; -typedef float GLclampf; -typedef int GLfixed; -typedef signed long int GLintptr; -typedef signed long int GLsizeiptr; +using GLvoid = void; +using GLchar = char; +using GLenum = unsigned int; +using GLboolean = unsigned char; +using GLbitfield = unsigned int; +using GLbyte = int8_t; +using GLshort = short; +using GLint = int; +using GLsizei = int; +using GLubyte = uint8_t; +using GLushort = unsigned short; +using GLuint = unsigned int; +using GLfloat = float; +using GLclampf = float; +using GLfixed = int; +using GLintptr = long; +using GLsizeiptr = long; /* OpenGL ES 3.0 */ -typedef unsigned short GLhalf; -typedef int64_t GLint64; -typedef uint64_t GLuint64; -typedef __GLsync* GLsync; +using GLhalf = unsigned short; +using GLint64 = int64_t; +using GLuint64 = uint64_t; +using GLsync = __GLsync*; namespace Integration { diff --git a/dali/integration-api/platform-abstraction.h b/dali/integration-api/platform-abstraction.h index b9187c8..ab3341e 100644 --- a/dali/integration-api/platform-abstraction.h +++ b/dali/integration-api/platform-abstraction.h @@ -31,8 +31,8 @@ namespace Dali namespace Integration { -typedef uint32_t ResourceId; -typedef IntrusivePtr ResourcePointer; +using ResourceId = uint32_t; +using ResourcePointer = IntrusivePtr; /** * PlatformAbstraction is an abstract interface, used by Dali to access platform specific services. diff --git a/dali/integration-api/resource-types.h b/dali/integration-api/resource-types.h index 0532451..29e47bd 100644 --- a/dali/integration-api/resource-types.h +++ b/dali/integration-api/resource-types.h @@ -27,8 +27,7 @@ namespace Dali { - -typedef Uint16Pair ImageDimensions; +using ImageDimensions = Uint16Pair; namespace Integration { diff --git a/dali/integration-api/scene.h b/dali/integration-api/scene.h old mode 100755 new mode 100644 index cced7dd..6225563 --- a/dali/integration-api/scene.h +++ b/dali/integration-api/scene.h @@ -56,11 +56,11 @@ struct Event; class DALI_CORE_API Scene : public BaseHandle { public: - typedef Signal< void () > EventProcessingFinishedSignalType; ///< Event Processing finished signal type - typedef Signal< void (const Dali::KeyEvent&) > KeyEventSignalType; ///< Key event signal type - typedef Signal< bool (const Dali::KeyEvent&) > KeyEventGeneratedSignalType; ///< key event generated signal type - typedef Signal< void (const Dali::TouchEvent&) > TouchEventSignalType; ///< Touch signal type - typedef Signal< void (const Dali::WheelEvent&) > WheelEventSignalType; ///< WheelEvent signal type + using EventProcessingFinishedSignalType = Signal; ///< Event Processing finished signal type + using KeyEventSignalType = Signal; ///< Key event signal type + using KeyEventGeneratedSignalType = Signal; ///< key event generated signal type + using TouchEventSignalType = Signal; ///< Touch signal type + using WheelEventSignalType = Signal; ///< WheelEvent signal type using FrameCallbackContainer = std::vector< std::pair< std::unique_ptr< CallbackBase >, int32_t > >; diff --git a/dali/integration-api/trace.h b/dali/integration-api/trace.h index fe9a3bd..d9faf9f 100644 --- a/dali/integration-api/trace.h +++ b/dali/integration-api/trace.h @@ -43,7 +43,7 @@ DALI_CORE_API void LogContext( bool start, const char* tag ); /** * typedef for the LogContextFunction function. */ -typedef void ( *LogContextFunction )( bool start, const char* tag ); +using LogContextFunction = void ( * )( bool, const char* ); /** * A LogContextFunction function has to be installed for every thread that wants to use tracing. diff --git a/dali/internal/common/buffer-index.h b/dali/internal/common/buffer-index.h index 4901d44..6c43b83 100644 --- a/dali/internal/common/buffer-index.h +++ b/dali/internal/common/buffer-index.h @@ -26,8 +26,7 @@ namespace Dali namespace Internal { - -typedef uint32_t BufferIndex; +using BufferIndex = uint32_t; } // namespace Internal diff --git a/dali/internal/common/fixed-size-memory-pool.h b/dali/internal/common/fixed-size-memory-pool.h index 30d70c1..dcd7265 100644 --- a/dali/internal/common/fixed-size-memory-pool.h +++ b/dali/internal/common/fixed-size-memory-pool.h @@ -52,8 +52,7 @@ struct TypeSizeWithAlignment class FixedSizeMemoryPool { public: - - typedef uint32_t SizeType; + using SizeType = uint32_t; public: diff --git a/dali/internal/common/image-attributes.h b/dali/internal/common/image-attributes.h index 34e05a9..757ba75 100644 --- a/dali/internal/common/image-attributes.h +++ b/dali/internal/common/image-attributes.h @@ -91,7 +91,7 @@ public: * ScalingMode, but all other filter modes do if the desired dimensions are * `<=` the raw dimensions of the image file. */ - typedef Dali::SamplingMode::Type FilterMode; + using FilterMode = Dali::SamplingMode::Type; static const ImageAttributes DEFAULT_ATTRIBUTES; ///< Default attributes have no size diff --git a/dali/internal/common/message-buffer.h b/dali/internal/common/message-buffer.h index 4285f5b..fc14928 100644 --- a/dali/internal/common/message-buffer.h +++ b/dali/internal/common/message-buffer.h @@ -34,7 +34,7 @@ namespace Internal class MessageBuffer { public: - typedef std::ptrdiff_t WordType; + using WordType = std::ptrdiff_t; /** * Create a new MessageBuffer diff --git a/dali/internal/common/message.h b/dali/internal/common/message.h index c6a294c..48dac3f 100644 --- a/dali/internal/common/message.h +++ b/dali/internal/common/message.h @@ -70,8 +70,7 @@ template< typename T > class Message : public MessageBase { public: - - typedef void(T::*MemberFunction)(); + using MemberFunction = void ( T::* )(); /** * Create a message. @@ -120,8 +119,7 @@ template< typename T, typename P > class MessageValue1 : public MessageBase { public: - - typedef void(T::*MemberFunction)( typename ParameterType< P >::PassingType ); + using MemberFunction = void ( T::* )( typename ParameterType

::PassingType ); /** * Create a message. @@ -176,10 +174,7 @@ template< typename T, typename P1, typename P2 > class MessageValue2 : public MessageBase { public: - - typedef void(T::*MemberFunction)( - typename ParameterType< P1 >::PassingType, - typename ParameterType< P2 >::PassingType ); + using MemberFunction = void ( T::* )( typename ParameterType::PassingType, typename ParameterType::PassingType ); /** * Create a message. @@ -237,11 +232,7 @@ template< typename T, typename P1, typename P2, typename P3 > class MessageValue3 : public MessageBase { public: - - typedef void(T::*MemberFunction)( - typename ParameterType< P1 >::PassingType, - typename ParameterType< P2 >::PassingType, - typename ParameterType< P3 >::PassingType ); + using MemberFunction = void ( T::* )( typename ParameterType::PassingType, typename ParameterType::PassingType, typename ParameterType::PassingType ); /** * Create a message. @@ -303,12 +294,7 @@ template< typename T, typename P1, typename P2, typename P3, typename P4 > class MessageValue4 : public MessageBase { public: - - typedef void(T::*MemberFunction)( - typename ParameterType< P1 >::PassingType, - typename ParameterType< P2 >::PassingType, - typename ParameterType< P3 >::PassingType, - typename ParameterType< P4 >::PassingType ); + using MemberFunction = void ( T::* )( typename ParameterType::PassingType, typename ParameterType::PassingType, typename ParameterType::PassingType, typename ParameterType::PassingType ); /** * Create a message. @@ -374,13 +360,7 @@ template< typename T, typename P1, typename P2, typename P3, typename P4, typena class MessageValue5 : public MessageBase { public: - - typedef void(T::*MemberFunction)( - typename ParameterType< P1 >::PassingType, - typename ParameterType< P2 >::PassingType, - typename ParameterType< P3 >::PassingType, - typename ParameterType< P4 >::PassingType, - typename ParameterType< P5 >::PassingType ); + using MemberFunction = void ( T::* )( typename ParameterType::PassingType, typename ParameterType::PassingType, typename ParameterType::PassingType, typename ParameterType::PassingType, typename ParameterType::PassingType ); /** * Create a message. @@ -450,14 +430,7 @@ template< typename T, typename P1, typename P2, typename P3, typename P4, typena class MessageValue6 : public MessageBase { public: - - typedef void(T::*MemberFunction)( - typename ParameterType< P1 >::PassingType, - typename ParameterType< P2 >::PassingType, - typename ParameterType< P3 >::PassingType, - typename ParameterType< P4 >::PassingType, - typename ParameterType< P5 >::PassingType, - typename ParameterType< P6 >::PassingType ); + using MemberFunction = void ( T::* )( typename ParameterType::PassingType, typename ParameterType::PassingType, typename ParameterType::PassingType, typename ParameterType::PassingType, typename ParameterType::PassingType, typename ParameterType::PassingType ); /** * Create a message. @@ -529,8 +502,7 @@ template< typename T > class MessageDoubleBuffered0 : public MessageBase { public: - - typedef void(T::*MemberFunction)( BufferIndex ); + using MemberFunction = void ( T::* )( BufferIndex ); /** * Create a message. @@ -580,10 +552,7 @@ template< typename T, typename P > class MessageDoubleBuffered1 : public MessageBase { public: - - typedef void(T::*MemberFunction)( - BufferIndex, - typename ParameterType< P >::PassingType ); + using MemberFunction = void ( T::* )( BufferIndex, typename ParameterType

::PassingType ); /** * Create a message. @@ -637,11 +606,7 @@ template< typename T, typename P2, typename P3 > class MessageDoubleBuffered2 : public MessageBase { public: - - typedef void(T::*MemberFunction)( - BufferIndex, - typename ParameterType< P2 >::PassingType, - typename ParameterType< P3 >::PassingType ); + using MemberFunction = void ( T::* )( BufferIndex, typename ParameterType::PassingType, typename ParameterType::PassingType ); /** * Create a message. @@ -700,12 +665,7 @@ template< typename T, typename P2, typename P3, typename P4 > class MessageDoubleBuffered3 : public MessageBase { public: - - typedef void(T::*MemberFunction)( - BufferIndex, - typename ParameterType< P2 >::PassingType, - typename ParameterType< P3 >::PassingType, - typename ParameterType< P4 >::PassingType ); + using MemberFunction = void ( T::* )( BufferIndex, typename ParameterType::PassingType, typename ParameterType::PassingType, typename ParameterType::PassingType ); /** * Create a message. @@ -767,13 +727,7 @@ template< typename T, typename P2, typename P3, typename P4, typename P5 > class MessageDoubleBuffered4 : public MessageBase { public: - - typedef void(T::*MemberFunction)( - BufferIndex, - typename ParameterType< P2 >::PassingType, - typename ParameterType< P3 >::PassingType, - typename ParameterType< P4 >::PassingType, - typename ParameterType< P5 >::PassingType ); + using MemberFunction = void ( T::* )( BufferIndex, typename ParameterType::PassingType, typename ParameterType::PassingType, typename ParameterType::PassingType, typename ParameterType::PassingType ); /** * Create a message. diff --git a/dali/internal/common/owner-pointer.h b/dali/internal/common/owner-pointer.h index 3d4c3e7..638911e 100644 --- a/dali/internal/common/owner-pointer.h +++ b/dali/internal/common/owner-pointer.h @@ -223,7 +223,7 @@ public: /** * Pointer-to-member type. Objects can be implicitly converted to this for validity checks. */ - typedef void (OwnerPointer::*BooleanType)() const; + using BooleanType = void ( OwnerPointer::* )() const; /** * Converts an object handle to a BooleanType. diff --git a/dali/internal/common/shader-data.h b/dali/internal/common/shader-data.h index 5002b3e..b555f5f 100644 --- a/dali/internal/common/shader-data.h +++ b/dali/internal/common/shader-data.h @@ -33,7 +33,7 @@ namespace Internal { class ShaderData; -typedef IntrusivePtr ShaderDataPtr; +using ShaderDataPtr = IntrusivePtr; /** * ShaderData class. diff --git a/dali/internal/common/shader-saver.h b/dali/internal/common/shader-saver.h index b1333b1..e53185c 100644 --- a/dali/internal/common/shader-saver.h +++ b/dali/internal/common/shader-saver.h @@ -30,7 +30,7 @@ namespace Dali namespace Internal { class ShaderData; -typedef IntrusivePtr ShaderDataPtr; +using ShaderDataPtr = IntrusivePtr; /** * Abstract interface for passing a ShaderData object towards being saved. diff --git a/dali/internal/common/type-abstraction.h b/dali/internal/common/type-abstraction.h index 874e2d8..f2f9156 100644 --- a/dali/internal/common/type-abstraction.h +++ b/dali/internal/common/type-abstraction.h @@ -40,8 +40,8 @@ namespace Internal template struct BasicType { - typedef Type HolderType; - typedef Type PassingType; + using HolderType = Type; + using PassingType = Type; }; // For complex types that are copied into the message, @@ -49,8 +49,8 @@ struct BasicType template struct ComplexType { - typedef Type HolderType; - typedef const Type& PassingType; + using HolderType = Type; + using PassingType = const Type&; }; // For complex types that are owned by the message, @@ -58,8 +58,8 @@ struct ComplexType template struct OwnedType { - typedef OwnerPointer HolderType; - typedef OwnerPointer& PassingType; + using HolderType = OwnerPointer; + using PassingType = OwnerPointer&; }; diff --git a/dali/internal/event/actors/actor-declarations.h b/dali/internal/event/actors/actor-declarations.h index 0a54b53..72dfdac 100644 --- a/dali/internal/event/actors/actor-declarations.h +++ b/dali/internal/event/actors/actor-declarations.h @@ -32,10 +32,10 @@ class CameraActor; class CustomActor; class Layer; -typedef IntrusivePtr ActorPtr; -typedef IntrusivePtr CameraActorPtr; -typedef IntrusivePtr CustomActorPtr; -typedef IntrusivePtr LayerPtr; +using ActorPtr = IntrusivePtr; +using CameraActorPtr = IntrusivePtr; +using CustomActorPtr = IntrusivePtr; +using LayerPtr = IntrusivePtr; } // namespace Internal diff --git a/dali/internal/event/actors/actor-impl.h b/dali/internal/event/actors/actor-impl.h index 7b83acf..169c329 100644 --- a/dali/internal/event/actors/actor-impl.h +++ b/dali/internal/event/actors/actor-impl.h @@ -56,15 +56,15 @@ class RenderTask; class Renderer; class Scene; -typedef std::vector< ActorPtr > ActorContainer; -typedef ActorContainer::iterator ActorIter; -typedef ActorContainer::const_iterator ActorConstIter; +using ActorContainer = std::vector; +using ActorIter = ActorContainer::iterator; +using ActorConstIter = ActorContainer::const_iterator; -typedef std::vector< RendererPtr > RendererContainer; -typedef RendererContainer::iterator RendererIter; +using RendererContainer = std::vector; +using RendererIter = RendererContainer::iterator; class ActorDepthTreeNode; -typedef Dali::Internal::MemoryPoolObjectAllocator< ActorDepthTreeNode > DepthNodeMemoryPool; +using DepthNodeMemoryPool = Dali::Internal::MemoryPoolObjectAllocator; /** * Actor is the primary object which Dali applications interact with. @@ -112,7 +112,7 @@ public: Dimension::Type dimension; ///< The dimension to hold }; - typedef std::vector< ActorDimensionPair > ActorDimensionStack; + using ActorDimensionStack = std::vector; public: diff --git a/dali/internal/event/actors/layer-impl.h b/dali/internal/event/actors/layer-impl.h index a8ed2a0..864867e 100644 --- a/dali/internal/event/actors/layer-impl.h +++ b/dali/internal/event/actors/layer-impl.h @@ -37,7 +37,7 @@ class UpdateManager; class Layer; } -typedef Dali::ClippingBox ClippingBox; +using ClippingBox = Dali::ClippingBox; class Layer : public Actor { diff --git a/dali/internal/event/actors/layer-list.cpp b/dali/internal/event/actors/layer-list.cpp index e121f95..8364a33 100644 --- a/dali/internal/event/actors/layer-list.cpp +++ b/dali/internal/event/actors/layer-list.cpp @@ -36,8 +36,8 @@ namespace // unnamed namespace { typedef std::vector LayerContainer; -typedef LayerContainer::iterator LayerIter; -typedef LayerContainer::reverse_iterator ReverseLayerIter; +using LayerIter = LayerContainer::iterator; +using ReverseLayerIter = LayerContainer::reverse_iterator; /** * A private helper template to return an iterator to the layer passed in. diff --git a/dali/internal/event/actors/layer-list.h b/dali/internal/event/actors/layer-list.h index acdf46a..3972593 100644 --- a/dali/internal/event/actors/layer-list.h +++ b/dali/internal/event/actors/layer-list.h @@ -160,7 +160,7 @@ private: Layer* mRoot; ///< The root layer that this ordered list of layers belong to - typedef std::vector LayerContainer; + using LayerContainer = std::vector; // Layers are not owned by the LayerList. // Each layer is responsible for registering & unregistering before the end of its life-time. diff --git a/dali/internal/event/animation/animation-impl.h b/dali/internal/event/animation/animation-impl.h index 454b066..959ed22 100644 --- a/dali/internal/event/animation/animation-impl.h +++ b/dali/internal/event/animation/animation-impl.h @@ -47,11 +47,11 @@ class AnimatorConnectorBase; class Object; class Path; -typedef IntrusivePtr AnimationPtr; -typedef std::vector AnimationContainer; +using AnimationPtr = IntrusivePtr; +using AnimationContainer = std::vector; -typedef AnimationContainer::iterator AnimationIter; -typedef AnimationContainer::const_iterator AnimationConstIter; +using AnimationIter = AnimationContainer::iterator; +using AnimationConstIter = AnimationContainer::const_iterator; /** * Animation is a proxy for a SceneGraph::Animation object. @@ -69,8 +69,8 @@ public: BETWEEN ///< Animating BETWEEN key-frames }; - typedef Dali::Animation::EndAction EndAction; - typedef Dali::Animation::Interpolation Interpolation; + using EndAction = Dali::Animation::EndAction; + using Interpolation = Dali::Animation::Interpolation; /** * Create a new Animation object. @@ -529,10 +529,10 @@ private: Dali::Animation::AnimationSignalType mProgressReachedSignal; - typedef OwnerContainer< AnimatorConnectorBase* > AnimatorConnectorContainer; + using AnimatorConnectorContainer = OwnerContainer; AnimatorConnectorContainer mConnectors; ///< Owned by the Animation - typedef std::vector< ConnectorTargetValues > ConnectorTargetValuesContainer; + using ConnectorTargetValuesContainer = std::vector; ConnectorTargetValuesContainer mConnectorTargetValues; //< Used to store animating property target value information Vector2 mPlayRange; diff --git a/dali/internal/event/animation/animation-playlist-declarations.h b/dali/internal/event/animation/animation-playlist-declarations.h index fac0f96..4b5d7d1 100644 --- a/dali/internal/event/animation/animation-playlist-declarations.h +++ b/dali/internal/event/animation/animation-playlist-declarations.h @@ -29,7 +29,7 @@ namespace Internal class AnimationPlaylist; -typedef OwnerPointer AnimationPlaylistOwner; +using AnimationPlaylistOwner = OwnerPointer; } // namespace Internal diff --git a/dali/internal/event/animation/constrainer.h b/dali/internal/event/animation/constrainer.h index 2d4e7c9..aecc486 100644 --- a/dali/internal/event/animation/constrainer.h +++ b/dali/internal/event/animation/constrainer.h @@ -29,7 +29,7 @@ namespace Internal { typedef Dali::Vector ObjectContainer; -typedef ObjectContainer::Iterator ObjectIter; +using ObjectIter = ObjectContainer::Iterator; /** * An abstract base class for constrainers. diff --git a/dali/internal/event/animation/constraint-base.h b/dali/internal/event/animation/constraint-base.h index b1b43c2..1af8443 100644 --- a/dali/internal/event/animation/constraint-base.h +++ b/dali/internal/event/animation/constraint-base.h @@ -34,8 +34,8 @@ namespace Internal class EventThreadServices; class Object; -typedef Dali::Vector ObjectContainer; -typedef ObjectContainer::Iterator ObjectIter; +using ObjectContainer = Dali::Vector; +using ObjectIter = ObjectContainer::Iterator; namespace SceneGraph { @@ -51,8 +51,7 @@ class AnimatableProperty; class ConstraintBase : public BaseObject, public Object::Observer { public: - - typedef Dali::Constraint::RemoveAction RemoveAction; + using RemoveAction = Dali::Constraint::RemoveAction; /** * Constructor. diff --git a/dali/internal/event/animation/constraint-source-impl.h b/dali/internal/event/animation/constraint-source-impl.h index 5b6f160..2747102 100644 --- a/dali/internal/event/animation/constraint-source-impl.h +++ b/dali/internal/event/animation/constraint-source-impl.h @@ -30,8 +30,8 @@ namespace Internal { struct Source; -typedef std::vector SourceContainer; -typedef SourceContainer::iterator SourceIter; +using SourceContainer = std::vector; +using SourceIter = SourceContainer::iterator; /** * The source of an input property for a constraint. diff --git a/dali/internal/event/animation/key-frame-channel.h b/dali/internal/event/animation/key-frame-channel.h index 378f6a4..3116903 100644 --- a/dali/internal/event/animation/key-frame-channel.h +++ b/dali/internal/event/animation/key-frame-channel.h @@ -61,7 +61,7 @@ template class KeyFrameChannel : public KeyFrameChannelBase { public: - typedef std::vector > ProgressValues; + using ProgressValues = std::vector >; KeyFrameChannel(KeyFrameChannelId channel_id, ProgressValues& values ) : KeyFrameChannelBase(channel_id), @@ -191,13 +191,12 @@ V KeyFrameChannel::GetValue (float progress, Dali::Animation::Interpolation i return interpolatedV; } -typedef KeyFrameChannel KeyFrameChannelNumber; -typedef KeyFrameChannel KeyFrameChannelVector2; -typedef KeyFrameChannel KeyFrameChannelVector3; -typedef KeyFrameChannel KeyFrameChannelVector4; -typedef KeyFrameChannel KeyFrameChannelQuaternion; -typedef KeyFrameChannel KeyFrameChannelAngleAxis; - +using KeyFrameChannelNumber = KeyFrameChannel; +using KeyFrameChannelVector2 = KeyFrameChannel; +using KeyFrameChannelVector3 = KeyFrameChannel; +using KeyFrameChannelVector4 = KeyFrameChannel; +using KeyFrameChannelQuaternion = KeyFrameChannel; +using KeyFrameChannelAngleAxis = KeyFrameChannel; } // Internal } // namespace Dali diff --git a/dali/internal/event/animation/key-frames-impl.h b/dali/internal/event/animation/key-frames-impl.h index d0b27cd..5d9a222 100644 --- a/dali/internal/event/animation/key-frames-impl.h +++ b/dali/internal/event/animation/key-frames-impl.h @@ -32,8 +32,7 @@ namespace Internal { class KeyFrameSpec; class KeyFrames; -typedef IntrusivePtr KeyFramesPtr; - +using KeyFramesPtr = IntrusivePtr; /** * KeyFrames class is responsible for creating and building a specialized KeyFrame class @@ -146,8 +145,8 @@ template class KeyFrameBaseSpec : public KeyFrameSpec { private: - typedef ProgressValue PV; - typedef std::vector PVContainer; + using PV = ProgressValue; + using PVContainer = std::vector; PVContainer mPVs; // The ProgressValue pairs KeyFrameChannel* mKeyFrames; // The key frame interpolator @@ -268,22 +267,21 @@ public: } }; -typedef KeyFrameBaseSpec KeyFrameNumber; -typedef KeyFrameBaseSpec KeyFrameBoolean; -typedef KeyFrameBaseSpec KeyFrameInteger; -typedef KeyFrameBaseSpec KeyFrameVector2; -typedef KeyFrameBaseSpec KeyFrameVector3; -typedef KeyFrameBaseSpec KeyFrameVector4; -typedef KeyFrameBaseSpec KeyFrameQuaternion; - -typedef IntrusivePtr KeyFrameBooleanPtr; -typedef IntrusivePtr KeyFrameNumberPtr; -typedef IntrusivePtr KeyFrameIntegerPtr; -typedef IntrusivePtr KeyFrameVector2Ptr; -typedef IntrusivePtr KeyFrameVector3Ptr; -typedef IntrusivePtr KeyFrameVector4Ptr; -typedef IntrusivePtr KeyFrameQuaternionPtr; - +using KeyFrameNumber = KeyFrameBaseSpec; +using KeyFrameBoolean = KeyFrameBaseSpec; +using KeyFrameInteger = KeyFrameBaseSpec; +using KeyFrameVector2 = KeyFrameBaseSpec; +using KeyFrameVector3 = KeyFrameBaseSpec; +using KeyFrameVector4 = KeyFrameBaseSpec; +using KeyFrameQuaternion = KeyFrameBaseSpec; + +using KeyFrameBooleanPtr = IntrusivePtr; +using KeyFrameNumberPtr = IntrusivePtr; +using KeyFrameIntegerPtr = IntrusivePtr; +using KeyFrameVector2Ptr = IntrusivePtr; +using KeyFrameVector3Ptr = IntrusivePtr; +using KeyFrameVector4Ptr = IntrusivePtr; +using KeyFrameQuaternionPtr = IntrusivePtr; inline void GetSpecialization(Internal::KeyFrames& keyFrames, Internal::KeyFrameBoolean*& keyFrameSpec) { diff --git a/dali/internal/event/animation/path-impl.h b/dali/internal/event/animation/path-impl.h index 8b65e29..fe3f3d3 100644 --- a/dali/internal/event/animation/path-impl.h +++ b/dali/internal/event/animation/path-impl.h @@ -30,7 +30,7 @@ namespace Dali namespace Internal { -typedef IntrusivePtr PathPtr; +using PathPtr = IntrusivePtr; /** * A 3D path diff --git a/dali/internal/event/animation/property-constraint-ptr.h b/dali/internal/event/animation/property-constraint-ptr.h index fa88173..c3f58f3 100644 --- a/dali/internal/event/animation/property-constraint-ptr.h +++ b/dali/internal/event/animation/property-constraint-ptr.h @@ -31,7 +31,7 @@ namespace Internal template struct PropertyConstraintPtr { - typedef OwnerPointer< PropertyConstraint

> Type; + using Type = OwnerPointer >; }; } // namespace Internal diff --git a/dali/internal/event/common/notification-manager.cpp b/dali/internal/event/common/notification-manager.cpp index 71011ee..9dc08ba 100644 --- a/dali/internal/event/common/notification-manager.cpp +++ b/dali/internal/event/common/notification-manager.cpp @@ -67,8 +67,8 @@ void MoveElements( InterfaceContainer& from, InterfaceContainer& to ) } } -typedef Dali::Mutex MessageQueueMutex; -typedef OwnerContainer< MessageBase* > MessageContainer; +using MessageQueueMutex = Dali::Mutex; +using MessageContainer = OwnerContainer; struct NotificationManager::Impl { diff --git a/dali/internal/event/common/object-connector.h b/dali/internal/event/common/object-connector.h index a808db5..22319b8 100644 --- a/dali/internal/event/common/object-connector.h +++ b/dali/internal/event/common/object-connector.h @@ -36,7 +36,7 @@ template class ObjectConnector { public: - typedef IntrusivePtr ObjectPtr; + using ObjectPtr = IntrusivePtr; /** * @brief Default constructor. diff --git a/dali/internal/event/common/object-registry-impl.h b/dali/internal/event/common/object-registry-impl.h index ff52b90..c2a0022 100644 --- a/dali/internal/event/common/object-registry-impl.h +++ b/dali/internal/event/common/object-registry-impl.h @@ -38,7 +38,7 @@ class UpdateManager; class ObjectRegistry; -typedef IntrusivePtr ObjectRegistryPtr; +using ObjectRegistryPtr = IntrusivePtr; /** * The ObjectRegistry notifies it's observers when an object is created. diff --git a/dali/internal/event/common/property-notification-impl.h b/dali/internal/event/common/property-notification-impl.h index 79ccb07..1f9e139 100644 --- a/dali/internal/event/common/property-notification-impl.h +++ b/dali/internal/event/common/property-notification-impl.h @@ -43,7 +43,7 @@ class PropertyNotification; class Object; class PropertyNotificationManager; -typedef IntrusivePtr PropertyNotificationPtr; +using PropertyNotificationPtr = IntrusivePtr; /** * PropertyNotification is a proxy for a SceneGraph::PropertyNotification object. @@ -53,14 +53,13 @@ typedef IntrusivePtr PropertyNotificationPtr; class PropertyNotification : public BaseObject { public: - - typedef Dali::PropertyNotification::NotifyMode NotifyMode; - typedef PropertyCondition::Type ConditionType; + using NotifyMode = Dali::PropertyNotification::NotifyMode; + using ConditionType = PropertyCondition::Type; /** * RawArgumentContainer provides fast direct access to arguments for condition evaluation. */ - typedef Dali::Vector RawArgumentContainer; + using RawArgumentContainer = Dali::Vector; /** * Create a new PropertyNotification object. diff --git a/dali/internal/event/common/stage-def.h b/dali/internal/event/common/stage-def.h index 923f2ca..ba0a73d 100644 --- a/dali/internal/event/common/stage-def.h +++ b/dali/internal/event/common/stage-def.h @@ -29,7 +29,7 @@ namespace Internal class Stage; -typedef Stage* StagePtr; +using StagePtr = Stage *; } // Internal diff --git a/dali/internal/event/common/thread-local-storage.h b/dali/internal/event/common/thread-local-storage.h index 0335955..725f6e0 100644 --- a/dali/internal/event/common/thread-local-storage.h +++ b/dali/internal/event/common/thread-local-storage.h @@ -208,9 +208,9 @@ private: // using the address of the type name string as compiler will allocate these once per library // and we don't support un/re-loading of dali libraries while singleton service is alive - typedef std::pair< const char*, BaseHandle> SingletonPair; - typedef std::vector< SingletonPair > SingletonContainer; - typedef SingletonContainer::const_iterator SingletonConstIter; + using SingletonPair = std::pair; + using SingletonContainer = std::vector; + using SingletonConstIter = SingletonContainer::const_iterator; SingletonContainer mSingletonContainer; ///< The container to look up singleton by its type name diff --git a/dali/internal/event/common/type-info-impl.h b/dali/internal/event/common/type-info-impl.h index 0e4e479..02643c4 100644 --- a/dali/internal/event/common/type-info-impl.h +++ b/dali/internal/event/common/type-info-impl.h @@ -384,15 +384,15 @@ private: int32_t componentIndex = Property::INVALID_COMPONENT_INDEX; }; - typedef std::pair ConnectionPair; - typedef std::pair ActionPair; - typedef std::pair RegisteredPropertyPair; - typedef std::pair PropertyDefaultValuePair; - - typedef std::vector< ActionPair > ActionContainer; - typedef std::vector< ConnectionPair > ConnectorContainer; - typedef std::vector< RegisteredPropertyPair > RegisteredPropertyContainer; - typedef std::vector< PropertyDefaultValuePair > PropertyDefaultValueContainer; + using ConnectionPair = std::pair; + using ActionPair = std::pair; + using RegisteredPropertyPair = std::pair; + using PropertyDefaultValuePair = std::pair; + + using ActionContainer = std::vector; + using ConnectorContainer = std::vector; + using RegisteredPropertyContainer = std::vector; + using PropertyDefaultValueContainer = std::vector; /** * Append properties from registeredProperties onto indices. diff --git a/dali/internal/event/effects/shader-factory.h b/dali/internal/event/effects/shader-factory.h index 9bd4011..c09f859 100644 --- a/dali/internal/event/effects/shader-factory.h +++ b/dali/internal/event/effects/shader-factory.h @@ -31,7 +31,7 @@ namespace Internal { class ShaderData; -typedef IntrusivePtr ShaderDataPtr; +using ShaderDataPtr = IntrusivePtr; /** * @brief ShaderFactory loads and saves shader binaries synchronously. diff --git a/dali/internal/event/events/event-processor.cpp b/dali/internal/event/events/event-processor.cpp index fed209a..ff6007b 100644 --- a/dali/internal/event/events/event-processor.cpp +++ b/dali/internal/event/events/event-processor.cpp @@ -98,7 +98,7 @@ void EventProcessor::QueueEvent( const Event& event ) case Event::Hover: { - typedef Integration::HoverEvent DerivedType; + using DerivedType = Integration::HoverEvent; // Reserve some memory inside the message queue uint32_t* slot = mCurrentEventQueue->ReserveMessageSlot( sizeof( DerivedType ) ); @@ -111,7 +111,7 @@ void EventProcessor::QueueEvent( const Event& event ) case Event::Key: { - typedef Integration::KeyEvent DerivedType; + using DerivedType = Integration::KeyEvent; // Reserve some memory inside the message queue uint32_t* slot = mCurrentEventQueue->ReserveMessageSlot( sizeof( DerivedType ) ); @@ -124,7 +124,7 @@ void EventProcessor::QueueEvent( const Event& event ) case Event::Wheel: { - typedef Integration::WheelEvent DerivedType; + using DerivedType = Integration::WheelEvent; // Reserve some memory inside the message queue uint32_t* slot = mCurrentEventQueue->ReserveMessageSlot( sizeof( DerivedType ) ); diff --git a/dali/internal/event/events/gesture-detector-impl.h b/dali/internal/event/events/gesture-detector-impl.h index 66c9a53..3556398 100644 --- a/dali/internal/event/events/gesture-detector-impl.h +++ b/dali/internal/event/events/gesture-detector-impl.h @@ -40,9 +40,9 @@ namespace Internal class GestureDetector; class GestureEventProcessor; -typedef IntrusivePtr GestureDetectorPtr; -typedef std::vector GestureDetectorContainer; -typedef std::vector GestureDetectorActorContainer; +using GestureDetectorPtr = IntrusivePtr; +using GestureDetectorContainer = std::vector; +using GestureDetectorActorContainer = std::vector; /** * This is a type trait that should be used by deriving gesture detectors for their container type. @@ -50,7 +50,7 @@ typedef std::vector GestureDetectorActorContainer; template< typename Detector > struct DerivedGestureDetectorContainer { - typedef std::vector type; + using type = std::vector; }; /** diff --git a/dali/internal/event/events/gesture-impl.h b/dali/internal/event/events/gesture-impl.h index 8e521db..8a57696 100644 --- a/dali/internal/event/events/gesture-impl.h +++ b/dali/internal/event/events/gesture-impl.h @@ -30,7 +30,7 @@ namespace Internal { class Gesture; -typedef IntrusivePtr GesturePtr; +using GesturePtr = IntrusivePtr; /** * This is the abstract base structure for any gestures that the adaptor detects and wishes to send diff --git a/dali/internal/event/events/gesture-recognizer.h b/dali/internal/event/events/gesture-recognizer.h index f76326d..51f4bfc 100644 --- a/dali/internal/event/events/gesture-recognizer.h +++ b/dali/internal/event/events/gesture-recognizer.h @@ -124,7 +124,7 @@ protected: Scene* mScene; }; -typedef IntrusivePtr GestureRecognizerPtr; +using GestureRecognizerPtr = IntrusivePtr; } // namespace Internal diff --git a/dali/internal/event/events/hover-event-impl.h b/dali/internal/event/events/hover-event-impl.h index bf105b3..4d9c8f6 100755 --- a/dali/internal/event/events/hover-event-impl.h +++ b/dali/internal/event/events/hover-event-impl.h @@ -32,7 +32,7 @@ namespace Internal { class HoverEvent; -typedef IntrusivePtr< HoverEvent > HoverEventPtr; +using HoverEventPtr = IntrusivePtr; /** * @copydoc Dali::HoverEvent diff --git a/dali/internal/event/events/long-press-gesture/long-press-gesture-detector-impl.h b/dali/internal/event/events/long-press-gesture/long-press-gesture-detector-impl.h index 3a57574..e297b25 100644 --- a/dali/internal/event/events/long-press-gesture/long-press-gesture-detector-impl.h +++ b/dali/internal/event/events/long-press-gesture/long-press-gesture-detector-impl.h @@ -30,8 +30,8 @@ namespace Internal class LongPressGestureDetector; -typedef IntrusivePtr LongPressGestureDetectorPtr; -typedef DerivedGestureDetectorContainer::type LongPressGestureDetectorContainer; +using LongPressGestureDetectorPtr = IntrusivePtr; +using LongPressGestureDetectorContainer = DerivedGestureDetectorContainer::type; /** * @copydoc Dali::LongPressGestureDetector diff --git a/dali/internal/event/events/long-press-gesture/long-press-gesture-impl.h b/dali/internal/event/events/long-press-gesture/long-press-gesture-impl.h index 651aad2..c8c95ec 100644 --- a/dali/internal/event/events/long-press-gesture/long-press-gesture-impl.h +++ b/dali/internal/event/events/long-press-gesture/long-press-gesture-impl.h @@ -30,7 +30,7 @@ namespace Internal { class LongPressGesture; -typedef IntrusivePtr< LongPressGesture > LongPressGesturePtr; +using LongPressGesturePtr = IntrusivePtr; /** * @copydoc Dali::LongPressGesture diff --git a/dali/internal/event/events/pan-gesture/pan-gesture-detector-impl.h b/dali/internal/event/events/pan-gesture/pan-gesture-detector-impl.h index 39d5d9d..4d42b12 100644 --- a/dali/internal/event/events/pan-gesture/pan-gesture-detector-impl.h +++ b/dali/internal/event/events/pan-gesture/pan-gesture-detector-impl.h @@ -35,8 +35,8 @@ namespace Internal { class PanGestureDetector; -typedef IntrusivePtr PanGestureDetectorPtr; -typedef DerivedGestureDetectorContainer::type PanGestureDetectorContainer; +using PanGestureDetectorPtr = IntrusivePtr; +using PanGestureDetectorContainer = DerivedGestureDetectorContainer::type; namespace SceneGraph { @@ -49,9 +49,8 @@ class PanGesture; class PanGestureDetector : public GestureDetector { public: // Typedefs - - typedef Dali::PanGestureDetector::AngleThresholdPair AngleThresholdPair; - typedef std::vector AngleContainer; + using AngleThresholdPair = Dali::PanGestureDetector::AngleThresholdPair; + using AngleContainer = std::vector; public: // Creation diff --git a/dali/internal/event/events/pan-gesture/pan-gesture-impl.h b/dali/internal/event/events/pan-gesture/pan-gesture-impl.h index 2f77ecc..eb5b1f6 100644 --- a/dali/internal/event/events/pan-gesture/pan-gesture-impl.h +++ b/dali/internal/event/events/pan-gesture/pan-gesture-impl.h @@ -31,7 +31,7 @@ namespace Internal { class PanGesture; -typedef IntrusivePtr< PanGesture > PanGesturePtr; +using PanGesturePtr = IntrusivePtr; /** * @copydoc Dali::PanGesture diff --git a/dali/internal/event/events/pinch-gesture/pinch-gesture-detector-impl.h b/dali/internal/event/events/pinch-gesture/pinch-gesture-detector-impl.h index 72aab7f..3efc4d7 100644 --- a/dali/internal/event/events/pinch-gesture/pinch-gesture-detector-impl.h +++ b/dali/internal/event/events/pinch-gesture/pinch-gesture-detector-impl.h @@ -31,8 +31,8 @@ namespace Internal class PinchGestureDetector; -typedef IntrusivePtr PinchGestureDetectorPtr; -typedef DerivedGestureDetectorContainer::type PinchGestureDetectorContainer; +using PinchGestureDetectorPtr = IntrusivePtr; +using PinchGestureDetectorContainer = DerivedGestureDetectorContainer::type; /** * @copydoc Dali::PinchGestureDetector diff --git a/dali/internal/event/events/pinch-gesture/pinch-gesture-impl.h b/dali/internal/event/events/pinch-gesture/pinch-gesture-impl.h index 287756e..eaf8f7e 100644 --- a/dali/internal/event/events/pinch-gesture/pinch-gesture-impl.h +++ b/dali/internal/event/events/pinch-gesture/pinch-gesture-impl.h @@ -31,7 +31,7 @@ namespace Internal { class PinchGesture; -typedef IntrusivePtr< PinchGesture > PinchGesturePtr; +using PinchGesturePtr = IntrusivePtr; /** * @copydoc Dali::PinchGesture diff --git a/dali/internal/event/events/rotation-gesture/rotation-gesture-detector-impl.h b/dali/internal/event/events/rotation-gesture/rotation-gesture-detector-impl.h index dca87d8..ef1d708 100644 --- a/dali/internal/event/events/rotation-gesture/rotation-gesture-detector-impl.h +++ b/dali/internal/event/events/rotation-gesture/rotation-gesture-detector-impl.h @@ -31,8 +31,8 @@ namespace Internal class RotationGestureDetector; -typedef IntrusivePtr RotationGestureDetectorPtr; -typedef DerivedGestureDetectorContainer::type RotationGestureDetectorContainer; +using RotationGestureDetectorPtr = IntrusivePtr; +using RotationGestureDetectorContainer = DerivedGestureDetectorContainer::type; /** * @copydoc Dali::RotationGestureDetector diff --git a/dali/internal/event/events/rotation-gesture/rotation-gesture-impl.h b/dali/internal/event/events/rotation-gesture/rotation-gesture-impl.h index 0b3edff..41c5a97 100644 --- a/dali/internal/event/events/rotation-gesture/rotation-gesture-impl.h +++ b/dali/internal/event/events/rotation-gesture/rotation-gesture-impl.h @@ -31,7 +31,7 @@ namespace Internal { class RotationGesture; -typedef IntrusivePtr< RotationGesture > RotationGesturePtr; +using RotationGesturePtr = IntrusivePtr; /** * @copydoc Dali::RotationGesture diff --git a/dali/internal/event/events/tap-gesture/tap-gesture-detector-impl.h b/dali/internal/event/events/tap-gesture/tap-gesture-detector-impl.h index 77fa988..5c8fe85 100644 --- a/dali/internal/event/events/tap-gesture/tap-gesture-detector-impl.h +++ b/dali/internal/event/events/tap-gesture/tap-gesture-detector-impl.h @@ -31,8 +31,8 @@ namespace Internal class TapGestureDetector; -typedef IntrusivePtr TapGestureDetectorPtr; -typedef DerivedGestureDetectorContainer::type TapGestureDetectorContainer; +using TapGestureDetectorPtr = IntrusivePtr; +using TapGestureDetectorContainer = DerivedGestureDetectorContainer::type; /** * @copydoc Dali::TapGestureDetector diff --git a/dali/internal/event/events/tap-gesture/tap-gesture-impl.h b/dali/internal/event/events/tap-gesture/tap-gesture-impl.h index a317ca7..62d5214 100644 --- a/dali/internal/event/events/tap-gesture/tap-gesture-impl.h +++ b/dali/internal/event/events/tap-gesture/tap-gesture-impl.h @@ -31,7 +31,7 @@ namespace Internal { class TapGesture; -typedef IntrusivePtr< TapGesture > TapGesturePtr; +using TapGesturePtr = IntrusivePtr; /** * @copydoc Dali::TapGesture diff --git a/dali/internal/event/events/touch-event-impl.h b/dali/internal/event/events/touch-event-impl.h index 01bdb7c..cb4b688 100644 --- a/dali/internal/event/events/touch-event-impl.h +++ b/dali/internal/event/events/touch-event-impl.h @@ -35,7 +35,7 @@ namespace Internal { class TouchEvent; -typedef IntrusivePtr< TouchEvent > TouchEventPtr; +using TouchEventPtr = IntrusivePtr; /** * @copydoc Dali::TouchEvent diff --git a/dali/internal/event/events/wheel-event-impl.h b/dali/internal/event/events/wheel-event-impl.h index 17fcb35..35f44ea 100755 --- a/dali/internal/event/events/wheel-event-impl.h +++ b/dali/internal/event/events/wheel-event-impl.h @@ -29,7 +29,7 @@ namespace Internal { class WheelEvent; -typedef IntrusivePtr< WheelEvent > WheelEventPtr; +using WheelEventPtr = IntrusivePtr; /** * @copydoc Dali::WheelEvent diff --git a/dali/internal/event/images/bitmap-compressed.h b/dali/internal/event/images/bitmap-compressed.h index 6a42b0f..68d3c52 100644 --- a/dali/internal/event/images/bitmap-compressed.h +++ b/dali/internal/event/images/bitmap-compressed.h @@ -29,7 +29,7 @@ namespace Internal { class BitmapCompressed; -typedef IntrusivePtr BitmapCompressedPtr; +using BitmapCompressedPtr = IntrusivePtr; /** * BitmapCompressed class. diff --git a/dali/internal/event/images/bitmap-packed-pixel.h b/dali/internal/event/images/bitmap-packed-pixel.h index 23f92b8..3eeebdd 100644 --- a/dali/internal/event/images/bitmap-packed-pixel.h +++ b/dali/internal/event/images/bitmap-packed-pixel.h @@ -29,7 +29,7 @@ namespace Internal { class BitmapPackedPixel; -typedef IntrusivePtr BitmapPackedPixelPtr; +using BitmapPackedPixelPtr = IntrusivePtr; /** * BitmapPackedPixel class. diff --git a/dali/internal/event/images/pixel-data-impl.h b/dali/internal/event/images/pixel-data-impl.h index 01d6249..6d8a7c9 100644 --- a/dali/internal/event/images/pixel-data-impl.h +++ b/dali/internal/event/images/pixel-data-impl.h @@ -30,7 +30,7 @@ namespace Internal { class PixelData; -typedef IntrusivePtr PixelDataPtr; +using PixelDataPtr = IntrusivePtr; class PixelData : public BaseObject { diff --git a/dali/internal/event/rendering/frame-buffer-impl.h b/dali/internal/event/rendering/frame-buffer-impl.h index b0579d1..c0f72e2 100644 --- a/dali/internal/event/rendering/frame-buffer-impl.h +++ b/dali/internal/event/rendering/frame-buffer-impl.h @@ -39,7 +39,7 @@ class FrameBuffer; } class FrameBuffer; -typedef IntrusivePtr FrameBufferPtr; +using FrameBufferPtr = IntrusivePtr; class FrameBuffer : public BaseObject { diff --git a/dali/internal/event/rendering/geometry-impl.h b/dali/internal/event/rendering/geometry-impl.h index d1cc60d..0daa354 100644 --- a/dali/internal/event/rendering/geometry-impl.h +++ b/dali/internal/event/rendering/geometry-impl.h @@ -41,7 +41,7 @@ class Geometry; } class Geometry; -typedef IntrusivePtr GeometryPtr; +using GeometryPtr = IntrusivePtr; /** * Geometry is an object that contains an array of structures of values that diff --git a/dali/internal/event/rendering/renderer-impl.h b/dali/internal/event/rendering/renderer-impl.h index 3a36186..a138bc0 100755 --- a/dali/internal/event/rendering/renderer-impl.h +++ b/dali/internal/event/rendering/renderer-impl.h @@ -40,7 +40,7 @@ class Renderer; } class Renderer; -typedef IntrusivePtr RendererPtr; +using RendererPtr = IntrusivePtr; /** * Renderer is an object that can be used to show content by combining a Geometry with a shader and textures. diff --git a/dali/internal/event/rendering/sampler-impl.h b/dali/internal/event/rendering/sampler-impl.h index fc43ebd..93fab94 100644 --- a/dali/internal/event/rendering/sampler-impl.h +++ b/dali/internal/event/rendering/sampler-impl.h @@ -37,7 +37,7 @@ struct Sampler; } class Sampler; -typedef IntrusivePtr SamplerPtr; +using SamplerPtr = IntrusivePtr; /** * Sampler is an object that contains an array of structures of values that diff --git a/dali/internal/event/rendering/shader-impl.h b/dali/internal/event/rendering/shader-impl.h index 1e2f9f5..05e916b 100644 --- a/dali/internal/event/rendering/shader-impl.h +++ b/dali/internal/event/rendering/shader-impl.h @@ -36,7 +36,7 @@ class Shader; } class Shader; -typedef IntrusivePtr ShaderPtr; +using ShaderPtr = IntrusivePtr; /** * Shader is an object that contains an array of structures of values that diff --git a/dali/internal/event/rendering/texture-impl.h b/dali/internal/event/rendering/texture-impl.h index 4464dcb..fb8f1c3 100644 --- a/dali/internal/event/rendering/texture-impl.h +++ b/dali/internal/event/rendering/texture-impl.h @@ -38,7 +38,7 @@ class Texture; } class Texture; -typedef IntrusivePtr TexturePtr; +using TexturePtr = IntrusivePtr; class Texture : public BaseObject { diff --git a/dali/internal/event/rendering/texture-set-impl.h b/dali/internal/event/rendering/texture-set-impl.h index 6c4a8b8..a013a30 100644 --- a/dali/internal/event/rendering/texture-set-impl.h +++ b/dali/internal/event/rendering/texture-set-impl.h @@ -42,7 +42,7 @@ class TextureSet; class TextureSet; -typedef IntrusivePtr TextureSetPtr; +using TextureSetPtr = IntrusivePtr; /** * TextureSet is an object that holds all the textures used by a renderer diff --git a/dali/internal/event/rendering/vertex-buffer-impl.h b/dali/internal/event/rendering/vertex-buffer-impl.h index d6207e0..47de0dc 100644 --- a/dali/internal/event/rendering/vertex-buffer-impl.h +++ b/dali/internal/event/rendering/vertex-buffer-impl.h @@ -32,7 +32,7 @@ namespace Internal { class VertexBuffer; -typedef IntrusivePtr VertexBufferPtr; +using VertexBufferPtr = IntrusivePtr; /** * VertexBuffer is an object that contains an array of structures of values that @@ -101,16 +101,56 @@ template struct PropertyImplementationType { // typedef ... Type; not defined, only support types declared below }; -template<> struct PropertyImplementationType< Property::BOOLEAN > { typedef bool Type; }; -template<> struct PropertyImplementationType< Property::FLOAT > { typedef float Type; }; -template<> struct PropertyImplementationType< Property::INTEGER > { typedef int Type; }; -template<> struct PropertyImplementationType< Property::VECTOR2 > { typedef Vector2 Type; }; -template<> struct PropertyImplementationType< Property::VECTOR3 > { typedef Vector3 Type; }; -template<> struct PropertyImplementationType< Property::VECTOR4 > { typedef Vector4 Type; }; -template<> struct PropertyImplementationType< Property::MATRIX3 > { typedef Matrix3 Type; }; -template<> struct PropertyImplementationType< Property::MATRIX > { typedef Matrix Type; }; -template<> struct PropertyImplementationType< Property::RECTANGLE > { typedef Rect Type; }; -template<> struct PropertyImplementationType< Property::ROTATION > { typedef Quaternion Type; }; +template<> +struct PropertyImplementationType +{ + using Type = bool; +}; +template<> +struct PropertyImplementationType +{ + using Type = float; +}; +template<> +struct PropertyImplementationType +{ + using Type = int; +}; +template<> +struct PropertyImplementationType +{ + using Type = Vector2; +}; +template<> +struct PropertyImplementationType +{ + using Type = Vector3; +}; +template<> +struct PropertyImplementationType +{ + using Type = Vector4; +}; +template<> +struct PropertyImplementationType +{ + using Type = Matrix3; +}; +template<> +struct PropertyImplementationType +{ + using Type = Matrix; +}; +template<> +struct PropertyImplementationType +{ + using Type = Rect; +}; +template<> +struct PropertyImplementationType +{ + using Type = Quaternion; +}; uint32_t GetPropertyImplementationSize( Property::Type& propertyType ); diff --git a/dali/internal/event/size-negotiation/memory-pool-relayout-container.h b/dali/internal/event/size-negotiation/memory-pool-relayout-container.h index 181351f..8cd3104 100644 --- a/dali/internal/event/size-negotiation/memory-pool-relayout-container.h +++ b/dali/internal/event/size-negotiation/memory-pool-relayout-container.h @@ -108,8 +108,7 @@ public: bool Contains( const Dali::Actor& actor ); private: - - typedef Vector< RelayoutInfo* > RelayoutInfoContainer; + using RelayoutInfoContainer = Vector; RelayoutInfoContainer mRelayoutInfos; ///< The list of relayout infos diff --git a/dali/internal/render/common/render-list.h b/dali/internal/render/common/render-list.h index 41af19f..e3c4735 100644 --- a/dali/internal/render/common/render-list.h +++ b/dali/internal/render/common/render-list.h @@ -28,8 +28,7 @@ namespace Dali { - -typedef Rect ClippingBox; +using ClippingBox = Rect; namespace Internal { @@ -44,10 +43,10 @@ namespace SceneGraph class Layer; -typedef OwnerContainer< RenderItem* > RenderItemContainer; +using RenderItemContainer = OwnerContainer; struct RenderList; -typedef OwnerContainer< RenderList* > RenderListContainer; +using RenderListContainer = OwnerContainer; /** * The RenderList structure provides the renderer with a list of renderers. diff --git a/dali/internal/render/data-providers/render-data-provider.h b/dali/internal/render/data-providers/render-data-provider.h old mode 100755 new mode 100644 index 2ca0a45..8f61127 --- a/dali/internal/render/data-providers/render-data-provider.h +++ b/dali/internal/render/data-providers/render-data-provider.h @@ -48,7 +48,7 @@ class Renderer; class RenderDataProvider { public: - typedef std::vector< Render::Sampler* > Samplers; + using Samplers = std::vector; /** * Constructor. diff --git a/dali/internal/render/data-providers/uniform-map-data-provider.h b/dali/internal/render/data-providers/uniform-map-data-provider.h index 7d7e120..158bf3f 100644 --- a/dali/internal/render/data-providers/uniform-map-data-provider.h +++ b/dali/internal/render/data-providers/uniform-map-data-provider.h @@ -28,7 +28,7 @@ namespace SceneGraph class UniformMap; class UniformPropertyMapping; -typedef Dali::Vector< const UniformPropertyMapping* > CollectedUniformMap; +using CollectedUniformMap = Dali::Vector; /** * This class maps uniform names to property value pointers. diff --git a/dali/internal/render/gl-resources/frame-buffer-state-cache.h b/dali/internal/render/gl-resources/frame-buffer-state-cache.h index 9ffec1b..b817821 100644 --- a/dali/internal/render/gl-resources/frame-buffer-state-cache.h +++ b/dali/internal/render/gl-resources/frame-buffer-state-cache.h @@ -120,7 +120,7 @@ private: unsigned int mState; ///< State, bitmask of FrameBufferStatus flags }; - typedef Dali::Vector< FrameBufferState > FrameBufferStateVector; + using FrameBufferStateVector = Dali::Vector; /** * @brief Set the clear state diff --git a/dali/internal/render/renderers/render-geometry.h b/dali/internal/render/renderers/render-geometry.h index c8ac1e5..b193297 100644 --- a/dali/internal/render/renderers/render-geometry.h +++ b/dali/internal/render/renderers/render-geometry.h @@ -47,7 +47,7 @@ class VertexBuffer; class Geometry { public: - typedef Dali::Geometry::Type Type; + using Type = Dali::Geometry::Type; Geometry(); diff --git a/dali/internal/render/renderers/render-renderer.h b/dali/internal/render/renderers/render-renderer.h index 5f4bbfb..089fb4e 100755 --- a/dali/internal/render/renderers/render-renderer.h +++ b/dali/internal/render/renderers/render-renderer.h @@ -459,7 +459,7 @@ private: const PropertyInputImpl* propertyValue; }; - typedef Dali::Vector< UniformIndexMap > UniformIndexMappings; + using UniformIndexMappings = Dali::Vector; UniformIndexMappings mUniformIndexMap; Vector mAttributesLocation; diff --git a/dali/internal/render/renderers/render-sampler.h b/dali/internal/render/renderers/render-sampler.h index c5040ae..c042995 100644 --- a/dali/internal/render/renderers/render-sampler.h +++ b/dali/internal/render/renderers/render-sampler.h @@ -29,9 +29,8 @@ namespace Render struct Sampler { - - typedef Dali::FilterMode::Type FilterMode; - typedef Dali::WrapMode::Type WrapMode; + using FilterMode = Dali::FilterMode::Type; + using WrapMode = Dali::WrapMode::Type; /** * Constructor diff --git a/dali/internal/render/renderers/render-texture.h b/dali/internal/render/renderers/render-texture.h old mode 100755 new mode 100644 index e23d28a..0dbfd4a --- a/dali/internal/render/renderers/render-texture.h +++ b/dali/internal/render/renderers/render-texture.h @@ -41,8 +41,7 @@ struct Sampler; class Texture { public: - - typedef Dali::TextureType::Type Type; + using Type = Dali::TextureType::Type; /** * Constructor diff --git a/dali/internal/render/shaders/program-controller.h b/dali/internal/render/shaders/program-controller.h index 7701e30..e076bc9 100644 --- a/dali/internal/render/shaders/program-controller.h +++ b/dali/internal/render/shaders/program-controller.h @@ -182,8 +182,8 @@ private: // Data Integration::GlAbstraction& mGlAbstraction; Program* mCurrentProgram; - typedef OwnerContainer< ProgramPair* > ProgramContainer; - typedef ProgramContainer::Iterator ProgramIterator; + using ProgramContainer = OwnerContainer; + using ProgramIterator = ProgramContainer::Iterator; ProgramContainer mProgramCache; GLint mProgramBinaryFormat; diff --git a/dali/internal/render/shaders/program.h b/dali/internal/render/shaders/program.h index a03302d..0913989 100644 --- a/dali/internal/render/shaders/program.h +++ b/dali/internal/render/shaders/program.h @@ -373,8 +373,8 @@ private: // Data Internal::ShaderDataPtr mProgramData; ///< Shader program source and binary (when compiled & linked or loaded) // location caches - typedef std::pair< std::string, GLint > NameLocationPair; - typedef std::vector< NameLocationPair > Locations; + using NameLocationPair = std::pair; + using Locations = std::vector; Locations mAttributeLocations; ///< attribute location cache Locations mUniformLocations; ///< uniform location cache diff --git a/dali/internal/update/animation/scene-graph-constraint-base.h b/dali/internal/update/animation/scene-graph-constraint-base.h index 5911fbf..ba36871 100644 --- a/dali/internal/update/animation/scene-graph-constraint-base.h +++ b/dali/internal/update/animation/scene-graph-constraint-base.h @@ -40,9 +40,8 @@ template <> struct ParameterType< Dali::Constraint::RemoveAction > namespace SceneGraph { - -typedef Dali::Vector PropertyOwnerContainer; -typedef PropertyOwnerContainer::Iterator PropertyOwnerIter; +using PropertyOwnerContainer = Dali::Vector; +using PropertyOwnerIter = PropertyOwnerContainer::Iterator; /** * An abstract base class for Constraints. @@ -70,8 +69,7 @@ public: }; public: - - typedef Dali::Constraint::RemoveAction RemoveAction; + using RemoveAction = Dali::Constraint::RemoveAction; /** * Constructor @@ -251,7 +249,7 @@ private: inline void SetRemoveActionMessage( EventThreadServices& eventThreadServices, const ConstraintBase& constraint, Dali::Constraint::RemoveAction removeAction ) { - typedef MessageValue1< ConstraintBase, Dali::Constraint::RemoveAction > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); diff --git a/dali/internal/update/animation/scene-graph-constraint-declarations.h b/dali/internal/update/animation/scene-graph-constraint-declarations.h index 9c6bf41..b25f088 100644 --- a/dali/internal/update/animation/scene-graph-constraint-declarations.h +++ b/dali/internal/update/animation/scene-graph-constraint-declarations.h @@ -33,8 +33,8 @@ namespace SceneGraph class ConstraintBase; -typedef OwnerContainer< ConstraintBase* > ConstraintOwnerContainer; -typedef ConstraintOwnerContainer::Iterator ConstraintIter; +using ConstraintOwnerContainer = OwnerContainer; +using ConstraintIter = ConstraintOwnerContainer::Iterator; } // namespace SceneGraph diff --git a/dali/internal/update/common/animatable-property.h b/dali/internal/update/common/animatable-property.h index 2a82031..8972bc9 100644 --- a/dali/internal/update/common/animatable-property.h +++ b/dali/internal/update/common/animatable-property.h @@ -2134,7 +2134,7 @@ void BakeMessage( EventThreadServices& eventThreadServices, const SceneGraph::AnimatableProperty& property, typename ParameterType< T >::PassingType newValue ) { - typedef MessageDoubleBuffered1< SceneGraph::AnimatableProperty, T > LocalType; + using LocalType = MessageDoubleBuffered1, T>; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -2150,7 +2150,7 @@ void BakeRelativeMessage( EventThreadServices& eventThreadServices, const SceneGraph::AnimatableProperty& property, const T& delta ) { - typedef MessageDoubleBuffered1< SceneGraph::AnimatableProperty, const T& > LocalType; + using LocalType = MessageDoubleBuffered1, const T&>; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -2166,7 +2166,7 @@ void SetXComponentMessage( EventThreadServices& eventThreadServices, const SceneGraph::AnimatableProperty& property, typename ParameterType< float >::PassingType newValue ) { - typedef MessageDoubleBuffered1< SceneGraph::AnimatableProperty, float > LocalType; + using LocalType = MessageDoubleBuffered1, float>; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -2182,7 +2182,7 @@ void SetYComponentMessage( EventThreadServices& eventThreadServices, const SceneGraph::AnimatableProperty& property, typename ParameterType< float >::PassingType newValue ) { - typedef MessageDoubleBuffered1< SceneGraph::AnimatableProperty, float > LocalType; + using LocalType = MessageDoubleBuffered1, float>; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -2198,7 +2198,7 @@ void SetZComponentMessage( EventThreadServices& eventThreadServices, const SceneGraph::AnimatableProperty& property, typename ParameterType< float >::PassingType newValue ) { - typedef MessageDoubleBuffered1< SceneGraph::AnimatableProperty, float > LocalType; + using LocalType = MessageDoubleBuffered1, float>; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -2214,7 +2214,7 @@ void SetWComponentMessage( EventThreadServices& eventThreadServices, const SceneGraph::AnimatableProperty& property, typename ParameterType< float >::PassingType newValue ) { - typedef MessageDoubleBuffered1< SceneGraph::AnimatableProperty, float > LocalType; + using LocalType = MessageDoubleBuffered1, float>; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); diff --git a/dali/internal/update/common/discard-queue.h b/dali/internal/update/common/discard-queue.h index b331bc5..5725225 100644 --- a/dali/internal/update/common/discard-queue.h +++ b/dali/internal/update/common/discard-queue.h @@ -51,11 +51,10 @@ class Scene; class DiscardQueue { public: - - typedef OwnerContainer< Shader* > ShaderQueue; - typedef OwnerContainer< Renderer* > RendererQueue; - typedef OwnerContainer< Camera* > CameraQueue; - typedef OwnerContainer< Scene* > SceneQueue; + using ShaderQueue = OwnerContainer; + using RendererQueue = OwnerContainer; + using CameraQueue = OwnerContainer; + using SceneQueue = OwnerContainer; /** * Create a new DiscardQueue. diff --git a/dali/internal/update/common/property-owner-messages.h b/dali/internal/update/common/property-owner-messages.h index 1e31299..52d96a7 100644 --- a/dali/internal/update/common/property-owner-messages.h +++ b/dali/internal/update/common/property-owner-messages.h @@ -70,8 +70,7 @@ template< typename P > class AnimatablePropertyMessage : public PropertyOwnerMessageBase { public: - - typedef void(AnimatableProperty

::*MemberFunction)( BufferIndex, typename ParameterType< P >::PassingType ); + using MemberFunction = void ( AnimatableProperty

::* )( BufferIndex, typename ParameterType

::PassingType ); /** * Create a message. @@ -149,8 +148,7 @@ template< typename P > class AnimatablePropertyComponentMessage : public PropertyOwnerMessageBase { public: - - typedef void(AnimatableProperty

::*MemberFunction)( BufferIndex, float ); + using MemberFunction = void ( AnimatableProperty

::* )( BufferIndex, float ); /** * Send a message. @@ -225,7 +223,7 @@ private: inline void InstallCustomPropertyMessage( EventThreadServices& eventThreadServices, const PropertyOwner& owner, OwnerPointer& property ) { - typedef MessageValue1< PropertyOwner, OwnerPointer > LocalType; + using LocalType = MessageValue1 >; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -236,7 +234,7 @@ inline void InstallCustomPropertyMessage( EventThreadServices& eventThreadServic inline void ApplyConstraintMessage( EventThreadServices& eventThreadServices, const PropertyOwner& owner, OwnerPointer& constraint ) { - typedef MessageValue1< PropertyOwner, OwnerPointer > LocalType; + using LocalType = MessageValue1 >; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -250,7 +248,7 @@ inline void RemoveConstraintMessage( EventThreadServices& eventThreadServices, c // The update-thread can modify this object. ConstraintBase& constraint = const_cast< ConstraintBase& >( constConstraint ); - typedef MessageValue1< PropertyOwner, ConstraintBase* > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -261,7 +259,7 @@ inline void RemoveConstraintMessage( EventThreadServices& eventThreadServices, c inline void AddUniformMapMessage( EventThreadServices& eventThreadServices, const PropertyOwner& owner, OwnerPointer< UniformPropertyMapping >& map ) { - typedef MessageValue1< PropertyOwner, OwnerPointer< UniformPropertyMapping > > LocalType; + using LocalType = MessageValue1 >; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -271,7 +269,7 @@ inline void AddUniformMapMessage( EventThreadServices& eventThreadServices, cons inline void RemoveUniformMapMessage( EventThreadServices& eventThreadServices, const PropertyOwner& owner, const std::string& uniformName ) { - typedef MessageValue1< PropertyOwner, std::string > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); diff --git a/dali/internal/update/common/property-owner.h b/dali/internal/update/common/property-owner.h index e0e15c5..c4dd922 100644 --- a/dali/internal/update/common/property-owner.h +++ b/dali/internal/update/common/property-owner.h @@ -39,8 +39,8 @@ namespace SceneGraph class PropertyOwner; -typedef OwnerContainer< PropertyBase* > OwnedPropertyContainer; -typedef OwnedPropertyContainer::Iterator OwnedPropertyIter; +using OwnedPropertyContainer = OwnerContainer; +using OwnedPropertyIter = OwnedPropertyContainer::Iterator; /** * An update-thread object which own properties. @@ -246,10 +246,9 @@ protected: bool mUpdated; private: - - typedef Dali::Vector ObserverContainer; - typedef ObserverContainer::Iterator ObserverIter; - typedef ObserverContainer::ConstIterator ConstObserverIter; + using ObserverContainer = Dali::Vector; + using ObserverIter = ObserverContainer::Iterator; + using ConstObserverIter = ObserverContainer::ConstIterator; ObserverContainer mObservers; ///< Container of observer raw-pointers (not owned) diff --git a/dali/internal/update/common/property-resetter.h b/dali/internal/update/common/property-resetter.h index 305fb14..3c60b35 100644 --- a/dali/internal/update/common/property-resetter.h +++ b/dali/internal/update/common/property-resetter.h @@ -241,11 +241,8 @@ private: ModifierType* mModifier; }; - -typedef Resetter AnimatorResetter; -typedef Resetter ConstraintResetter; - - +using AnimatorResetter = Resetter; +using ConstraintResetter = Resetter; } // namespace SceneGraph diff --git a/dali/internal/update/common/scene-graph-connection-change-propagator.h b/dali/internal/update/common/scene-graph-connection-change-propagator.h index 91b1a04..72f520e 100644 --- a/dali/internal/update/common/scene-graph-connection-change-propagator.h +++ b/dali/internal/update/common/scene-graph-connection-change-propagator.h @@ -102,8 +102,8 @@ public: void Destroy( PropertyOwner& object ); private: - typedef Dali::Vector Observers; - typedef Observers::Iterator ObserversIterator; + using Observers = Dali::Vector; + using ObserversIterator = Observers::Iterator; Observers mObservers; }; diff --git a/dali/internal/update/common/scene-graph-property-notification.h b/dali/internal/update/common/scene-graph-property-notification.h index 9bc139c..943e51b 100644 --- a/dali/internal/update/common/scene-graph-property-notification.h +++ b/dali/internal/update/common/scene-graph-property-notification.h @@ -38,10 +38,10 @@ namespace SceneGraph class PropertyNotification; -typedef OwnerContainer< PropertyNotification* > PropertyNotificationContainer; -typedef PropertyNotificationContainer::Iterator PropertyNotificationIter; -typedef PropertyNotificationContainer::ConstIterator PropertyNotificationConstIter; -typedef bool(*ConditionFunction)(const Dali::PropertyInput& value, Dali::Internal::PropertyNotification::RawArgumentContainer& args); +using PropertyNotificationContainer = OwnerContainer; +using PropertyNotificationIter = PropertyNotificationContainer::Iterator; +using PropertyNotificationConstIter = PropertyNotificationContainer::ConstIterator; +using ConditionFunction = bool ( * )( const Dali::PropertyInput&, Dali::Internal::PropertyNotification::RawArgumentContainer& ); /** * PropertyNotifications are used to inspect properties of scene graph objects, as part of a scene @@ -50,11 +50,10 @@ typedef bool(*ConditionFunction)(const Dali::PropertyInput& value, Dali::Interna class PropertyNotification { public: - - typedef Dali::PropertyNotification::NotifyMode NotifyMode; - typedef Dali::Internal::PropertyNotification::ConditionType ConditionType; - typedef Dali::Internal::PropertyNotification::RawArgumentContainer RawArgumentContainer; - typedef const void *(*GetPropertyFunction)( const SceneGraph::PropertyBase*, int ); + using NotifyMode = Dali::PropertyNotification::NotifyMode; + using ConditionType = Dali::Internal::PropertyNotification::ConditionType; + using RawArgumentContainer = Dali::Internal::PropertyNotification::RawArgumentContainer; + using GetPropertyFunction = const void* (*)( const SceneGraph::PropertyBase*, int ); /** * Construct a new PropertyNotification diff --git a/dali/internal/update/common/scene-graph-scene.h b/dali/internal/update/common/scene-graph-scene.h index 89d4da1..97af1d5 100644 --- a/dali/internal/update/common/scene-graph-scene.h +++ b/dali/internal/update/common/scene-graph-scene.h @@ -131,7 +131,7 @@ private: /// Messages inline void AddFrameRenderedCallbackMessage( EventThreadServices& eventThreadServices, const Scene& scene, const CallbackBase* callback, int32_t frameId ) { - typedef MessageValue2< Scene, CallbackBase*, int32_t > LocalType; + using LocalType = MessageValue2; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -142,7 +142,7 @@ inline void AddFrameRenderedCallbackMessage( EventThreadServices& eventThreadSer inline void AddFramePresentedCallbackMessage( EventThreadServices& eventThreadServices, const Scene& scene, const CallbackBase* callback, int32_t frameId ) { - typedef MessageValue2< Scene, CallbackBase*, int32_t > LocalType; + using LocalType = MessageValue2; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); diff --git a/dali/internal/update/common/uniform-map.h b/dali/internal/update/common/uniform-map.h index 00de878..6dc0c9d 100644 --- a/dali/internal/update/common/uniform-map.h +++ b/dali/internal/update/common/uniform-map.h @@ -40,7 +40,7 @@ namespace SceneGraph class UniformPropertyMapping { public: - typedef unsigned long Hash; + using Hash = unsigned long; /** * Constructor @@ -151,10 +151,10 @@ private: void MappingChanged(); private: - typedef OwnerContainer< UniformPropertyMapping* > UniformMapContainer; - typedef UniformMapContainer::Iterator UniformMapIter; - typedef Dali::Vector< Observer* > Observers; - typedef Observers::Iterator ObserversIter; + using UniformMapContainer = OwnerContainer; + using UniformMapIter = UniformMapContainer::Iterator; + using Observers = Dali::Vector; + using ObserversIter = Observers::Iterator; UniformMapContainer mUniformMaps; // Owner container of uniform maps diff --git a/dali/internal/update/controllers/render-message-dispatcher.cpp b/dali/internal/update/controllers/render-message-dispatcher.cpp index eec8875..19d02c9 100644 --- a/dali/internal/update/controllers/render-message-dispatcher.cpp +++ b/dali/internal/update/controllers/render-message-dispatcher.cpp @@ -58,7 +58,7 @@ void RenderMessageDispatcher::AddRenderer( OwnerPointer< Render::Renderer >& ren void RenderMessageDispatcher::RemoveRenderer( Render::Renderer& renderer ) { - typedef MessageValue1< RenderManager, Render::Renderer* > DerivedType; + using DerivedType = MessageValue1; // Reserve some memory inside the render queue uint32_t* slot = mRenderQueue.ReserveMessageSlot( mBuffers.GetUpdateBufferIndex(), sizeof( DerivedType ) ); @@ -69,7 +69,7 @@ void RenderMessageDispatcher::RemoveRenderer( Render::Renderer& renderer ) void RenderMessageDispatcher::AddRenderTracker( Render::RenderTracker& renderTracker ) { - typedef MessageValue1< RenderManager, Render::RenderTracker* > DerivedType; + using DerivedType = MessageValue1; // Reserve some memory inside the render queue uint32_t* slot = mRenderQueue.ReserveMessageSlot( mBuffers.GetUpdateBufferIndex(), sizeof( DerivedType ) ); @@ -80,7 +80,7 @@ void RenderMessageDispatcher::AddRenderTracker( Render::RenderTracker& renderTra void RenderMessageDispatcher::RemoveRenderTracker( Render::RenderTracker& renderTracker ) { - typedef MessageValue1< RenderManager, Render::RenderTracker* > DerivedType; + using DerivedType = MessageValue1; // Reserve some memory inside the render queue uint32_t* slot = mRenderQueue.ReserveMessageSlot( mBuffers.GetUpdateBufferIndex(), sizeof( DerivedType ) ); diff --git a/dali/internal/update/gestures/pan-gesture-profiling.h b/dali/internal/update/gestures/pan-gesture-profiling.h index 72664a4..5f7e513 100644 --- a/dali/internal/update/gestures/pan-gesture-profiling.h +++ b/dali/internal/update/gestures/pan-gesture-profiling.h @@ -45,7 +45,7 @@ struct PanGestureProfiling GestureState state; }; - typedef std::vector< PanGestureProfiling::Position > PanPositionContainer; + using PanPositionContainer = std::vector; void PrintData() const; diff --git a/dali/internal/update/gestures/scene-graph-pan-gesture.h b/dali/internal/update/gestures/scene-graph-pan-gesture.h index c2a2d69..2f2de12 100644 --- a/dali/internal/update/gestures/scene-graph-pan-gesture.h +++ b/dali/internal/update/gestures/scene-graph-pan-gesture.h @@ -180,9 +180,9 @@ public: volatile bool read; }; - typedef std::vector PanInfoHistory; - typedef PanInfoHistory::iterator PanInfoHistoryIter; - typedef PanInfoHistory::const_iterator PanInfoHistoryConstIter; + using PanInfoHistory = std::vector; + using PanInfoHistoryIter = PanInfoHistory::iterator; + using PanInfoHistoryConstIter = PanInfoHistory::const_iterator; private: static const unsigned int PAN_GESTURE_HISTORY = 30u; @@ -410,11 +410,13 @@ private: // Struct to keep pairs of local and screen data together. // TODO: This can encapsulate some functionality also. - typedef struct + using RelativeVectors = struct + { Vector2 local; + Vector2 screen; - } RelativeVectors; + }; /** * Houses new code to process input events and generate an output point. diff --git a/dali/internal/update/manager/render-instruction-processor.h b/dali/internal/update/manager/render-instruction-processor.h index a35bcf0..9040982 100644 --- a/dali/internal/update/manager/render-instruction-processor.h +++ b/dali/internal/update/manager/render-instruction-processor.h @@ -129,8 +129,9 @@ private: inline void SortRenderItems( BufferIndex bufferIndex, RenderList& renderList, Layer& layer, bool respectClippingOrder ); /// Sort comparitor function pointer type. - typedef bool ( *ComparitorPointer )( const SortAttributes& lhs, const SortAttributes& rhs ); - typedef std::vector< SortAttributes > SortingHelper; + using ComparitorPointer = bool ( * )( const SortAttributes&, const SortAttributes& ); + + using SortingHelper = std::vector; Dali::Vector< ComparitorPointer > mSortComparitors; ///< Contains all sort comparitors, used for quick look-up RenderInstructionProcessor::SortingHelper mSortingHelper; ///< Helper used to sort Renderers diff --git a/dali/internal/update/manager/sorted-layers.h b/dali/internal/update/manager/sorted-layers.h index 30cbe4c..6c53a5b 100644 --- a/dali/internal/update/manager/sorted-layers.h +++ b/dali/internal/update/manager/sorted-layers.h @@ -35,10 +35,10 @@ class Layer; /** * A container of Layer pointers sorted by depth */ -typedef std::vector SortedLayerPointers; +using SortedLayerPointers = std::vector; -typedef SortedLayerPointers::iterator SortedLayersIter; -typedef SortedLayerPointers::const_iterator SortedLayersConstIter; +using SortedLayersIter = SortedLayerPointers::iterator; +using SortedLayersConstIter = SortedLayerPointers::const_iterator; } // namespace SceneGraph diff --git a/dali/internal/update/manager/transform-manager.h b/dali/internal/update/manager/transform-manager.h index 6bf9bda..d003f57 100644 --- a/dali/internal/update/manager/transform-manager.h +++ b/dali/internal/update/manager/transform-manager.h @@ -92,7 +92,7 @@ enum TransformManagerProperty TRANSFORM_PROPERTY_COUNT, }; -typedef uint32_t TransformId; // 4,294,967,295 transforms supported +using TransformId = uint32_t; // 4,294,967,295 transforms supported static const TransformId INVALID_TRANSFORM_ID = -1; } //SceneGraph diff --git a/dali/internal/update/manager/update-manager.cpp b/dali/internal/update/manager/update-manager.cpp index 2a7ce73..39e9f56 100644 --- a/dali/internal/update/manager/update-manager.cpp +++ b/dali/internal/update/manager/update-manager.cpp @@ -509,7 +509,7 @@ void UpdateManager::AddScene( OwnerPointer< Scene >& scene ) void UpdateManager::RemoveScene( Scene* scene ) { // Initialize the context from render manager - typedef MessageValue1< RenderManager, SceneGraph::Scene* > DerivedType; + using DerivedType = MessageValue1; // Reserve some memory inside the render queue uint32_t* slot = mImpl->renderQueue.ReserveMessageSlot( mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof( DerivedType ) ); @@ -605,8 +605,7 @@ void UpdateManager::SetShaderProgram( Shader* shader, { if( shaderData ) { - - typedef MessageValue3< Shader, Internal::ShaderDataPtr, ProgramCache*, bool> DerivedType; + using DerivedType = MessageValue3; // Reserve some memory inside the render queue uint32_t* slot = mImpl->renderQueue.ReserveMessageSlot( mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof( DerivedType ) ); @@ -1109,7 +1108,7 @@ void UpdateManager::SetDefaultSurfaceRect( const Rect& rect ) { mImpl->surfaceRectChanged = true; - typedef MessageValue1< RenderManager, Rect > DerivedType; + using DerivedType = MessageValue1 >; // Reserve some memory inside the render queue uint32_t* slot = mImpl->renderQueue.ReserveMessageSlot( mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof( DerivedType ) ); @@ -1120,7 +1119,7 @@ void UpdateManager::SetDefaultSurfaceRect( const Rect& rect ) void UpdateManager::SurfaceReplaced( Scene* scene ) { - typedef MessageValue1< RenderManager, Scene* > DerivedType; + using DerivedType = MessageValue1; // Reserve some memory inside the render queue uint32_t* slot = mImpl->renderQueue.ReserveMessageSlot( mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof( DerivedType ) ); @@ -1193,7 +1192,7 @@ void UpdateManager::RemoveFrameCallback( FrameCallbackInterface* frameCallback ) void UpdateManager::AddSampler( OwnerPointer< Render::Sampler >& sampler ) { // Message has ownership of Sampler while in transit from update to render - typedef MessageValue1< RenderManager, OwnerPointer< Render::Sampler > > DerivedType; + using DerivedType = MessageValue1 >; // Reserve some memory inside the render queue uint32_t* slot = mImpl->renderQueue.ReserveMessageSlot( mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof( DerivedType ) ); @@ -1204,7 +1203,7 @@ void UpdateManager::AddSampler( OwnerPointer< Render::Sampler >& sampler ) void UpdateManager::RemoveSampler( Render::Sampler* sampler ) { - typedef MessageValue1< RenderManager, Render::Sampler* > DerivedType; + using DerivedType = MessageValue1; // Reserve some memory inside the render queue uint32_t* slot = mImpl->renderQueue.ReserveMessageSlot( mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof( DerivedType ) ); @@ -1215,7 +1214,7 @@ void UpdateManager::RemoveSampler( Render::Sampler* sampler ) void UpdateManager::SetFilterMode( Render::Sampler* sampler, uint32_t minFilterMode, uint32_t magFilterMode ) { - typedef MessageValue3< RenderManager, Render::Sampler*, uint32_t, uint32_t > DerivedType; + using DerivedType = MessageValue3; // Reserve some memory inside the render queue uint32_t* slot = mImpl->renderQueue.ReserveMessageSlot( mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof( DerivedType ) ); @@ -1226,7 +1225,7 @@ void UpdateManager::SetFilterMode( Render::Sampler* sampler, uint32_t minFilterM void UpdateManager::SetWrapMode( Render::Sampler* sampler, uint32_t rWrapMode, uint32_t sWrapMode, uint32_t tWrapMode ) { - typedef MessageValue4< RenderManager, Render::Sampler*, uint32_t, uint32_t, uint32_t > DerivedType; + using DerivedType = MessageValue4; // Reserve some memory inside the render queue uint32_t* slot = mImpl->renderQueue.ReserveMessageSlot( mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof( DerivedType ) ); @@ -1238,7 +1237,7 @@ void UpdateManager::SetWrapMode( Render::Sampler* sampler, uint32_t rWrapMode, u void UpdateManager::AddVertexBuffer( OwnerPointer< Render::VertexBuffer >& vertexBuffer ) { // Message has ownership of format while in transit from update -> render - typedef MessageValue1< RenderManager, OwnerPointer< Render::VertexBuffer > > DerivedType; + using DerivedType = MessageValue1 >; // Reserve some memory inside the render queue uint32_t* slot = mImpl->renderQueue.ReserveMessageSlot( mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof( DerivedType ) ); @@ -1249,7 +1248,7 @@ void UpdateManager::AddVertexBuffer( OwnerPointer< Render::VertexBuffer >& verte void UpdateManager::RemoveVertexBuffer( Render::VertexBuffer* vertexBuffer ) { - typedef MessageValue1< RenderManager, Render::VertexBuffer* > DerivedType; + using DerivedType = MessageValue1; // Reserve some memory inside the render queue uint32_t* slot = mImpl->renderQueue.ReserveMessageSlot( mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof( DerivedType ) ); @@ -1261,7 +1260,7 @@ void UpdateManager::RemoveVertexBuffer( Render::VertexBuffer* vertexBuffer ) void UpdateManager::SetVertexBufferFormat( Render::VertexBuffer* vertexBuffer, OwnerPointer< Render::VertexBuffer::Format>& format ) { // Message has ownership of format while in transit from update -> render - typedef MessageValue2< RenderManager, Render::VertexBuffer*, OwnerPointer< Render::VertexBuffer::Format > > DerivedType; + using DerivedType = MessageValue2 >; // Reserve some memory inside the render queue uint32_t* slot = mImpl->renderQueue.ReserveMessageSlot( mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof( DerivedType ) ); @@ -1273,7 +1272,7 @@ void UpdateManager::SetVertexBufferFormat( Render::VertexBuffer* vertexBuffer, O void UpdateManager::SetVertexBufferData( Render::VertexBuffer* vertexBuffer, OwnerPointer< Vector >& data, uint32_t size ) { // Message has ownership of format while in transit from update -> render - typedef MessageValue3< RenderManager, Render::VertexBuffer*, OwnerPointer< Dali::Vector >, uint32_t > DerivedType; + using DerivedType = MessageValue3 >, uint32_t>; // Reserve some memory inside the render queue uint32_t* slot = mImpl->renderQueue.ReserveMessageSlot( mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof( DerivedType ) ); @@ -1285,7 +1284,7 @@ void UpdateManager::SetVertexBufferData( Render::VertexBuffer* vertexBuffer, Own void UpdateManager::AddGeometry( OwnerPointer< Render::Geometry >& geometry ) { // Message has ownership of format while in transit from update -> render - typedef MessageValue1< RenderManager, OwnerPointer< Render::Geometry > > DerivedType; + using DerivedType = MessageValue1 >; // Reserve some memory inside the render queue uint32_t* slot = mImpl->renderQueue.ReserveMessageSlot( mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof( DerivedType ) ); @@ -1296,7 +1295,7 @@ void UpdateManager::AddGeometry( OwnerPointer< Render::Geometry >& geometry ) void UpdateManager::RemoveGeometry( Render::Geometry* geometry ) { - typedef MessageValue1< RenderManager, Render::Geometry* > DerivedType; + using DerivedType = MessageValue1; // Reserve some memory inside the render queue uint32_t* slot = mImpl->renderQueue.ReserveMessageSlot( mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof( DerivedType ) ); @@ -1307,7 +1306,7 @@ void UpdateManager::RemoveGeometry( Render::Geometry* geometry ) void UpdateManager::SetGeometryType( Render::Geometry* geometry, uint32_t geometryType ) { - typedef MessageValue2< RenderManager, Render::Geometry*, uint32_t > DerivedType; + using DerivedType = MessageValue2; // Reserve some memory inside the render queue uint32_t* slot = mImpl->renderQueue.ReserveMessageSlot( mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof( DerivedType ) ); @@ -1318,7 +1317,7 @@ void UpdateManager::SetGeometryType( Render::Geometry* geometry, uint32_t geomet void UpdateManager::SetIndexBuffer( Render::Geometry* geometry, Dali::Vector& indices ) { - typedef IndexBufferMessage< RenderManager > DerivedType; + using DerivedType = IndexBufferMessage; // Reserve some memory inside the render queue uint32_t* slot = mImpl->renderQueue.ReserveMessageSlot( mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof( DerivedType ) ); @@ -1329,7 +1328,7 @@ void UpdateManager::SetIndexBuffer( Render::Geometry* geometry, Dali::Vector DerivedType; + using DerivedType = MessageValue2; // Reserve some memory inside the render queue uint32_t* slot = mImpl->renderQueue.ReserveMessageSlot( mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof( DerivedType ) ); @@ -1340,7 +1339,7 @@ void UpdateManager::RemoveVertexBuffer( Render::Geometry* geometry, Render::Vert void UpdateManager::AttachVertexBuffer( Render::Geometry* geometry, Render::VertexBuffer* vertexBuffer ) { - typedef MessageValue2< RenderManager, Render::Geometry*, Render::VertexBuffer* > DerivedType; + using DerivedType = MessageValue2; // Reserve some memory inside the render queue uint32_t* slot = mImpl->renderQueue.ReserveMessageSlot( mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof( DerivedType ) ); @@ -1352,7 +1351,7 @@ void UpdateManager::AttachVertexBuffer( Render::Geometry* geometry, Render::Vert void UpdateManager::AddTexture( OwnerPointer< Render::Texture >& texture ) { // Message has ownership of Texture while in transit from update -> render - typedef MessageValue1< RenderManager, OwnerPointer< Render::Texture > > DerivedType; + using DerivedType = MessageValue1 >; // Reserve some memory inside the render queue uint32_t* slot = mImpl->renderQueue.ReserveMessageSlot( mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof( DerivedType ) ); @@ -1363,7 +1362,7 @@ void UpdateManager::AddTexture( OwnerPointer< Render::Texture >& texture ) void UpdateManager::RemoveTexture( Render::Texture* texture) { - typedef MessageValue1< RenderManager, Render::Texture* > DerivedType; + using DerivedType = MessageValue1; // Reserve some memory inside the render queue uint32_t* slot = mImpl->renderQueue.ReserveMessageSlot( mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof( DerivedType ) ); @@ -1374,7 +1373,7 @@ void UpdateManager::RemoveTexture( Render::Texture* texture) void UpdateManager::UploadTexture( Render::Texture* texture, PixelDataPtr pixelData, const Texture::UploadParams& params ) { - typedef MessageValue3< RenderManager, Render::Texture*, PixelDataPtr, Texture::UploadParams > DerivedType; + using DerivedType = MessageValue3; // Reserve some memory inside the message queue uint32_t* slot = mImpl->renderQueue.ReserveMessageSlot( mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof( DerivedType ) ); @@ -1385,7 +1384,7 @@ void UpdateManager::UploadTexture( Render::Texture* texture, PixelDataPtr pixelD void UpdateManager::GenerateMipmaps( Render::Texture* texture ) { - typedef MessageValue1< RenderManager, Render::Texture* > DerivedType; + using DerivedType = MessageValue1; // Reserve some memory inside the render queue uint32_t* slot = mImpl->renderQueue.ReserveMessageSlot( mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof( DerivedType ) ); @@ -1396,7 +1395,7 @@ void UpdateManager::GenerateMipmaps( Render::Texture* texture ) void UpdateManager::AddFrameBuffer( OwnerPointer< Render::FrameBuffer >& frameBuffer ) { - typedef MessageValue1< RenderManager, OwnerPointer< Render::FrameBuffer > > DerivedType; + using DerivedType = MessageValue1 >; // Reserve some memory inside the render queue uint32_t* slot = mImpl->renderQueue.ReserveMessageSlot( mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof( DerivedType ) ); @@ -1407,7 +1406,7 @@ void UpdateManager::AddFrameBuffer( OwnerPointer< Render::FrameBuffer >& frameBu void UpdateManager::RemoveFrameBuffer( Render::FrameBuffer* frameBuffer) { - typedef MessageValue1< RenderManager, Render::FrameBuffer* > DerivedType; + using DerivedType = MessageValue1; // Reserve some memory inside the render queue uint32_t* slot = mImpl->renderQueue.ReserveMessageSlot( mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof( DerivedType ) ); @@ -1418,7 +1417,7 @@ void UpdateManager::RemoveFrameBuffer( Render::FrameBuffer* frameBuffer) void UpdateManager::AttachColorTextureToFrameBuffer( Render::FrameBuffer* frameBuffer, Render::Texture* texture, uint32_t mipmapLevel, uint32_t layer ) { - typedef MessageValue4< RenderManager, Render::FrameBuffer*, Render::Texture*, uint32_t, uint32_t > DerivedType; + using DerivedType = MessageValue4; // Reserve some memory inside the render queue uint32_t* slot = mImpl->renderQueue.ReserveMessageSlot( mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof( DerivedType ) ); @@ -1429,7 +1428,7 @@ void UpdateManager::AttachColorTextureToFrameBuffer( Render::FrameBuffer* frameB void UpdateManager::AttachDepthTextureToFrameBuffer( Render::FrameBuffer* frameBuffer, Render::Texture* texture, uint32_t mipmapLevel ) { - typedef MessageValue3< RenderManager, Render::FrameBuffer*, Render::Texture*, uint32_t > DerivedType; + using DerivedType = MessageValue3; // Reserve some memory inside the render queue uint32_t* slot = mImpl->renderQueue.ReserveMessageSlot( mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof( DerivedType ) ); @@ -1440,7 +1439,7 @@ void UpdateManager::AttachDepthTextureToFrameBuffer( Render::FrameBuffer* frameB void UpdateManager::AttachDepthStencilTextureToFrameBuffer( Render::FrameBuffer* frameBuffer, Render::Texture* texture, uint32_t mipmapLevel ) { - typedef MessageValue3< RenderManager, Render::FrameBuffer*, Render::Texture*, uint32_t > DerivedType; + using DerivedType = MessageValue3; // Reserve some memory inside the render queue uint32_t* slot = mImpl->renderQueue.ReserveMessageSlot( mSceneGraphBuffers.GetUpdateBufferIndex(), sizeof( DerivedType ) ); diff --git a/dali/internal/update/manager/update-manager.h b/dali/internal/update/manager/update-manager.h index 419fec3..724f8bf 100644 --- a/dali/internal/update/manager/update-manager.h +++ b/dali/internal/update/manager/update-manager.h @@ -770,7 +770,7 @@ private: inline void InstallRootMessage( UpdateManager& manager, OwnerPointer& root ) { // Message has ownership of Layer while in transit from event -> update - typedef MessageValue1< UpdateManager, OwnerPointer > LocalType; + using LocalType = MessageValue1 >; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -784,7 +784,7 @@ inline void UninstallRootMessage( UpdateManager& manager, const Layer* constRoot // Scene graph thread can destroy this object. Layer* root = const_cast< Layer* >( constRoot ); - typedef MessageValue1< UpdateManager, Layer* > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -796,7 +796,7 @@ inline void UninstallRootMessage( UpdateManager& manager, const Layer* constRoot inline void AddNodeMessage( UpdateManager& manager, OwnerPointer& node ) { // Message has ownership of Node while in transit from event -> update - typedef MessageValue1< UpdateManager, OwnerPointer > LocalType; + using LocalType = MessageValue1 >; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -811,7 +811,7 @@ inline void ConnectNodeMessage( UpdateManager& manager, const Node& constParent, Node& parent = const_cast< Node& >( constParent ); Node& child = const_cast< Node& >( constChild ); - typedef MessageValue2< UpdateManager, Node*, Node* > LocalType; + using LocalType = MessageValue2; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -825,7 +825,7 @@ inline void DisconnectNodeMessage( UpdateManager& manager, const Node& constNode // Scene graph thread can modify this object. Node& node = const_cast< Node& >( constNode ); - typedef MessageValue1< UpdateManager, Node* > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -839,7 +839,7 @@ inline void DestroyNodeMessage( UpdateManager& manager, const Node& constNode ) // Scene graph thread can destroy this object. Node& node = const_cast< Node& >( constNode ); - typedef MessageValue1< UpdateManager, Node* > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -851,7 +851,7 @@ inline void DestroyNodeMessage( UpdateManager& manager, const Node& constNode ) inline void AddCameraMessage( UpdateManager& manager, OwnerPointer< Camera >& camera ) { // Message has ownership of Camera while in transit from event -> update - typedef MessageValue1< UpdateManager, OwnerPointer< Camera > > LocalType; + using LocalType = MessageValue1 >; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -862,7 +862,7 @@ inline void AddCameraMessage( UpdateManager& manager, OwnerPointer< Camera >& ca inline void RemoveCameraMessage( UpdateManager& manager, const Camera* camera ) { - typedef MessageValue1< UpdateManager, Camera* > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -874,7 +874,7 @@ inline void RemoveCameraMessage( UpdateManager& manager, const Camera* camera ) inline void AddObjectMessage( UpdateManager& manager, OwnerPointer& object ) { // Message has ownership of object while in transit from event -> update - typedef MessageValue1< UpdateManager, OwnerPointer > LocalType; + using LocalType = MessageValue1 >; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -885,7 +885,7 @@ inline void AddObjectMessage( UpdateManager& manager, OwnerPointer LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -896,7 +896,7 @@ inline void RemoveObjectMessage( UpdateManager& manager, const PropertyOwner* ob inline void AddAnimationMessage( UpdateManager& manager, OwnerPointer< SceneGraph::Animation >& animation ) { - typedef MessageValue1< UpdateManager, OwnerPointer< SceneGraph::Animation > > LocalType; + using LocalType = MessageValue1 >; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -910,7 +910,7 @@ inline void StopAnimationMessage( UpdateManager& manager, const Animation& const // The scene-graph thread owns this object so it can safely edit it. Animation& animation = const_cast< Animation& >( constAnimation ); - typedef MessageValue1< UpdateManager, Animation* > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -924,7 +924,7 @@ inline void RemoveAnimationMessage( UpdateManager& manager, const Animation& con // The scene-graph thread owns this object so it can safely edit it. Animation& animation = const_cast< Animation& >( constAnimation ); - typedef MessageValue1< UpdateManager, Animation* > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -935,7 +935,7 @@ inline void RemoveAnimationMessage( UpdateManager& manager, const Animation& con inline void AddRenderTaskListMessage( UpdateManager& manager, OwnerPointer< SceneGraph::RenderTaskList >& taskList ) { - typedef MessageValue1< UpdateManager, OwnerPointer< SceneGraph::RenderTaskList > > LocalType; + using LocalType = MessageValue1 >; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -949,7 +949,7 @@ inline void RemoveRenderTaskListMessage( UpdateManager& manager, const RenderTas // The scene-graph thread owns this object so it can safely edit it. RenderTaskList& taskList = const_cast< RenderTaskList& >( constTaskList ); - typedef MessageValue1< UpdateManager, RenderTaskList* > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -960,7 +960,7 @@ inline void RemoveRenderTaskListMessage( UpdateManager& manager, const RenderTas inline void AddSceneMessage( UpdateManager& manager, OwnerPointer< SceneGraph::Scene >& scene ) { - typedef MessageValue1< UpdateManager, OwnerPointer< SceneGraph::Scene > > LocalType; + using LocalType = MessageValue1 >; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -974,7 +974,7 @@ inline void RemoveSceneMessage( UpdateManager& manager, const SceneGraph::Scene& // The scene-graph thread owns this object so it can safely edit it. Scene& scene = const_cast< Scene& >( constScene ); - typedef MessageValue1< UpdateManager, Scene* > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -986,7 +986,7 @@ inline void RemoveSceneMessage( UpdateManager& manager, const SceneGraph::Scene& inline void AddPropertyNotificationMessage( UpdateManager& manager, OwnerPointer< PropertyNotification >& propertyNotification ) { // Message has ownership of PropertyNotification while in transit from event -> update - typedef MessageValue1< UpdateManager, OwnerPointer< PropertyNotification > > LocalType; + using LocalType = MessageValue1 >; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1000,7 +1000,7 @@ inline void RemovePropertyNotificationMessage( UpdateManager& manager, const Pro // The scene-graph thread owns this object so it can safely edit it. PropertyNotification& propertyNotification = const_cast< PropertyNotification& >( constPropertyNotification ); - typedef MessageValue1< UpdateManager, PropertyNotification* > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1016,7 +1016,7 @@ inline void PropertyNotificationSetNotifyModeMessage( UpdateManager& manager, // The scene-graph thread owns this object so it can safely edit it. PropertyNotification* propertyNotification = const_cast< PropertyNotification* >( constPropertyNotification ); - typedef MessageValue2< UpdateManager, PropertyNotification*, PropertyNotification::NotifyMode > LocalType; + using LocalType = MessageValue2; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1028,7 +1028,7 @@ inline void PropertyNotificationSetNotifyModeMessage( UpdateManager& manager, // The render thread can safely change the Shader inline void AddShaderMessage( UpdateManager& manager, OwnerPointer< Shader >& shader ) { - typedef MessageValue1< UpdateManager, OwnerPointer< Shader > > LocalType; + using LocalType = MessageValue1 >; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1040,7 +1040,7 @@ inline void AddShaderMessage( UpdateManager& manager, OwnerPointer< Shader >& sh // The render thread can safely change the Shader inline void RemoveShaderMessage( UpdateManager& manager, const Shader* shader ) { - typedef MessageValue1< UpdateManager, Shader* > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1054,7 +1054,7 @@ inline void SetShaderProgramMessage( UpdateManager& manager, Internal::ShaderDataPtr shaderData, bool modifiesGeometry ) { - typedef MessageValue3< UpdateManager, Shader*, Internal::ShaderDataPtr, bool > LocalType; + using LocalType = MessageValue3; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1065,7 +1065,7 @@ inline void SetShaderProgramMessage( UpdateManager& manager, inline void SetDefaultSurfaceRectMessage( UpdateManager& manager, const Rect& rect ) { - typedef MessageValue1< UpdateManager, Rect > LocalType; + using LocalType = MessageValue1 >; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1079,7 +1079,7 @@ inline void SurfaceReplacedMessage( UpdateManager& manager, const SceneGraph::Sc // The scene-graph thread owns this object so it can safely edit it. Scene& scene = const_cast< Scene& >( constScene ); - typedef MessageValue1< UpdateManager, Scene* > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1090,7 +1090,7 @@ inline void SurfaceReplacedMessage( UpdateManager& manager, const SceneGraph::Sc inline void KeepRenderingMessage( UpdateManager& manager, float durationSeconds ) { - typedef MessageValue1< UpdateManager, float > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1101,7 +1101,7 @@ inline void KeepRenderingMessage( UpdateManager& manager, float durationSeconds inline void SetRenderingBehaviorMessage( UpdateManager& manager, DevelStage::Rendering renderingBehavior ) { - typedef MessageValue1< UpdateManager, DevelStage::Rendering > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1118,7 +1118,7 @@ inline void SetRenderingBehaviorMessage( UpdateManager& manager, DevelStage::Ren */ inline void SetLayerDepthsMessage( UpdateManager& manager, const std::vector< Layer* >& layers, const Layer* rootLayer ) { - typedef MessageValue2< UpdateManager, std::vector< Layer* >, const Layer* > LocalType; + using LocalType = MessageValue2, const Layer*>; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1129,7 +1129,7 @@ inline void SetLayerDepthsMessage( UpdateManager& manager, const std::vector< La inline void AddRendererMessage( UpdateManager& manager, OwnerPointer< Renderer >& object ) { - typedef MessageValue1< UpdateManager, OwnerPointer< Renderer > > LocalType; + using LocalType = MessageValue1 >; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1139,7 +1139,7 @@ inline void AddRendererMessage( UpdateManager& manager, OwnerPointer< Renderer > inline void RemoveRendererMessage( UpdateManager& manager, const Renderer& object ) { - typedef MessageValue1< UpdateManager, Renderer* > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1150,7 +1150,7 @@ inline void RemoveRendererMessage( UpdateManager& manager, const Renderer& objec // The render thread can safely change the Shader inline void AddTextureSetMessage( UpdateManager& manager, OwnerPointer< TextureSet >& textureSet ) { - typedef MessageValue1< UpdateManager, OwnerPointer< TextureSet > > LocalType; + using LocalType = MessageValue1 >; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1162,7 +1162,7 @@ inline void AddTextureSetMessage( UpdateManager& manager, OwnerPointer< TextureS // The render thread can safely change the Shader inline void RemoveTextureSetMessage( UpdateManager& manager, TextureSet& textureSet ) { - typedef MessageValue1< UpdateManager, TextureSet* > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1174,7 +1174,7 @@ inline void RemoveTextureSetMessage( UpdateManager& manager, TextureSet& texture inline void AddSamplerMessage( UpdateManager& manager, OwnerPointer< Render::Sampler >& sampler ) { // Message has ownership of Sampler while in transit from event -> update - typedef MessageValue1< UpdateManager, OwnerPointer< Render::Sampler > > LocalType; + using LocalType = MessageValue1 >; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1185,7 +1185,7 @@ inline void AddSamplerMessage( UpdateManager& manager, OwnerPointer< Render::Sam inline void RemoveSamplerMessage( UpdateManager& manager, Render::Sampler& sampler ) { - typedef MessageValue1< UpdateManager, Render::Sampler* > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1196,7 +1196,7 @@ inline void RemoveSamplerMessage( UpdateManager& manager, Render::Sampler& sampl inline void SetFilterModeMessage( UpdateManager& manager, Render::Sampler& sampler, uint32_t minFilterMode, uint32_t magFilterMode ) { - typedef MessageValue3< UpdateManager, Render::Sampler*, uint32_t, uint32_t > LocalType; + using LocalType = MessageValue3; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1207,7 +1207,7 @@ inline void SetFilterModeMessage( UpdateManager& manager, Render::Sampler& sampl inline void SetWrapModeMessage( UpdateManager& manager, Render::Sampler& sampler, uint32_t rWrapMode, uint32_t sWrapMode, uint32_t tWrapMode ) { - typedef MessageValue4< UpdateManager, Render::Sampler*, uint32_t, uint32_t, uint32_t > LocalType; + using LocalType = MessageValue4; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1219,7 +1219,7 @@ inline void SetWrapModeMessage( UpdateManager& manager, Render::Sampler& sampler inline void AddVertexBuffer( UpdateManager& manager, OwnerPointer< Render::VertexBuffer >& vertexBuffer ) { // Message has ownership of vertexBuffer while in transit from event -> update - typedef MessageValue1< UpdateManager, OwnerPointer< Render::VertexBuffer > > LocalType; + using LocalType = MessageValue1 >; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1230,7 +1230,7 @@ inline void AddVertexBuffer( UpdateManager& manager, OwnerPointer< Render::Verte inline void RemoveVertexBuffer( UpdateManager& manager, Render::VertexBuffer& vertexBuffer ) { - typedef MessageValue1< UpdateManager, Render::VertexBuffer* > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1242,7 +1242,7 @@ inline void RemoveVertexBuffer( UpdateManager& manager, Render::VertexBuffer& ve inline void SetVertexBufferFormat( UpdateManager& manager, Render::VertexBuffer& vertexBuffer, OwnerPointer< Render::VertexBuffer::Format>& format ) { // Message has ownership of VertexBuffer::Format while in transit from event -> update - typedef MessageValue2< UpdateManager, Render::VertexBuffer*, OwnerPointer< Render::VertexBuffer::Format> > LocalType; + using LocalType = MessageValue2 >; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1254,7 +1254,7 @@ inline void SetVertexBufferFormat( UpdateManager& manager, Render::VertexBuffer& inline void SetVertexBufferData( UpdateManager& manager, Render::VertexBuffer& vertexBuffer, OwnerPointer< Vector >& data, uint32_t size ) { // Message has ownership of VertexBuffer data while in transit from event -> update - typedef MessageValue3< UpdateManager, Render::VertexBuffer*, OwnerPointer< Vector >, uint32_t > LocalType; + using LocalType = MessageValue3 >, uint32_t>; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1266,7 +1266,7 @@ inline void SetVertexBufferData( UpdateManager& manager, Render::VertexBuffer& v inline void AddGeometry( UpdateManager& manager, OwnerPointer< Render::Geometry >& geometry ) { // Message has ownership of Geometry while in transit from event -> update - typedef MessageValue1< UpdateManager, OwnerPointer< Render::Geometry > > LocalType; + using LocalType = MessageValue1 >; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1277,7 +1277,7 @@ inline void AddGeometry( UpdateManager& manager, OwnerPointer< Render::Geometry inline void RemoveGeometry( UpdateManager& manager, Render::Geometry& geometry ) { - typedef MessageValue1< UpdateManager, Render::Geometry* > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1288,7 +1288,7 @@ inline void RemoveGeometry( UpdateManager& manager, Render::Geometry& geometry ) inline void AttachVertexBufferMessage( UpdateManager& manager, Render::Geometry& geometry, const Render::VertexBuffer& vertexBuffer ) { - typedef MessageValue2< UpdateManager, Render::Geometry*, Render::VertexBuffer* > LocalType; + using LocalType = MessageValue2; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1299,7 +1299,7 @@ inline void AttachVertexBufferMessage( UpdateManager& manager, Render::Geometry& inline void RemoveVertexBufferMessage( UpdateManager& manager, Render::Geometry& geometry, const Render::VertexBuffer& vertexBuffer ) { - typedef MessageValue2< UpdateManager, Render::Geometry*, Render::VertexBuffer* > LocalType; + using LocalType = MessageValue2; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1350,7 +1350,7 @@ private: inline void SetIndexBufferMessage( UpdateManager& manager, Render::Geometry& geometry, Dali::Vector& indices ) { - typedef IndexBufferMessage< UpdateManager > LocalType; + using LocalType = IndexBufferMessage; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1361,7 +1361,7 @@ inline void SetIndexBufferMessage( UpdateManager& manager, Render::Geometry& geo inline void SetGeometryTypeMessage( UpdateManager& manager, Render::Geometry& geometry, uint32_t geometryType ) { - typedef MessageValue2< UpdateManager, Render::Geometry*, uint32_t > LocalType; + using LocalType = MessageValue2; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1373,7 +1373,7 @@ inline void SetGeometryTypeMessage( UpdateManager& manager, Render::Geometry& ge inline void AddTexture( UpdateManager& manager, OwnerPointer< Render::Texture >& texture ) { // Message has ownership of Texture while in transit from event -> update - typedef MessageValue1< UpdateManager, OwnerPointer< Render::Texture > > LocalType; + using LocalType = MessageValue1 >; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1384,7 +1384,7 @@ inline void AddTexture( UpdateManager& manager, OwnerPointer< Render::Texture >& inline void RemoveTexture( UpdateManager& manager, Render::Texture& texture ) { - typedef MessageValue1< UpdateManager, Render::Texture* > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1395,7 +1395,7 @@ inline void RemoveTexture( UpdateManager& manager, Render::Texture& texture ) inline void UploadTextureMessage( UpdateManager& manager, Render::Texture& texture, PixelDataPtr pixelData, const Texture::UploadParams& params ) { - typedef MessageValue3< UpdateManager, Render::Texture*, PixelDataPtr, Texture::UploadParams > LocalType; + using LocalType = MessageValue3; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1406,7 +1406,7 @@ inline void UploadTextureMessage( UpdateManager& manager, Render::Texture& textu inline void GenerateMipmapsMessage( UpdateManager& manager, Render::Texture& texture ) { - typedef MessageValue1< UpdateManager, Render::Texture* > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1418,7 +1418,7 @@ inline void GenerateMipmapsMessage( UpdateManager& manager, Render::Texture& tex inline void AddFrameBuffer( UpdateManager& manager, OwnerPointer< Render::FrameBuffer >& frameBuffer ) { - typedef MessageValue1< UpdateManager, OwnerPointer< Render::FrameBuffer > > LocalType; + using LocalType = MessageValue1 >; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1429,7 +1429,7 @@ inline void AddFrameBuffer( UpdateManager& manager, OwnerPointer< Render::FrameB inline void RemoveFrameBuffer( UpdateManager& manager, Render::FrameBuffer& frameBuffer ) { - typedef MessageValue1< UpdateManager, Render::FrameBuffer* > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1440,7 +1440,7 @@ inline void RemoveFrameBuffer( UpdateManager& manager, Render::FrameBuffer& fram inline void AttachColorTextureToFrameBuffer( UpdateManager& manager, Render::FrameBuffer& frameBuffer, Render::Texture* texture, uint32_t mipmapLevel, uint32_t layer ) { - typedef MessageValue4< UpdateManager, Render::FrameBuffer*, Render::Texture*, uint32_t, uint32_t > LocalType; + using LocalType = MessageValue4; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1451,7 +1451,7 @@ inline void AttachColorTextureToFrameBuffer( UpdateManager& manager, Render::Fra inline void AttachDepthTextureToFrameBuffer( UpdateManager& manager, Render::FrameBuffer& frameBuffer, Render::Texture* texture, uint32_t mipmapLevel ) { - typedef MessageValue3< UpdateManager, Render::FrameBuffer*, Render::Texture*, uint32_t > LocalType; + using LocalType = MessageValue3; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1462,7 +1462,7 @@ inline void AttachDepthTextureToFrameBuffer( UpdateManager& manager, Render::Fra inline void AttachDepthStencilTextureToFrameBuffer( UpdateManager& manager, Render::FrameBuffer& frameBuffer, Render::Texture* texture, uint32_t mipmapLevel ) { - typedef MessageValue3< UpdateManager, Render::FrameBuffer*, Render::Texture*, uint32_t > LocalType; + using LocalType = MessageValue3; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1473,7 +1473,7 @@ inline void AttachDepthStencilTextureToFrameBuffer( UpdateManager& manager, Rend inline void SetDepthIndicesMessage( UpdateManager& manager, OwnerPointer< NodeDepths >& nodeDepths ) { - typedef MessageValue1< UpdateManager, OwnerPointer< NodeDepths > > LocalType; + using LocalType = MessageValue1 >; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1484,7 +1484,7 @@ inline void SetDepthIndicesMessage( UpdateManager& manager, OwnerPointer< NodeDe inline void AddResetterMessage( UpdateManager& manager, OwnerPointer resetter ) { - typedef MessageValue1< UpdateManager, OwnerPointer > LocalType; + using LocalType = MessageValue1 >; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1495,7 +1495,7 @@ inline void AddResetterMessage( UpdateManager& manager, OwnerPointer& frameCallback, const Node& rootNode ) { - typedef MessageValue2< UpdateManager, OwnerPointer< FrameCallback >, const Node* > LocalType; + using LocalType = MessageValue2, const Node*>; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1506,7 +1506,7 @@ inline void AddFrameCallbackMessage( UpdateManager& manager, OwnerPointer< Frame inline void RemoveFrameCallbackMessage( UpdateManager& manager, FrameCallbackInterface& frameCallback ) { - typedef MessageValue1< UpdateManager, FrameCallbackInterface* > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = manager.ReserveMessageSlot( sizeof( LocalType ) ); diff --git a/dali/internal/update/nodes/node-declarations.h b/dali/internal/update/nodes/node-declarations.h index a0a382f..affd44f 100644 --- a/dali/internal/update/nodes/node-declarations.h +++ b/dali/internal/update/nodes/node-declarations.h @@ -35,9 +35,9 @@ namespace SceneGraph class Node; -typedef Dali::Vector< Node* > NodeContainer; -typedef NodeContainer::Iterator NodeIter; -typedef NodeContainer::ConstIterator NodeConstIter; +using NodeContainer = Dali::Vector; +using NodeIter = NodeContainer::Iterator; +using NodeConstIter = NodeContainer::ConstIterator; /** * Flag whether property has changed, during the Update phase. diff --git a/dali/internal/update/nodes/node-messages.h b/dali/internal/update/nodes/node-messages.h index 3fdb2e2..03efec7 100644 --- a/dali/internal/update/nodes/node-messages.h +++ b/dali/internal/update/nodes/node-messages.h @@ -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. @@ -148,8 +147,7 @@ template< typename P > class NodePropertyComponentMessage : public NodePropertyMessageBase { public: - - typedef void(AnimatableProperty

::*MemberFunction)( BufferIndex, float ); + using MemberFunction = void ( AnimatableProperty

::* )( BufferIndex, float ); /** * Send a message. @@ -227,8 +225,7 @@ template class NodeTransformPropertyMessage : public NodePropertyMessageBase { public: - - typedef void(TransformManagerPropertyHandler

::*MemberFunction)( BufferIndex, const P& ); + using MemberFunction = void ( TransformManagerPropertyHandler

::* )( BufferIndex, const P& ); /** * Create a message. @@ -306,8 +303,7 @@ template class NodeTransformComponentMessage : public NodePropertyMessageBase { public: - - typedef void(TransformManagerPropertyHandler

::*MemberFunction)( BufferIndex, float ); + using MemberFunction = void ( TransformManagerPropertyHandler

::* )( BufferIndex, float ); /** * Send a message. diff --git a/dali/internal/update/nodes/node.h b/dali/internal/update/nodes/node.h old mode 100755 new mode 100644 index 6d24979..037f6ed --- a/dali/internal/update/nodes/node.h +++ b/dali/internal/update/nodes/node.h @@ -960,7 +960,7 @@ protected: inline void SetInheritOrientationMessage( EventThreadServices& eventThreadServices, const Node& node, bool inherit ) { - typedef MessageValue1< Node, bool > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -971,7 +971,7 @@ inline void SetInheritOrientationMessage( EventThreadServices& eventThreadServic inline void SetParentOriginMessage( EventThreadServices& eventThreadServices, const Node& node, const Vector3& origin ) { - typedef MessageValue1< Node, Vector3 > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -982,7 +982,7 @@ inline void SetParentOriginMessage( EventThreadServices& eventThreadServices, co inline void SetAnchorPointMessage( EventThreadServices& eventThreadServices, const Node& node, const Vector3& anchor ) { - typedef MessageValue1< Node, Vector3 > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -993,7 +993,7 @@ inline void SetAnchorPointMessage( EventThreadServices& eventThreadServices, con inline void SetInheritPositionMessage( EventThreadServices& eventThreadServices, const Node& node, bool inherit ) { - typedef MessageValue1< Node, bool > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1004,7 +1004,7 @@ inline void SetInheritPositionMessage( EventThreadServices& eventThreadServices, inline void SetInheritScaleMessage( EventThreadServices& eventThreadServices, const Node& node, bool inherit ) { - typedef MessageValue1< Node, bool > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1015,7 +1015,7 @@ inline void SetInheritScaleMessage( EventThreadServices& eventThreadServices, co inline void SetColorModeMessage( EventThreadServices& eventThreadServices, const Node& node, ColorMode colorMode ) { - typedef MessageValue1< Node, ColorMode > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1026,7 +1026,7 @@ inline void SetColorModeMessage( EventThreadServices& eventThreadServices, const inline void SetDrawModeMessage( EventThreadServices& eventThreadServices, const Node& node, DrawMode::Type drawMode ) { - typedef MessageValue1< Node, DrawMode::Type > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1037,7 +1037,7 @@ inline void SetDrawModeMessage( EventThreadServices& eventThreadServices, const inline void AttachRendererMessage( EventThreadServices& eventThreadServices, const Node& node, const Renderer& renderer ) { - typedef MessageValue1< Node, Renderer* > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1048,7 +1048,7 @@ inline void AttachRendererMessage( EventThreadServices& eventThreadServices, con inline void DetachRendererMessage( EventThreadServices& eventThreadServices, const Node& node, const Renderer& renderer ) { - typedef MessageValue1< Node, const Renderer* > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1059,7 +1059,7 @@ inline void DetachRendererMessage( EventThreadServices& eventThreadServices, con inline void SetDepthIndexMessage( EventThreadServices& eventThreadServices, const Node& node, uint32_t depthIndex ) { - typedef MessageValue1< Node, uint32_t > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1070,7 +1070,7 @@ inline void SetDepthIndexMessage( EventThreadServices& eventThreadServices, cons inline void SetClippingModeMessage( EventThreadServices& eventThreadServices, const Node& node, ClippingMode::Type clippingMode ) { - typedef MessageValue1< Node, ClippingMode::Type > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -1081,7 +1081,7 @@ inline void SetClippingModeMessage( EventThreadServices& eventThreadServices, co inline void SetPositionUsesAnchorPointMessage( EventThreadServices& eventThreadServices, const Node& node, bool positionUsesAnchorPoint ) { - typedef MessageValue1< Node, bool > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); diff --git a/dali/internal/update/nodes/scene-graph-layer.h b/dali/internal/update/nodes/scene-graph-layer.h old mode 100755 new mode 100644 index c49f84f..3a25f67 --- a/dali/internal/update/nodes/scene-graph-layer.h +++ b/dali/internal/update/nodes/scene-graph-layer.h @@ -58,7 +58,7 @@ struct Renderable Renderer* mRenderer; }; -typedef Dali::Vector< Renderable > RenderableContainer; +using RenderableContainer = Dali::Vector; /** * Layers have a "depth" relative to all other layers in the scene-graph. @@ -70,8 +70,7 @@ typedef Dali::Vector< Renderable > RenderableContainer; class Layer : public Node { public: - - typedef Dali::Layer::SortFunctionType SortFunctionType; + using SortFunctionType = Dali::Layer::SortFunctionType; // Creation methods @@ -252,7 +251,7 @@ private: */ inline void SetSortFunctionMessage( EventThreadServices& eventThreadServices, const Layer& layer, Dali::Layer::SortFunctionType function ) { - typedef MessageValue1< Layer, Dali::Layer::SortFunctionType > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -268,7 +267,7 @@ inline void SetSortFunctionMessage( EventThreadServices& eventThreadServices, co */ inline void SetClippingMessage( EventThreadServices& eventThreadServices, const Layer& layer, bool enabled ) { - typedef MessageValue1< Layer, bool > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -284,7 +283,7 @@ inline void SetClippingMessage( EventThreadServices& eventThreadServices, const */ inline void SetClippingBoxMessage( EventThreadServices& eventThreadServices, const Layer& layer, const Dali::ClippingBox& clippingbox ) { - typedef MessageValue1< Layer, Dali::ClippingBox > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -302,7 +301,7 @@ inline void SetBehaviorMessage( EventThreadServices& eventThreadServices, const Layer& layer, Dali::Layer::Behavior behavior ) { - typedef MessageValue1< Layer, Dali::Layer::Behavior > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -321,7 +320,7 @@ inline void SetBehaviorMessage( EventThreadServices& eventThreadServices, */ inline void SetDepthTestDisabledMessage( EventThreadServices& eventThreadServices, const Layer& layer, bool disable ) { - typedef MessageValue1< Layer, bool > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); diff --git a/dali/internal/update/queue/update-message-queue.cpp b/dali/internal/update/queue/update-message-queue.cpp index f9f3860..bebc1dc 100644 --- a/dali/internal/update/queue/update-message-queue.cpp +++ b/dali/internal/update/queue/update-message-queue.cpp @@ -48,9 +48,9 @@ static const std::size_t MAX_FREE_BUFFER_COUNT = 3; // Allow this number of buff // A queue of message buffers typedef vector< MessageBuffer* > MessageBufferQueue; -typedef MessageBufferQueue::iterator MessageBufferIter; +using MessageBufferIter = MessageBufferQueue::iterator; -typedef Dali::Mutex MessageQueueMutex; +using MessageQueueMutex = Dali::Mutex; } // unnamed namespace diff --git a/dali/internal/update/render-tasks/scene-graph-camera.h b/dali/internal/update/render-tasks/scene-graph-camera.h index f75f81b..c5917a0 100644 --- a/dali/internal/update/render-tasks/scene-graph-camera.h +++ b/dali/internal/update/render-tasks/scene-graph-camera.h @@ -330,7 +330,7 @@ public: // PROPERTIES inline void SetTypeMessage( EventThreadServices& eventThreadServices, const Camera& camera, Dali::Camera::Type parameter ) { - typedef MessageValue1< Camera, Dali::Camera::Type > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -341,7 +341,7 @@ inline void SetTypeMessage( EventThreadServices& eventThreadServices, const Came inline void SetProjectionModeMessage( EventThreadServices& eventThreadServices, const Camera& camera, Dali::Camera::ProjectionMode parameter ) { - typedef MessageValue1< Camera, Dali::Camera::ProjectionMode > LocalProjectionMode; + using LocalProjectionMode = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalProjectionMode ) ); @@ -352,7 +352,7 @@ inline void SetProjectionModeMessage( EventThreadServices& eventThreadServices, inline void SetFieldOfViewMessage( EventThreadServices& eventThreadServices, const Camera& camera, float parameter ) { - typedef MessageValue1< Camera, float > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -363,7 +363,7 @@ inline void SetFieldOfViewMessage( EventThreadServices& eventThreadServices, con inline void SetAspectRatioMessage( EventThreadServices& eventThreadServices, const Camera& camera, float parameter ) { - typedef MessageValue1< Camera, float > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -374,7 +374,7 @@ inline void SetAspectRatioMessage( EventThreadServices& eventThreadServices, con inline void SetLeftClippingPlaneMessage( EventThreadServices& eventThreadServices, const Camera& camera, float parameter ) { - typedef MessageValue1< Camera, float > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -385,7 +385,7 @@ inline void SetLeftClippingPlaneMessage( EventThreadServices& eventThreadService inline void SetRightClippingPlaneMessage( EventThreadServices& eventThreadServices, const Camera& camera, float parameter ) { - typedef MessageValue1< Camera, float > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -396,7 +396,7 @@ inline void SetRightClippingPlaneMessage( EventThreadServices& eventThreadServic inline void SetTopClippingPlaneMessage( EventThreadServices& eventThreadServices, const Camera& camera, float parameter ) { - typedef MessageValue1< Camera, float > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -407,7 +407,7 @@ inline void SetTopClippingPlaneMessage( EventThreadServices& eventThreadServices inline void SetBottomClippingPlaneMessage( EventThreadServices& eventThreadServices, const Camera& camera, float parameter ) { - typedef MessageValue1< Camera, float > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -418,7 +418,7 @@ inline void SetBottomClippingPlaneMessage( EventThreadServices& eventThreadServi inline void SetNearClippingPlaneMessage( EventThreadServices& eventThreadServices, const Camera& camera, float parameter ) { - typedef MessageValue1< Camera, float > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -429,7 +429,7 @@ inline void SetNearClippingPlaneMessage( EventThreadServices& eventThreadService inline void SetFarClippingPlaneMessage( EventThreadServices& eventThreadServices, const Camera& camera, float parameter ) { - typedef MessageValue1< Camera, float > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -440,7 +440,7 @@ inline void SetFarClippingPlaneMessage( EventThreadServices& eventThreadServices inline void SetTargetPositionMessage( EventThreadServices& eventThreadServices, const Camera& camera, const Vector3& parameter ) { - typedef MessageValue1< Camera, Vector3 > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -451,7 +451,7 @@ inline void SetTargetPositionMessage( EventThreadServices& eventThreadServices, inline void SetInvertYAxisMessage( EventThreadServices& eventThreadServices, const Camera& camera, bool parameter ) { - typedef MessageValue1< Camera, bool > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); diff --git a/dali/internal/update/render-tasks/scene-graph-render-task-list.h b/dali/internal/update/render-tasks/scene-graph-render-task-list.h index b005b67..3c71227 100644 --- a/dali/internal/update/render-tasks/scene-graph-render-task-list.h +++ b/dali/internal/update/render-tasks/scene-graph-render-task-list.h @@ -43,8 +43,7 @@ class RenderTask; class RenderTaskList { public: - - typedef OwnerContainer< RenderTask* > RenderTaskContainer; + using RenderTaskContainer = OwnerContainer; /** * Construct a new RenderTaskList. @@ -138,7 +137,7 @@ private: inline void AddTaskMessage( EventThreadServices& eventThreadServices, const RenderTaskList& list, OwnerPointer< RenderTask >& task ) { // Message has ownership of the RenderTask while in transit from event -> update - typedef MessageValue1< RenderTaskList, OwnerPointer< RenderTask > > LocalType; + using LocalType = MessageValue1 >; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -152,7 +151,7 @@ inline void RemoveTaskMessage( EventThreadServices& eventThreadServices, const R // Scene graph thread can destroy this object. RenderTask& task = const_cast< RenderTask& >( constTask ); - typedef MessageValue1< RenderTaskList, RenderTask* > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); diff --git a/dali/internal/update/render-tasks/scene-graph-render-task.h b/dali/internal/update/render-tasks/scene-graph-render-task.h index 15c0e4f..1489618 100644 --- a/dali/internal/update/render-tasks/scene-graph-render-task.h +++ b/dali/internal/update/render-tasks/scene-graph-render-task.h @@ -401,7 +401,7 @@ private: // Messages for RenderTask inline void SetFrameBufferMessage( EventThreadServices& eventThreadServices, const RenderTask& task, Render::FrameBuffer* frameBuffer ) { - typedef MessageValue1< RenderTask, Render::FrameBuffer*> LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -412,7 +412,7 @@ inline void SetFrameBufferMessage( EventThreadServices& eventThreadServices, con inline void SetClearColorMessage( EventThreadServices& eventThreadServices, const RenderTask& task, const Vector4& value ) { - typedef MessageDoubleBuffered1< RenderTask, Vector4 > LocalType; + using LocalType = MessageDoubleBuffered1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -423,7 +423,7 @@ inline void SetClearColorMessage( EventThreadServices& eventThreadServices, cons inline void BakeClearColorMessage( EventThreadServices& eventThreadServices, const RenderTask& task, const Vector4& value ) { - typedef MessageDoubleBuffered1< RenderTask, Vector4 > LocalType; + using LocalType = MessageDoubleBuffered1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -434,7 +434,7 @@ inline void BakeClearColorMessage( EventThreadServices& eventThreadServices, con inline void SetClearEnabledMessage( EventThreadServices& eventThreadServices, const RenderTask& task, bool enabled ) { - typedef MessageValue1< RenderTask, bool > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -445,7 +445,7 @@ inline void SetClearEnabledMessage( EventThreadServices& eventThreadServices, co inline void SetCullModeMessage( EventThreadServices& eventThreadServices, const RenderTask& task, bool mode ) { - typedef MessageValue1< RenderTask, bool > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -456,7 +456,7 @@ inline void SetCullModeMessage( EventThreadServices& eventThreadServices, const inline void SetRefreshRateMessage( EventThreadServices& eventThreadServices, const RenderTask& task, uint32_t refreshRate ) { - typedef MessageValue1< RenderTask, uint32_t > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -470,7 +470,7 @@ inline void SetSourceNodeMessage( EventThreadServices& eventThreadServices, cons // Scene graph thread can destroy this object. Node* node = const_cast< Node* >( constNode ); - typedef MessageValue1< RenderTask, Node* > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -481,7 +481,7 @@ inline void SetSourceNodeMessage( EventThreadServices& eventThreadServices, cons inline void SetCameraMessage( EventThreadServices& eventThreadServices, const RenderTask& task, const Node* constNode, const Camera* constCamera ) { - typedef MessageValue2< RenderTask, Node*, Camera* > LocalType; + using LocalType = MessageValue2; Node* node = const_cast< Node* >( constNode ); Camera* camera = const_cast< Camera* >( constCamera ); @@ -494,7 +494,7 @@ inline void SetCameraMessage( EventThreadServices& eventThreadServices, const Re inline void SetExclusiveMessage( EventThreadServices& eventThreadServices, const RenderTask& task, bool exclusive ) { - typedef MessageValue1< RenderTask, bool > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -505,7 +505,7 @@ inline void SetExclusiveMessage( EventThreadServices& eventThreadServices, const inline void SetSyncRequiredMessage(EventThreadServices& eventThreadServices, const RenderTask& task, bool requiresSync ) { - typedef MessageValue1< RenderTask, bool > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -516,7 +516,7 @@ inline void SetSyncRequiredMessage(EventThreadServices& eventThreadServices, con inline void BakeViewportPositionMessage( EventThreadServices& eventThreadServices, const RenderTask& task, const Vector2& value ) { - typedef MessageDoubleBuffered1< RenderTask, Vector2 > LocalType; + using LocalType = MessageDoubleBuffered1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -527,7 +527,7 @@ inline void BakeViewportPositionMessage( EventThreadServices& eventThreadService inline void BakeViewportSizeMessage( EventThreadServices& eventThreadServices, const RenderTask& task, const Vector2& value ) { - typedef MessageDoubleBuffered1< RenderTask, Vector2 > LocalType; + using LocalType = MessageDoubleBuffered1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); diff --git a/dali/internal/update/rendering/scene-graph-renderer.cpp b/dali/internal/update/rendering/scene-graph-renderer.cpp index ffb71a9..4f94576 100644 --- a/dali/internal/update/rendering/scene-graph-renderer.cpp +++ b/dali/internal/update/rendering/scene-graph-renderer.cpp @@ -226,133 +226,133 @@ void Renderer::PrepareRender( BufferIndex updateBufferIndex ) if( mResendFlag & RESEND_DRAW_COMMANDS ) { - typedef MessageValue2< Render::Renderer, Dali::DevelRenderer::DrawCommand*, uint32_t > DerivedType; + using DerivedType = MessageValue2; uint32_t* slot = mSceneController->GetRenderQueue().ReserveMessageSlot( updateBufferIndex, sizeof( DerivedType ) ); new (slot) DerivedType( mRenderer, &Render::Renderer::SetDrawCommands, mDrawCommands.data(), mDrawCommands.size() ); } if( mResendFlag & RESEND_FACE_CULLING_MODE ) { - typedef MessageValue1< Render::Renderer, FaceCullingMode::Type > DerivedType; + using DerivedType = MessageValue1; uint32_t* slot = mSceneController->GetRenderQueue().ReserveMessageSlot( updateBufferIndex, sizeof( DerivedType ) ); new (slot) DerivedType( mRenderer, &Render::Renderer::SetFaceCullingMode, mFaceCullingMode ); } if( mResendFlag & RESEND_BLEND_BIT_MASK ) { - typedef MessageValue1< Render::Renderer, uint32_t > DerivedType; + using DerivedType = MessageValue1; uint32_t* slot = mSceneController->GetRenderQueue().ReserveMessageSlot( updateBufferIndex, sizeof( DerivedType ) ); new (slot) DerivedType( mRenderer, &Render::Renderer::SetBlendingBitMask, mBlendBitmask ); } if( mResendFlag & RESEND_BLEND_COLOR ) { - typedef MessageValue1< Render::Renderer, Vector4 > DerivedType; + using DerivedType = MessageValue1; uint32_t* slot = mSceneController->GetRenderQueue().ReserveMessageSlot( updateBufferIndex, sizeof( DerivedType ) ); new (slot) DerivedType( mRenderer, &Render::Renderer::SetBlendColor, GetBlendColor() ); } if( mResendFlag & RESEND_PREMULTIPLIED_ALPHA ) { - typedef MessageValue1< Render::Renderer, bool > DerivedType; + using DerivedType = MessageValue1; uint32_t* slot = mSceneController->GetRenderQueue().ReserveMessageSlot( updateBufferIndex, sizeof( DerivedType ) ); new (slot) DerivedType( mRenderer, &Render::Renderer::EnablePreMultipliedAlpha, mPremultipledAlphaEnabled ); } if( mResendFlag & RESEND_INDEXED_DRAW_FIRST_ELEMENT ) { - typedef MessageValue1< Render::Renderer, uint32_t > DerivedType; + using DerivedType = MessageValue1; uint32_t* slot = mSceneController->GetRenderQueue().ReserveMessageSlot( updateBufferIndex, sizeof( DerivedType ) ); new (slot) DerivedType( mRenderer, &Render::Renderer::SetIndexedDrawFirstElement, mIndexedDrawFirstElement ); } if( mResendFlag & RESEND_INDEXED_DRAW_ELEMENTS_COUNT ) { - typedef MessageValue1< Render::Renderer, uint32_t > DerivedType; + using DerivedType = MessageValue1; uint32_t* slot = mSceneController->GetRenderQueue().ReserveMessageSlot( updateBufferIndex, sizeof( DerivedType ) ); new (slot) DerivedType( mRenderer, &Render::Renderer::SetIndexedDrawElementsCount, mIndexedDrawElementsCount ); } if( mResendFlag & RESEND_DEPTH_WRITE_MODE ) { - typedef MessageValue1< Render::Renderer, DepthWriteMode::Type > DerivedType; + using DerivedType = MessageValue1; uint32_t* slot = mSceneController->GetRenderQueue().ReserveMessageSlot( updateBufferIndex, sizeof( DerivedType ) ); new (slot) DerivedType( mRenderer, &Render::Renderer::SetDepthWriteMode, mDepthWriteMode ); } if( mResendFlag & RESEND_DEPTH_TEST_MODE ) { - typedef MessageValue1< Render::Renderer, DepthTestMode::Type > DerivedType; + using DerivedType = MessageValue1; uint32_t* slot = mSceneController->GetRenderQueue().ReserveMessageSlot( updateBufferIndex, sizeof( DerivedType ) ); new (slot) DerivedType( mRenderer, &Render::Renderer::SetDepthTestMode, mDepthTestMode ); } if( mResendFlag & RESEND_DEPTH_FUNCTION ) { - typedef MessageValue1< Render::Renderer, DepthFunction::Type > DerivedType; + using DerivedType = MessageValue1; uint32_t* slot = mSceneController->GetRenderQueue().ReserveMessageSlot( updateBufferIndex, sizeof( DerivedType ) ); new (slot) DerivedType( mRenderer, &Render::Renderer::SetDepthFunction, mDepthFunction ); } if( mResendFlag & RESEND_RENDER_MODE ) { - typedef MessageValue1< Render::Renderer, RenderMode::Type > DerivedType; + using DerivedType = MessageValue1; uint32_t* slot = mSceneController->GetRenderQueue().ReserveMessageSlot( updateBufferIndex, sizeof( DerivedType ) ); new (slot) DerivedType( mRenderer, &Render::Renderer::SetRenderMode, mStencilParameters.renderMode ); } if( mResendFlag & RESEND_STENCIL_FUNCTION ) { - typedef MessageValue1< Render::Renderer, StencilFunction::Type > DerivedType; + using DerivedType = MessageValue1; uint32_t* slot = mSceneController->GetRenderQueue().ReserveMessageSlot( updateBufferIndex, sizeof( DerivedType ) ); new (slot) DerivedType( mRenderer, &Render::Renderer::SetStencilFunction, mStencilParameters.stencilFunction ); } if( mResendFlag & RESEND_STENCIL_FUNCTION_MASK ) { - typedef MessageValue1< Render::Renderer, int > DerivedType; + using DerivedType = MessageValue1; uint32_t* slot = mSceneController->GetRenderQueue().ReserveMessageSlot( updateBufferIndex, sizeof( DerivedType ) ); new (slot) DerivedType( mRenderer, &Render::Renderer::SetStencilFunctionMask, mStencilParameters.stencilFunctionMask ); } if( mResendFlag & RESEND_STENCIL_FUNCTION_REFERENCE ) { - typedef MessageValue1< Render::Renderer, int > DerivedType; + using DerivedType = MessageValue1; uint32_t* slot = mSceneController->GetRenderQueue().ReserveMessageSlot( updateBufferIndex, sizeof( DerivedType ) ); new (slot) DerivedType( mRenderer, &Render::Renderer::SetStencilFunctionReference, mStencilParameters.stencilFunctionReference ); } if( mResendFlag & RESEND_STENCIL_MASK ) { - typedef MessageValue1< Render::Renderer, int > DerivedType; + using DerivedType = MessageValue1; uint32_t* slot = mSceneController->GetRenderQueue().ReserveMessageSlot( updateBufferIndex, sizeof( DerivedType ) ); new (slot) DerivedType( mRenderer, &Render::Renderer::SetStencilMask, mStencilParameters.stencilMask ); } if( mResendFlag & RESEND_STENCIL_OPERATION_ON_FAIL ) { - typedef MessageValue1< Render::Renderer, StencilOperation::Type > DerivedType; + using DerivedType = MessageValue1; uint32_t* slot = mSceneController->GetRenderQueue().ReserveMessageSlot( updateBufferIndex, sizeof( DerivedType ) ); new (slot) DerivedType( mRenderer, &Render::Renderer::SetStencilOperationOnFail, mStencilParameters.stencilOperationOnFail ); } if( mResendFlag & RESEND_STENCIL_OPERATION_ON_Z_FAIL ) { - typedef MessageValue1< Render::Renderer, StencilOperation::Type > DerivedType; + using DerivedType = MessageValue1; uint32_t* slot = mSceneController->GetRenderQueue().ReserveMessageSlot( updateBufferIndex, sizeof( DerivedType ) ); new (slot) DerivedType( mRenderer, &Render::Renderer::SetStencilOperationOnZFail, mStencilParameters.stencilOperationOnZFail ); } if( mResendFlag & RESEND_STENCIL_OPERATION_ON_Z_PASS ) { - typedef MessageValue1< Render::Renderer, StencilOperation::Type > DerivedType; + using DerivedType = MessageValue1; uint32_t* slot = mSceneController->GetRenderQueue().ReserveMessageSlot( updateBufferIndex, sizeof( DerivedType ) ); new (slot) DerivedType( mRenderer, &Render::Renderer::SetStencilOperationOnZPass, mStencilParameters.stencilOperationOnZPass ); } if( mResendFlag & RESEND_SHADER ) { - typedef MessageValue1< Render::Renderer, bool > DerivedType; + using DerivedType = MessageValue1; uint32_t* slot = mSceneController->GetRenderQueue().ReserveMessageSlot( updateBufferIndex, sizeof( DerivedType ) ); new (slot) DerivedType( mRenderer, &Render::Renderer::SetShaderChanged, true ); } diff --git a/dali/internal/update/rendering/scene-graph-renderer.h b/dali/internal/update/rendering/scene-graph-renderer.h old mode 100755 new mode 100644 index a9c1c1e..dcc1bba --- a/dali/internal/update/rendering/scene-graph-renderer.h +++ b/dali/internal/update/rendering/scene-graph-renderer.h @@ -47,9 +47,9 @@ namespace SceneGraph class SceneController; class Renderer; -typedef Dali::Vector< Renderer* > RendererContainer; -typedef RendererContainer::Iterator RendererIter; -typedef RendererContainer::ConstIterator RendererConstIter; +using RendererContainer = Dali::Vector; +using RendererIter = RendererContainer::Iterator; +using RendererConstIter = RendererContainer::ConstIterator; class TextureSet; class Geometry; @@ -488,7 +488,7 @@ public: /// Messages inline void SetTexturesMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, const TextureSet& textureSet ) { - typedef MessageValue1< Renderer, TextureSet* > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -499,7 +499,7 @@ inline void SetTexturesMessage( EventThreadServices& eventThreadServices, const inline void SetGeometryMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, const Render::Geometry& geometry ) { - typedef MessageValue1< Renderer, Render::Geometry* > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -510,7 +510,7 @@ inline void SetGeometryMessage( EventThreadServices& eventThreadServices, const inline void SetShaderMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, const Shader& shader ) { - typedef MessageValue1< Renderer, Shader* > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -521,7 +521,7 @@ inline void SetShaderMessage( EventThreadServices& eventThreadServices, const Re inline void SetDepthIndexMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, int depthIndex ) { - typedef MessageValue1< Renderer, int > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -532,7 +532,7 @@ inline void SetDepthIndexMessage( EventThreadServices& eventThreadServices, cons inline void SetFaceCullingModeMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, FaceCullingMode::Type faceCullingMode ) { - typedef MessageValue1< Renderer, FaceCullingMode::Type > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -542,7 +542,7 @@ inline void SetFaceCullingModeMessage( EventThreadServices& eventThreadServices, inline void SetBlendModeMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, BlendMode::Type blendingMode ) { - typedef MessageValue1< Renderer, BlendMode::Type > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -552,7 +552,7 @@ inline void SetBlendModeMessage( EventThreadServices& eventThreadServices, const inline void SetBlendingOptionsMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, uint32_t options ) { - typedef MessageValue1< Renderer, uint32_t > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -562,7 +562,7 @@ inline void SetBlendingOptionsMessage( EventThreadServices& eventThreadServices, inline void SetBlendColorMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, const Vector4& blendColor ) { - typedef MessageValue1< Renderer, Vector4 > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -572,7 +572,7 @@ inline void SetBlendColorMessage( EventThreadServices& eventThreadServices, cons inline void SetIndexedDrawFirstElementMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, uint32_t firstElement ) { - typedef MessageValue1< Renderer, uint32_t > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -582,7 +582,7 @@ inline void SetIndexedDrawFirstElementMessage( EventThreadServices& eventThreadS inline void SetIndexedDrawElementsCountMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, uint32_t elementsCount ) { - typedef MessageValue1< Renderer, uint32_t > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -592,7 +592,7 @@ inline void SetIndexedDrawElementsCountMessage( EventThreadServices& eventThread inline void SetEnablePreMultipliedAlphaMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, bool preMultiplied ) { - typedef MessageValue1< Renderer, bool > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -602,7 +602,7 @@ inline void SetEnablePreMultipliedAlphaMessage( EventThreadServices& eventThread inline void SetDepthWriteModeMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, DepthWriteMode::Type depthWriteMode ) { - typedef MessageValue1< Renderer, DepthWriteMode::Type > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -612,7 +612,7 @@ inline void SetDepthWriteModeMessage( EventThreadServices& eventThreadServices, inline void SetDepthTestModeMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, DepthTestMode::Type depthTestMode ) { - typedef MessageValue1< Renderer, DepthTestMode::Type > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -622,7 +622,7 @@ inline void SetDepthTestModeMessage( EventThreadServices& eventThreadServices, c inline void SetDepthFunctionMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, DepthFunction::Type depthFunction ) { - typedef MessageValue1< Renderer, DepthFunction::Type > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -632,7 +632,7 @@ inline void SetDepthFunctionMessage( EventThreadServices& eventThreadServices, c inline void SetRenderModeMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, RenderMode::Type mode ) { - typedef MessageValue1< Renderer, RenderMode::Type > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -642,7 +642,7 @@ inline void SetRenderModeMessage( EventThreadServices& eventThreadServices, cons inline void SetStencilFunctionMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, StencilFunction::Type stencilFunction ) { - typedef MessageValue1< Renderer, StencilFunction::Type > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -652,7 +652,7 @@ inline void SetStencilFunctionMessage( EventThreadServices& eventThreadServices, inline void SetStencilFunctionMaskMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, int mask ) { - typedef MessageValue1< Renderer, int > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -662,7 +662,7 @@ inline void SetStencilFunctionMaskMessage( EventThreadServices& eventThreadServi inline void SetStencilFunctionReferenceMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, int stencilFunctionReference ) { - typedef MessageValue1< Renderer, int > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -672,7 +672,7 @@ inline void SetStencilFunctionReferenceMessage( EventThreadServices& eventThread inline void SetStencilMaskMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, int stencilMask ) { - typedef MessageValue1< Renderer, int > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -682,7 +682,7 @@ inline void SetStencilMaskMessage( EventThreadServices& eventThreadServices, con inline void SetStencilOperationOnFailMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, StencilOperation::Type stencilOperation ) { - typedef MessageValue1< Renderer, StencilOperation::Type > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -692,7 +692,7 @@ inline void SetStencilOperationOnFailMessage( EventThreadServices& eventThreadSe inline void SetStencilOperationOnZFailMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, StencilOperation::Type stencilOperation ) { - typedef MessageValue1< Renderer, StencilOperation::Type > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -702,7 +702,7 @@ inline void SetStencilOperationOnZFailMessage( EventThreadServices& eventThreadS inline void SetStencilOperationOnZPassMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, StencilOperation::Type stencilOperation ) { - typedef MessageValue1< Renderer, StencilOperation::Type > LocalType; + using LocalType = MessageValue1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -712,7 +712,7 @@ inline void SetStencilOperationOnZPassMessage( EventThreadServices& eventThreadS inline void BakeOpacityMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, float opacity ) { - typedef MessageDoubleBuffered1< Renderer, float > LocalType; + using LocalType = MessageDoubleBuffered1; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -732,7 +732,7 @@ inline void SetRenderingBehaviorMessage( EventThreadServices& eventThreadService inline void SetDrawCommandsMessage( EventThreadServices& eventThreadServices, const Renderer& renderer, Dali::DevelRenderer::DrawCommand* pDrawCommands, uint32_t size ) { - typedef MessageValue2< Renderer, Dali::DevelRenderer::DrawCommand*, uint32_t > LocalType; + using LocalType = MessageValue2; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); diff --git a/dali/internal/update/rendering/scene-graph-texture-set.h b/dali/internal/update/rendering/scene-graph-texture-set.h index c850b3c..6a37f2b 100644 --- a/dali/internal/update/rendering/scene-graph-texture-set.h +++ b/dali/internal/update/rendering/scene-graph-texture-set.h @@ -144,7 +144,7 @@ private: // Data inline void SetTextureMessage( EventThreadServices& eventThreadServices, const TextureSet& textureSet, uint32_t index, Render::Texture* texture ) { - typedef MessageValue2< TextureSet, uint32_t, Render::Texture* > LocalType; + using LocalType = MessageValue2; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); @@ -155,7 +155,7 @@ inline void SetTextureMessage( EventThreadServices& eventThreadServices, const T inline void SetSamplerMessage( EventThreadServices& eventThreadServices, const TextureSet& textureSet, uint32_t index, Render::Sampler* sampler ) { - typedef MessageValue2< TextureSet, uint32_t, Render::Sampler* > LocalType; + using LocalType = MessageValue2; // Reserve some memory inside the message queue uint32_t* slot = eventThreadServices.ReserveMessageSlot( sizeof( LocalType ) ); diff --git a/dali/public-api/actors/actor.h b/dali/public-api/actors/actor.h index 7970256..da72ad2 100644 --- a/dali/public-api/actors/actor.h +++ b/dali/public-api/actors/actor.h @@ -56,7 +56,7 @@ struct Vector2; struct Vector3; struct Vector4; -typedef Rect Padding; ///< Padding definition @SINCE_1_0.0 +using Padding = Rect; ///< Padding definition @SINCE_1_0.0 /** * @brief Actor is the primary object with which Dali applications interact. @@ -730,13 +730,13 @@ public: // Typedefs - typedef Signal< bool (Actor, const TouchEvent&) > TouchEventSignalType; ///< Touch signal type @SINCE_1_1.37 - typedef Signal< bool (Actor, const HoverEvent&) > HoverSignalType; ///< Hover signal type @SINCE_1_0.0 - typedef Signal< bool (Actor, const WheelEvent&) > WheelEventSignalType; ///< Wheel signal type @SINCE_1_0.0 - typedef Signal< void (Actor) > OnSceneSignalType; ///< Scene connection signal type @SINCE_1_9.24 - typedef Signal< void (Actor) > OffSceneSignalType; ///< Scene disconnection signal type @SINCE_1_9.24 - typedef Signal< void (Actor) > OnRelayoutSignalType; ///< Called when the actor is relaid out @SINCE_1_0.0 - typedef Signal< void ( Actor, LayoutDirection::Type ) > LayoutDirectionChangedSignalType; ///< Layout direction changes signal type. @SINCE_1_2.60 + using TouchEventSignalType = Signal; ///< Touch signal type @SINCE_1_1.37 + using HoverSignalType = Signal; ///< Hover signal type @SINCE_1_0.0 + using WheelEventSignalType = Signal; ///< Wheel signal type @SINCE_1_0.0 + using OnSceneSignalType = Signal; ///< Scene connection signal type @SINCE_1_9.24 + using OffSceneSignalType = Signal; ///< Scene disconnection signal type @SINCE_1_9.24 + using OnRelayoutSignalType = Signal; ///< Called when the actor is relaid out @SINCE_1_0.0 + using LayoutDirectionChangedSignalType = Signal; ///< Layout direction changes signal type. @SINCE_1_2.60 // Creation diff --git a/dali/public-api/actors/custom-actor-impl.h b/dali/public-api/actors/custom-actor-impl.h index 9a978bc..9566e21 100644 --- a/dali/public-api/actors/custom-actor-impl.h +++ b/dali/public-api/actors/custom-actor-impl.h @@ -54,7 +54,7 @@ struct Vector3; * @brief Pointer to Dali::CustomActorImpl object. * @SINCE_1_0.0 */ -typedef IntrusivePtr CustomActorImplPtr; +using CustomActorImplPtr = IntrusivePtr; /** * @brief CustomActorImpl is an abstract base class for custom control implementations. diff --git a/dali/public-api/actors/layer.h b/dali/public-api/actors/layer.h index a8fbfef..5ae894b 100644 --- a/dali/public-api/actors/layer.h +++ b/dali/public-api/actors/layer.h @@ -45,7 +45,7 @@ class Layer; * @SINCE_1_0.0 * @see Dali::Layer::SetClippingBox() */ -typedef Rect ClippingBox; +using ClippingBox = Rect; /** * @brief Layers provide a mechanism for overlaying groups of actors on top of each other. @@ -218,7 +218,7 @@ public: * @SINCE_1_0.0 * @param[in] position This is the actor translation from camera */ - typedef float (*SortFunctionType)( const Vector3& position ); + using SortFunctionType = float ( * )( const Vector3& ); /** * @brief Creates an empty Layer handle. diff --git a/dali/public-api/animation/alpha-function.h b/dali/public-api/animation/alpha-function.h old mode 100755 new mode 100644 index 81133e1..3f5ac1a --- a/dali/public-api/animation/alpha-function.h +++ b/dali/public-api/animation/alpha-function.h @@ -33,9 +33,9 @@ namespace Dali * @{ */ -typedef float (*AlphaFunctionPrototype)(float progress); ///< Prototype of an alpha function @SINCE_1_0.0 +using AlphaFunctionPrototype = float ( * )( float ); ///< Prototype of an alpha function @SINCE_1_0.0 - /** +/** * @brief Alpha functions are used in animations to specify the rate of change of the animation parameter over time. * * Understanding an animation as a parametric function over time, the alpha function is applied to the parameter of diff --git a/dali/public-api/animation/animation.h b/dali/public-api/animation/animation.h index 644cfb5..8f3b187 100644 --- a/dali/public-api/animation/animation.h +++ b/dali/public-api/animation/animation.h @@ -123,10 +123,9 @@ class Animation; class DALI_CORE_API Animation : public BaseHandle { public: + using AnimationSignalType = Signal; ///< Animation finished signal type @SINCE_1_0.0 - typedef Signal< void (Animation&) > AnimationSignalType; ///< Animation finished signal type @SINCE_1_0.0 - - typedef Any AnyFunction; ///< Interpolation function @SINCE_1_0.0 + using AnyFunction = Any; ///< Interpolation function @SINCE_1_0.0 /** * @brief Enumeration for what to do when the animation ends, is stopped, or is destroyed. diff --git a/dali/public-api/animation/constraint.h b/dali/public-api/animation/constraint.h index 8dc25ea..52008ac 100644 --- a/dali/public-api/animation/constraint.h +++ b/dali/public-api/animation/constraint.h @@ -43,7 +43,7 @@ namespace Internal DALI_INTERNAL class ConstraintBase; } -typedef Vector< PropertyInput* > PropertyInputContainer; +using PropertyInputContainer = Vector; /** * @brief An abstract base class for Constraints. @@ -200,7 +200,7 @@ public: * @brief Used to call the function to copy the stored object. * @SINCE_1_0.0 */ - typedef UndefinedClass* (*CopyConstructorDispatcher) ( UndefinedClass* object ); + using CopyConstructorDispatcher = UndefinedClass* (*)( UndefinedClass* ); /** * @brief Copies the actual object in Constraint::Function. diff --git a/dali/public-api/common/dali-vector.h b/dali/public-api/common/dali-vector.h old mode 100755 new mode 100644 index 6396028..b76a1fa --- a/dali/public-api/common/dali-vector.h +++ b/dali/public-api/common/dali-vector.h @@ -62,8 +62,7 @@ namespace Dali class DALI_CORE_API VectorBase { public: // Typedefs - - typedef std::size_t SizeType; + using SizeType = std::size_t; protected: // Construction @@ -235,8 +234,7 @@ template< bool IsTrivial > class VectorAlgorithms : public VectorBase { protected: // API for deriving classes - - typedef VectorBase::SizeType SizeType; + using SizeType = VectorBase::SizeType; /** * @brief Empty constructor. @@ -420,10 +418,10 @@ public: // API * @brief Type definitions. * @SINCE_1_0.0 */ - typedef VectorBase::SizeType SizeType; ///< Size type @SINCE_1_0.0 - typedef T* Iterator; ///< Most simple Iterator is a pointer @SINCE_1_0.0 - typedef const T* ConstIterator; ///< Const iterator @SINCE_1_0.0 - typedef T ItemType; ///< Item type @SINCE_1_0.0 + using SizeType = VectorBase::SizeType; ///< Size type @SINCE_1_0.0 + using Iterator = T*; ///< Most simple Iterator is a pointer @SINCE_1_0.0 + using ConstIterator = const T*; ///< Const iterator @SINCE_1_0.0 + using ItemType = T; ///< Item type @SINCE_1_0.0 /** * @brief Enumeration for BaseType. diff --git a/dali/public-api/common/intrusive-ptr.h b/dali/public-api/common/intrusive-ptr.h index 873a998..d629382 100644 --- a/dali/public-api/common/intrusive-ptr.h +++ b/dali/public-api/common/intrusive-ptr.h @@ -254,7 +254,7 @@ public: * * Objects can be implicitly converted to this for validity checks. */ - typedef void (IntrusivePtr::*BooleanType)() const; + using BooleanType = void ( IntrusivePtr::* )() const; /** * @brief Converts an object handle to a BooleanType. diff --git a/dali/public-api/events/long-press-gesture-detector.h b/dali/public-api/events/long-press-gesture-detector.h index 5265842..7ab512c 100644 --- a/dali/public-api/events/long-press-gesture-detector.h +++ b/dali/public-api/events/long-press-gesture-detector.h @@ -64,8 +64,7 @@ class LongPressGesture; class DALI_CORE_API LongPressGestureDetector : public GestureDetector { public: // Typedefs - - typedef Signal< void ( Actor, const LongPressGesture& ) > DetectedSignalType; ///< Gesture detected signal type @SINCE_1_0.0 + using DetectedSignalType = Signal; ///< Gesture detected signal type @SINCE_1_0.0 public: // Creation & Destruction diff --git a/dali/public-api/events/pan-gesture-detector.h b/dali/public-api/events/pan-gesture-detector.h index ec687d3..64f5e3a 100644 --- a/dali/public-api/events/pan-gesture-detector.h +++ b/dali/public-api/events/pan-gesture-detector.h @@ -92,10 +92,10 @@ public: }; // Typedefs - typedef Signal< void ( Actor, const PanGesture& ) > DetectedSignalType; ///< Pan gesture detected signal type @SINCE_1_0.0 + using DetectedSignalType = Signal; ///< Pan gesture detected signal type @SINCE_1_0.0 // Directional Pan - typedef std::pair< Radian, Radian > AngleThresholdPair; ///< Range of angles for a direction @SINCE_1_0.0 + using AngleThresholdPair = std::pair; ///< Range of angles for a direction @SINCE_1_0.0 static const Radian DIRECTION_LEFT; ///< For a left pan (-PI Radians). static const Radian DIRECTION_RIGHT; ///< For a right pan (0 Radians). diff --git a/dali/public-api/events/pinch-gesture-detector.h b/dali/public-api/events/pinch-gesture-detector.h index 9daf911..d6c61a3 100644 --- a/dali/public-api/events/pinch-gesture-detector.h +++ b/dali/public-api/events/pinch-gesture-detector.h @@ -66,7 +66,7 @@ public: // Typedefs * @brief Signal type. * @SINCE_1_0.0 */ - typedef Signal< void ( Actor, const PinchGesture& ) > DetectedSignalType; + using DetectedSignalType = Signal; public: // Creation & Destruction diff --git a/dali/public-api/events/rotation-gesture-detector.h b/dali/public-api/events/rotation-gesture-detector.h index 4647801..edfe069 100644 --- a/dali/public-api/events/rotation-gesture-detector.h +++ b/dali/public-api/events/rotation-gesture-detector.h @@ -61,7 +61,7 @@ public: // Typedefs /** * @brief Signal type. */ - typedef Signal< void ( Actor, const RotationGesture& ) > DetectedSignalType; + using DetectedSignalType = Signal; public: // Creation & Destruction diff --git a/dali/public-api/events/tap-gesture-detector.h b/dali/public-api/events/tap-gesture-detector.h index 2c17c4e..2fbd806 100644 --- a/dali/public-api/events/tap-gesture-detector.h +++ b/dali/public-api/events/tap-gesture-detector.h @@ -75,7 +75,7 @@ public: // Typedefs * @brief Signal type for detected signal. * @SINCE_1_0.0 */ - typedef Signal< void ( Actor, const TapGesture& ) > DetectedSignalType; + using DetectedSignalType = Signal; public: // Creation & Destruction diff --git a/dali/public-api/images/image-operations.h b/dali/public-api/images/image-operations.h index 2253bdb..07b97df 100644 --- a/dali/public-api/images/image-operations.h +++ b/dali/public-api/images/image-operations.h @@ -37,7 +37,7 @@ namespace Dali * This can only be used for images of up to 65535 x 65535 pixels. * @SINCE_1_0.0 */ -typedef Dali::Uint16Pair ImageDimensions; +using ImageDimensions = Dali::Uint16Pair; /** * @brief Fitting options, used when resizing images to fit desired dimensions. diff --git a/dali/public-api/math/vector2.h b/dali/public-api/math/vector2.h index 200230a..7921719 100644 --- a/dali/public-api/math/vector2.h +++ b/dali/public-api/math/vector2.h @@ -478,7 +478,7 @@ public: // Data * @brief Size is an alias of Dali::Vector2. * @SINCE_1_0.0 */ -typedef Vector2 Size; +using Size = Vector2; /** * @brief Print a Vector2. diff --git a/dali/public-api/math/viewport.h b/dali/public-api/math/viewport.h index fa239c4..51932cc 100644 --- a/dali/public-api/math/viewport.h +++ b/dali/public-api/math/viewport.h @@ -35,7 +35,7 @@ namespace Dali * @brief Typedef for a viewport ( a rectangle representing a screen area ). * @SINCE_1_0.0 */ -typedef Rect Viewport; +using Viewport = Rect; /** * @} diff --git a/dali/public-api/object/any.h b/dali/public-api/object/any.h index b093822..bacab90 100644 --- a/dali/public-api/object/any.h +++ b/dali/public-api/object/any.h @@ -241,8 +241,9 @@ public: } struct AnyContainerBase; // Forward declaration for typedef - typedef AnyContainerBase* (*CloneFunc)( const AnyContainerBase& base ); - typedef void (*DeleteFunc)( const AnyContainerBase* base ); + using CloneFunc = AnyContainerBase* (*)( const AnyContainerBase& ); + + using DeleteFunc = void ( * )( const AnyContainerBase* ); /** * @brief Base container to hold type for match verification and instance cloning function. diff --git a/dali/public-api/object/base-handle.h b/dali/public-api/object/base-handle.h index a689502..e456a6e 100644 --- a/dali/public-api/object/base-handle.h +++ b/dali/public-api/object/base-handle.h @@ -219,7 +219,7 @@ public: * @brief Pointer-to-member type. * Objects can be implicitly converted to this for validity checks. */ - typedef void (BaseHandle::*BooleanType)() const; + using BooleanType = void ( BaseHandle::* )() const; /** * @brief Converts an handle to a BooleanType. diff --git a/dali/public-api/object/object-registry.h b/dali/public-api/object/object-registry.h index 29f626d..4c08e7e 100644 --- a/dali/public-api/object/object-registry.h +++ b/dali/public-api/object/object-registry.h @@ -66,13 +66,13 @@ public: * @brief Object created signal. * @SINCE_1_0.0 */ - typedef Signal< void ( BaseHandle ) > ObjectCreatedSignalType; + using ObjectCreatedSignalType = Signal; /** * @brief Object destroyed signal. * @SINCE_1_0.0 */ - typedef Signal< void ( const Dali::RefObject* ) > ObjectDestroyedSignalType; + using ObjectDestroyedSignalType = Signal; /** * @brief Allows the creation of an empty objectRegistry handle. diff --git a/dali/public-api/object/property-array.h b/dali/public-api/object/property-array.h old mode 100755 new mode 100644 index a862704..3296851 --- a/dali/public-api/object/property-array.h +++ b/dali/public-api/object/property-array.h @@ -41,8 +41,7 @@ namespace Dali class DALI_CORE_API Property::Array { public: - - typedef std::size_t SizeType; + using SizeType = std::size_t; /** * @brief Default constructor. diff --git a/dali/public-api/object/property-map.cpp b/dali/public-api/object/property-map.cpp index 80bcf16..a45cb3e 100644 --- a/dali/public-api/object/property-map.cpp +++ b/dali/public-api/object/property-map.cpp @@ -31,8 +31,8 @@ namespace { typedef std::vector< StringValuePair > StringValueContainer; -typedef std::pair< Property::Index, Property::Value > IndexValuePair; -typedef std::vector< IndexValuePair > IndexValueContainer; +using IndexValuePair = std::pair; +using IndexValueContainer = std::vector; }; // unnamed namespace diff --git a/dali/public-api/object/property-map.h b/dali/public-api/object/property-map.h old mode 100755 new mode 100644 index b35a5ad..259aaae --- a/dali/public-api/object/property-map.h +++ b/dali/public-api/object/property-map.h @@ -36,8 +36,8 @@ namespace Dali * @{ */ -typedef std::pair< Property::Key, Property::Value > KeyValuePair; -typedef std::pair StringValuePair; +using KeyValuePair = std::pair; +using StringValuePair = std::pair; /** * @brief A Map of property values, the key type could be String or Property::Index. @@ -46,8 +46,7 @@ typedef std::pair StringValuePair; class DALI_CORE_API Property::Map { public: - - typedef std::size_t SizeType; + using SizeType = std::size_t; /** * @brief Default constructor. diff --git a/dali/public-api/object/property-notification-declarations.h b/dali/public-api/object/property-notification-declarations.h index e88c5ce..34dfd31 100644 --- a/dali/public-api/object/property-notification-declarations.h +++ b/dali/public-api/object/property-notification-declarations.h @@ -35,7 +35,7 @@ class PropertyNotification; * @brief Signal type for Dali::PropertyNotification::NotifySignal(). * @SINCE_1_0.0 */ -typedef Signal< void (PropertyNotification& source) > PropertyNotifySignalType; +using PropertyNotifySignalType = Signal; /** * @} diff --git a/dali/public-api/object/property-value.h b/dali/public-api/object/property-value.h index d44349c..c503808 100755 --- a/dali/public-api/object/property-value.h +++ b/dali/public-api/object/property-value.h @@ -45,7 +45,7 @@ class Matrix3; class Matrix; struct Extents; -typedef std::pair< Property::Key, Property::Value > KeyValuePair; +using KeyValuePair = std::pair; /** * @brief A value-type representing a property value. diff --git a/dali/public-api/object/property.h b/dali/public-api/object/property.h index bf48f5c..eeda0c7 100644 --- a/dali/public-api/object/property.h +++ b/dali/public-api/object/property.h @@ -46,13 +46,13 @@ struct DALI_CORE_API Property * @brief A valid property index is zero or greater. * @SINCE_1_0.0 */ - typedef int32_t Index; + using Index = int32_t; static constexpr int32_t INVALID_INDEX{-1}; ///< -1 is not a valid property index static constexpr int32_t INVALID_KEY{-1}; ///< -1 is not a valid property key static constexpr int32_t INVALID_COMPONENT_INDEX{-1}; ///< -1 is not a valid property index - typedef Dali::Vector< Index > IndexContainer; ///< A vector of property indices @SINCE_1_0.0 + using IndexContainer = Dali::Vector; ///< A vector of property indices @SINCE_1_0.0 /** * @brief A value-type representing a property value. diff --git a/dali/public-api/render-tasks/render-task.h b/dali/public-api/render-tasks/render-task.h index 7c6d147..fa4d9da 100644 --- a/dali/public-api/render-tasks/render-task.h +++ b/dali/public-api/render-tasks/render-task.h @@ -131,7 +131,7 @@ public: * @brief Typedef for signals sent by this class. * @SINCE_1_0.0 */ - typedef Signal< void (RenderTask& source) > RenderTaskSignalType; + using RenderTaskSignalType = Signal; /** * @brief A pointer to a function for converting screen to frame-buffer coordinates. @@ -139,7 +139,7 @@ public: * @param[in,out] coordinates The screen coordinates to convert where (0,0) is the top-left of the screen * @return True if the conversion was successful, otherwise coordinates should be unmodified */ - typedef bool (* ScreenToFrameBufferFunction)( Vector2& coordinates ); + using ScreenToFrameBufferFunction = bool ( * )( Vector2& ); /** * @brief A pointer to a function for converting screen to frame-buffer coordinates. @@ -147,7 +147,7 @@ public: * @param[in,out] coordinates The screen coordinates to convert where (0,0) is the top-left of the screen * @return True if the conversion was successful, otherwise coordinates should be unmodified */ - typedef bool (* const ConstScreenToFrameBufferFunction)( Vector2& coordinates ); + using ConstScreenToFrameBufferFunction = bool ( *const )( Vector2& ); /** * @brief The default conversion function returns false for any screen coordinates. diff --git a/dali/public-api/signals/callback.h b/dali/public-api/signals/callback.h index efcb09d..2e068e0 100644 --- a/dali/public-api/signals/callback.h +++ b/dali/public-api/signals/callback.h @@ -106,13 +106,13 @@ public: // the code has to be loaded, otherwise we crash boom bang if( callback.mImpl && callback.mImpl->mObjectPointer ) { - typedef R(*Dispatcher)(CallbackBase& base); + using Dispatcher = R ( * )( CallbackBase& ); Dispatcher dispatcher = reinterpret_cast< Dispatcher >( callback.mImpl->mMemberFunctionDispatcher ); returnVal = (*dispatcher)( callback ); } else if( !callback.mImpl && callback.mFunction ) { - typedef R(*Function1)(); + using Function1 = R ( * )(); returnVal = (*(reinterpret_cast< Function1 >( callback.mFunction )))(); } @@ -136,14 +136,14 @@ public: // so the library containing the code has to be loaded, otherwise we crash boom bang if( callback.mImpl && callback.mImpl->mObjectPointer ) { - typedef void(*Dispatcher)(CallbackBase& base,P1); + using Dispatcher = void ( * )( CallbackBase&, P1 ); Dispatcher dispatcher = reinterpret_cast< Dispatcher >( callback.mImpl->mMemberFunctionDispatcher ); (*dispatcher)( callback, param1 ); } else if( !callback.mImpl && callback.mFunction ) { // convert function type - typedef void(*Function1)(P1); + using Function1 = void ( * )( P1 ); (*(reinterpret_cast< Function1 >( callback.mFunction )))( param1 ); } } @@ -167,14 +167,14 @@ public: // so the library containing the code has to be loaded, otherwise we crash boom bang if( callback.mImpl && callback.mImpl->mObjectPointer ) { - typedef R(*Dispatcher)(CallbackBase& base,P1); + using Dispatcher = R ( * )( CallbackBase&, P1 ); Dispatcher dispatcher = reinterpret_cast< Dispatcher >( callback.mImpl->mMemberFunctionDispatcher ); returnVal = (*dispatcher)( callback, param1 ); } else if( !callback.mImpl && callback.mFunction ) { // convert function type - typedef R(*Function1)(P1); + using Function1 = R ( * )( P1 ); returnVal = (*(reinterpret_cast< Function1 >( callback.mFunction )))( param1 ); } @@ -199,14 +199,14 @@ public: // so the library containing the code has to be loaded, otherwise we crash boom bang if( callback.mImpl && callback.mImpl->mObjectPointer ) { - typedef void(*Dispatcher)(CallbackBase& base,P1,P2); + using Dispatcher = void ( * )( CallbackBase&, P1, P2 ); Dispatcher dispatcher = reinterpret_cast< Dispatcher >( callback.mImpl->mMemberFunctionDispatcher ); (*dispatcher)( callback, param1, param2 ); } else if( !callback.mImpl && callback.mFunction ) { // convert function type - typedef void(*Function2)(P1,P2); + using Function2 = void ( * )( P1, P2 ); (*(reinterpret_cast< Function2 >( callback.mFunction )))( param1, param2 ); } } @@ -231,14 +231,14 @@ public: // so the library containing the code has to be loaded, otherwise we crash boom bang if( callback.mImpl && callback.mImpl->mObjectPointer ) { - typedef R(*Dispatcher)(CallbackBase& base,P1,P2); + using Dispatcher = R ( * )( CallbackBase&, P1, P2 ); Dispatcher dispatcher = reinterpret_cast< Dispatcher >( callback.mImpl->mMemberFunctionDispatcher ); returnVal = (*dispatcher)( callback, param1, param2 ); } else if( !callback.mImpl && callback.mFunction ) { // convert function type - typedef R(*Function2)(P1,P2); + using Function2 = R ( * )( P1, P2 ); returnVal = (*(reinterpret_cast< Function2 >( callback.mFunction )))( param1, param2 ); } @@ -264,14 +264,14 @@ public: // so the library containing the code has to be loaded, otherwise we crash boom bang if( callback.mImpl && callback.mImpl->mObjectPointer ) { - typedef void(*Dispatcher)(CallbackBase& base,P1,P2,P3); + using Dispatcher = void ( * )( CallbackBase&, P1, P2, P3 ); Dispatcher dispatcher = reinterpret_cast< Dispatcher >( callback.mImpl->mMemberFunctionDispatcher ); (*dispatcher)( callback, param1, param2, param3 ); } else if( !callback.mImpl && callback.mFunction ) { // convert function type - typedef void(*Function2)(P1,P2,P3); + using Function2 = void ( * )( P1, P2, P3 ); (*(reinterpret_cast< Function2 >( callback.mFunction )))( param1, param2, param3 ); } } @@ -297,14 +297,14 @@ public: // so the library containing the code has to be loaded, otherwise we crash boom bang if( callback.mImpl && callback.mImpl->mObjectPointer ) { - typedef R(*Dispatcher)(CallbackBase& base,P1,P2,P3); + using Dispatcher = R ( * )( CallbackBase&, P1, P2, P3 ); Dispatcher dispatcher = reinterpret_cast< Dispatcher >( callback.mImpl->mMemberFunctionDispatcher ); returnVal = (*dispatcher)( callback, param1, param2, param3 ); } else if( !callback.mImpl && callback.mFunction ) { // convert function type - typedef R(*Function2)(P1,P2,P3); + using Function2 = R ( * )( P1, P2, P3 ); returnVal = (*(reinterpret_cast< Function2 >( callback.mFunction )))( param1, param2, param3 ); } @@ -317,25 +317,25 @@ protected: // Constructors for deriving classes * @brief Function with static linkage. * @SINCE_1_0.0 */ - typedef void(*Function)(void); + using Function = void ( * )(); /** * @brief Member function. * @SINCE_1_0.0 */ - typedef void (CallbackBase::*MemberFunction)( void ); + using MemberFunction = void ( CallbackBase::* )(); /** * @brief Used to call the correct member function. * @SINCE_1_0.0 */ - typedef void (*Dispatcher)( CallbackBase& base ); + using Dispatcher = void ( * )( CallbackBase& ); /** * @brief Used to destroy mObjectPointer (NULL if not mObjectPointer is not owned). * @SINCE_1_0.0 */ - typedef void(*Destructor)(void* object); + using Destructor = void ( * )( void* ); /** * @brief Copy constructor operator not declared. @@ -450,7 +450,7 @@ struct Dispatcher0 { // "downcast" the object and function type back to the correct ones T* object = reinterpret_cast< T* >( callback.mImpl->mObjectPointer ); - typedef void(T::*MemberFunction)(void); + using MemberFunction = void ( T::* )(); MemberFunction function = reinterpret_cast< MemberFunction >( callback.mMemberFunction ); (object->*function)(); } @@ -474,7 +474,7 @@ struct Dispatcher1 { // "downcast" the object and function type back to the correct ones T* object = reinterpret_cast< T* >( callback.mImpl->mObjectPointer ); - typedef void(T::*MemberFunction)(P1); + using MemberFunction = void ( T::* )( P1 ); MemberFunction function = reinterpret_cast< MemberFunction >( callback.mMemberFunction ); (object->*function)( param1 ); } @@ -499,7 +499,7 @@ struct Dispatcher2 { // "downcast" the object and function type back to the correct ones T* object = reinterpret_cast< T* >( callback.mImpl->mObjectPointer ); - typedef void(T::*MemberFunction)(P1, P2); + using MemberFunction = void ( T::* )( P1, P2 ); MemberFunction function = reinterpret_cast< MemberFunction >( callback.mMemberFunction ); (object->*function)( param1, param2 ); } @@ -525,7 +525,7 @@ struct Dispatcher3 { // "downcast" the object and function type back to the correct ones T* object = reinterpret_cast< T* >( callback.mImpl->mObjectPointer ); - typedef void(T::*MemberFunction)(P1, P2, P3); + using MemberFunction = void ( T::* )( P1, P2, P3 ); MemberFunction function = reinterpret_cast< MemberFunction >( callback.mMemberFunction ); (object->*function)( param1, param2, param3 ); } @@ -549,7 +549,7 @@ struct DispatcherReturn0 { // "downcast" the object and function type back to the correct ones T* object = reinterpret_cast< T* >( callback.mImpl->mObjectPointer ); - typedef R(T::*MemberFunction)(void); + using MemberFunction = R ( T::* )(); MemberFunction function = reinterpret_cast< MemberFunction >( callback.mMemberFunction ); return (object->*function)(); } @@ -574,7 +574,7 @@ struct DispatcherReturn1 { // "downcast" the object and function type back to the correct ones T* object = reinterpret_cast< T* >( callback.mImpl->mObjectPointer ); - typedef R(T::*MemberFunction)(P1); + using MemberFunction = R ( T::* )( P1 ); MemberFunction function = reinterpret_cast< MemberFunction >( callback.mMemberFunction ); return (object->*function)( param1 ); } @@ -600,7 +600,7 @@ struct DispatcherReturn2 { // "downcast" the object and function type back to the correct ones T* object = reinterpret_cast< T* >( callback.mImpl->mObjectPointer ); - typedef R(T::*MemberFunction)(P1, P2); + using MemberFunction = R ( T::* )( P1, P2 ); MemberFunction function = reinterpret_cast< MemberFunction >( callback.mMemberFunction ); return (object->*function)( param1, param2 ); } @@ -627,7 +627,7 @@ struct DispatcherReturn3 { // "downcast" the object and function type back to the correct ones T* object = reinterpret_cast< T* >( callback.mImpl->mObjectPointer ); - typedef R(T::*MemberFunction)(P1, P2, P3); + using MemberFunction = R ( T::* )( P1, P2, P3 ); MemberFunction function = reinterpret_cast< MemberFunction >( callback.mMemberFunction ); return (object->*function)( param1, param2, param3 ); } @@ -836,7 +836,7 @@ struct VoidFunctorDispatcher0 { // "downcast" the object and function type back to the correct ones T* object = reinterpret_cast< T* >( callback.mImpl->mObjectPointer ); - typedef void(T::*MemberFunction)(void); + using MemberFunction = void ( T::* )(); MemberFunction function = reinterpret_cast< MemberFunction >( callback.mMemberFunction ); (object->*function)(); } @@ -862,7 +862,7 @@ struct VoidFunctorDispatcher1 { // "downcast" the object and function type back to the correct ones T* object = reinterpret_cast< T* >( callback.mImpl->mObjectPointer ); - typedef void(T::*MemberFunction)(void); + using MemberFunction = void ( T::* )(); MemberFunction function = reinterpret_cast< MemberFunction >( callback.mMemberFunction ); (object->*function)(/*ignore params*/); } @@ -889,7 +889,7 @@ struct VoidFunctorDispatcher2 { // "downcast" the object and function type back to the correct ones T* object = reinterpret_cast< T* >( callback.mImpl->mObjectPointer ); - typedef void(T::*MemberFunction)(void); + using MemberFunction = void ( T::* )(); MemberFunction function = reinterpret_cast< MemberFunction >( callback.mMemberFunction ); (object->*function)(/*ignore params*/); } @@ -917,7 +917,7 @@ struct VoidFunctorDispatcher3 { // "downcast" the object and function type back to the correct ones T* object = reinterpret_cast< T* >( callback.mImpl->mObjectPointer ); - typedef void(T::*MemberFunction)(void); + using MemberFunction = void ( T::* )(); MemberFunction function = reinterpret_cast< MemberFunction >( callback.mMemberFunction ); (object->*function)(/*ignore params*/); } @@ -943,7 +943,7 @@ struct VoidFunctorDispatcherReturn0 { // "downcast" the object and function type back to the correct ones T* object = reinterpret_cast< T* >( callback.mImpl->mObjectPointer ); - typedef void(T::*MemberFunction)(void); + using MemberFunction = void ( T::* )(); MemberFunction function = reinterpret_cast< MemberFunction >( callback.mMemberFunction ); (object->*function)(/*ignore params*/); return R(); @@ -971,7 +971,7 @@ struct VoidFunctorDispatcherReturn1 { // "downcast" the object and function type back to the correct ones T* object = reinterpret_cast< T* >( callback.mImpl->mObjectPointer ); - typedef void(T::*MemberFunction)(void); + using MemberFunction = void ( T::* )(); MemberFunction function = reinterpret_cast< MemberFunction >( callback.mMemberFunction ); (object->*function)(/*ignore params*/); return R(); @@ -1000,7 +1000,7 @@ struct VoidFunctorDispatcherReturn2 { // "downcast" the object and function type back to the correct ones T* object = reinterpret_cast< T* >( callback.mImpl->mObjectPointer ); - typedef void(T::*MemberFunction)(void); + using MemberFunction = void ( T::* )(); MemberFunction function = reinterpret_cast< MemberFunction >( callback.mMemberFunction ); (object->*function)(/*ignore params*/); return R(); @@ -1030,7 +1030,7 @@ struct VoidFunctorDispatcherReturn3 { // "downcast" the object and function type back to the correct ones T* object = reinterpret_cast< T* >( callback.mImpl->mObjectPointer ); - typedef void(T::*MemberFunction)(void); + using MemberFunction = void ( T::* )(); MemberFunction function = reinterpret_cast< MemberFunction >( callback.mMemberFunction ); (object->*function)(/*ignore params*/); return R(); diff --git a/dali/public-api/signals/functor-delegate.h b/dali/public-api/signals/functor-delegate.h index 7cfa51c..7832173 100644 --- a/dali/public-api/signals/functor-delegate.h +++ b/dali/public-api/signals/functor-delegate.h @@ -110,13 +110,13 @@ private: * @brief Used to call the correct function. * @SINCE_1_0.0 */ - typedef void (*Dispatcher)( void* objectPtr ); + using Dispatcher = void ( * )( void* ); /** * @brief Used to destroy mObjectPointer. * @SINCE_1_0.0 */ - typedef void(*Destructor)( void* objectPtr ); + using Destructor = void ( * )( void* ); /** * @brief Not defined. diff --git a/dali/public-api/size-negotiation/relayout-container.h b/dali/public-api/size-negotiation/relayout-container.h index a82a446..7cc2ae5 100644 --- a/dali/public-api/size-negotiation/relayout-container.h +++ b/dali/public-api/size-negotiation/relayout-container.h @@ -30,8 +30,7 @@ namespace Dali */ class RelayoutContainer; -typedef RelayoutContainer* RelayoutContainerPtr; - +using RelayoutContainerPtr = RelayoutContainer*; /** * @brief Interface to encapsulate information required for relayout.