[dali_1.1.4] Merge branch 'devel/master'
[platform/core/uifw/dali-core.git] / dali / public-api / common / dali-vector.h
index 50f1220..0c06d84 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_VECTOR_H__
 
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2015 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.
 
 // EXTERNAL INCLUDES
 #include <cstddef>
+#include <algorithm>
 
 // INTERNAL INCLUDES
 #include <dali/public-api/common/dali-common.h>
+#include <dali/public-api/common/type-traits.h>
 #include <dali/public-api/math/math-utils.h>
 
 /**
 #define DALI_ASSERT_VECTOR(cond)
 #endif
 
-namespace Dali DALI_IMPORT_API
+namespace Dali
 {
+/**
+ * @addtogroup dali_core_common
+ * @{
+ */
 
 /**
  * @brief Base class to handle the memory of simple vector.
@@ -50,7 +56,7 @@ namespace Dali DALI_IMPORT_API
  * and capacity of the vector. mData is adjusted so that it points to the
  * beginning of the first real item so that iterating the items is quick.
  */
-class VectorBase
+class DALI_IMPORT_API VectorBase
 {
 public: // Typedefs
 
@@ -186,14 +192,6 @@ protected: // Data
 
 };
 
-} // namespace Dali
-
-/**
- * This template section does not need to be exported, it should use the visibility of the code its used in
- */
-namespace Dali
-{
-
 /**
  * @brief Vector algorithm variant for trivial types.
  *
@@ -364,7 +362,7 @@ private:
  *
  * @param type of the data that the vector holds.
  */
-template< class T, bool IsTrivialType = __has_trivial_destructor(T) && __has_trivial_copy(T) >
+template< class T, bool IsTrivialType = TypeTraits<T>::IS_TRIVIAL_TYPE == true >
 class Vector : public VectorAlgorithms< IsTrivialType >
 {
 public: // API
@@ -699,6 +697,9 @@ public: // API
   }
 };
 
+/**
+ * @}
+ */
 } // namespace Dali
 
 #endif /* __DALI_VECTOR_H__ */