Use modern construct 'using' instead of typedef.
[platform/core/uifw/dali-core.git] / dali / internal / common / shader-data.h
index 7aafbf4..b555f5f 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_INTERNAL_SHADER_DATA_H__
-#define __DALI_INTERNAL_SHADER_DATA_H__
+#ifndef DALI_INTERNAL_SHADER_DATA_H
+#define DALI_INTERNAL_SHADER_DATA_H
 
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,7 +33,7 @@ namespace Internal
 {
 
 class ShaderData;
-typedef IntrusivePtr<ShaderData> ShaderDataPtr;
+using ShaderDataPtr = IntrusivePtr<ShaderData>;
 
 /**
  * ShaderData class.
@@ -48,7 +48,7 @@ public:
    * @param[in] vertexSource   Source code for vertex program
    * @param[in] fragmentSource Source code for fragment program
    */
-  ShaderData(const std::string& vertexSource, const std::string& fragmentSource, const Dali::Shader::ShaderHints hints)
+  ShaderData(const std::string& vertexSource, const std::string& fragmentSource, const Dali::Shader::Hint::Value hints)
   : mShaderHash( -1 ),
     mVertexShader(vertexSource),
     mFragmentShader(fragmentSource),
@@ -106,7 +106,7 @@ public: // API
   /**
    * @return the hints
    */
-  Dali::Shader::ShaderHints GetHints() const
+  Dali::Shader::Hint::Value GetHints() const
   {
     return mHints;
   }
@@ -123,7 +123,7 @@ public: // API
    * Allocate a buffer for the compiled binary bytecode
    * @param[in] size  The size of the buffer in bytes
    */
-  void AllocateBuffer( size_t size )
+  void AllocateBuffer( std::size_t size )
   {
     mBuffer.Resize( size );
   }
@@ -132,7 +132,7 @@ public: // API
    * Get the program buffer
    * @return reference to the buffer
    */
-  size_t GetBufferSize() const
+  std::size_t GetBufferSize() const
   {
     return mBuffer.Size();
   }
@@ -141,7 +141,7 @@ public: // API
    * Get the data that the buffer points to
    * @return raw pointer to the buffer data
    */
-  unsigned char* GetBufferData()
+  uint8_t* GetBufferData()
   {
     DALI_ASSERT_DEBUG( mBuffer.Size() > 0 );
     return &mBuffer[0];
@@ -151,7 +151,7 @@ public: // API
    * Get the data that the buffer points to
    * @return raw pointer to the buffer data
    */
-  Dali::Vector<unsigned char>& GetBuffer()
+  Dali::Vector<uint8_t>& GetBuffer()
   {
     return mBuffer;
   }
@@ -163,15 +163,16 @@ private: // Not implemented
 
 private: // Data
 
-  size_t                      mShaderHash;     ///< hash key created with vertex and fragment shader code
-  std::string                 mVertexShader;   ///< source code for vertex program
-  std::string                 mFragmentShader; ///< source code for fragment program
-  Dali::Shader::ShaderHints   mHints;    ///< take a hint
-  Dali::Vector<unsigned char> mBuffer;         ///< buffer containing compiled binary bytecode
+  std::size_t               mShaderHash;     ///< hash key created with vertex and fragment shader code
+  std::string               mVertexShader;   ///< source code for vertex program
+  std::string               mFragmentShader; ///< source code for fragment program
+  Dali::Shader::Hint::Value mHints;          ///< take a hint
+  Dali::Vector<uint8_t>     mBuffer;         ///< buffer containing compiled binary bytecode
+
 };
 
 } // namespace Integration
 
 } // namespace Dali
 
-#endif // __DALI_INTERNAL_SHADER_DATA_H__
+#endif // DALI_INTERNAL_SHADER_DATA_H