Moved Dali::Vector functions to support C++11 range-based loop to Public API 35/153535/4
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Thu, 28 Sep 2017 17:03:41 +0000 (18:03 +0100)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Fri, 29 Sep 2017 09:28:29 +0000 (10:28 +0100)
Change-Id: Iebb3261eb8880d80e7a8a950f263510197ba7408

automated-tests/src/dali/utc-Dali-Vector.cpp
dali/devel-api/CMakeLists.txt
dali/devel-api/common/dali-vector-devel.h [deleted file]
dali/devel-api/common/owner-container.h
dali/devel-api/file.list
dali/internal/event/events/key-event-impl.cpp
dali/public-api/common/dali-vector.h

index 28fe6b6..c7fbe71 100644 (file)
@@ -20,7 +20,6 @@
 #include <iostream>
 #include <stdlib.h>
 #include <dali/public-api/dali-core.h>
-#include <dali/devel-api/common/dali-vector-devel.h>
 #include <dali-test-suite-utils.h>
 
 using namespace Dali;
index bcded75..7345f37 100644 (file)
@@ -32,7 +32,6 @@ SET( DEVEL_API_HEADERS
   ${CMAKE_CURRENT_SOURCE_DIR}/animation/animation-devel.h
 
   ${CMAKE_CURRENT_SOURCE_DIR}/common/circular-queue.h
-  ${CMAKE_CURRENT_SOURCE_DIR}/common/dali-vector-devel.h
   ${CMAKE_CURRENT_SOURCE_DIR}/common/hash.h
   ${CMAKE_CURRENT_SOURCE_DIR}/common/map-wrapper.h
   ${CMAKE_CURRENT_SOURCE_DIR}/common/owner-container.h
diff --git a/dali/devel-api/common/dali-vector-devel.h b/dali/devel-api/common/dali-vector-devel.h
deleted file mode 100644 (file)
index 08e3abf..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-#ifndef DALI_VECTOR_DEVEL_H
-#define DALI_VECTOR_DEVEL_H
-
-/*
- * Copyright (c) 2017 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-// EXTERNAL INCLUDES
-
-// INTERNAL INCLUDES
-#include <dali/public-api/common/dali-vector.h>
-
-namespace Dali
-{
-/**
- * Dali::Vector support for C++11 Range-based for loop: for( item : container )
- *
- * @param vector The vector to iterate
- * @return The start iterator
- */
-template< class T >
-typename T::Iterator begin( T& vector )
-{
-    return vector.Begin();
-}
-
-/**
- * Dali::Vector support for C++11 Range-based for loop: for( item : container )
- *
- * @param vector The vector to iterate
- * @return The end iterator
- */
-template< class T >
-typename T::Iterator end( T& vector )
-{
-    return vector.End();
-}
-
-} // namespace Dali
-
-#endif /* DALI_VECTOR_DEVEL_H */
index b5ac951..f35b278 100644 (file)
@@ -21,7 +21,6 @@
 // INTERNAL INCLUDES
 #include <dali/public-api/common/dali-common.h>
 #include <dali/public-api/common/dali-vector.h>
-#include <dali/devel-api/common/dali-vector-devel.h>
 
 namespace Dali
 {
index 85ddc1e..d0c6797 100644 (file)
@@ -34,7 +34,6 @@ devel_api_core_animation_header_files = \
 
 devel_api_core_common_header_files = \
   $(devel_api_src_dir)/common/circular-queue.h \
-  $(devel_api_src_dir)/common/dali-vector-devel.h \
   $(devel_api_src_dir)/common/hash.h \
   $(devel_api_src_dir)/common/map-wrapper.h \
   $(devel_api_src_dir)/common/owner-container.h \
index d686b83..68e9ad8 100644 (file)
@@ -20,7 +20,6 @@
 
 // INTERNAL INCLUDES
 #include <dali/public-api/common/dali-vector.h>
-#include <dali/devel-api/common/dali-vector-devel.h>
 
 namespace Dali
 {
index 916fed7..8d16df1 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_VECTOR_H__
 
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
@@ -489,6 +489,26 @@ public: // API
   }
 
   /**
+   * Support for C++11 Range-based for loop: for( item : container ).
+   * @SINCE_1_2.60
+   * @return The start iterator
+   */
+  Iterator begin() const
+  {
+    return Begin();
+  }
+
+  /**
+   * Support for C++11 Range-based for loop: for( item : container ).
+   * @SINCE_1_2.60
+   * @return The end iterator
+   */
+  Iterator end() const
+  {
+    return End();
+  }
+
+  /**
    * @brief Subscript operator.
    * @SINCE_1_0.0
    * @param[in] index Index of the element