1 #ifndef __DALI_PROPERTY_ARRAY_H__
2 #define __DALI_PROPERTY_ARRAY_H__
5 * Copyright (c) 2015 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
25 #include <dali/public-api/common/dali-common.h>
26 #include <dali/public-api/object/property-value.h>
27 #include <dali/public-api/object/property.h>
33 * @brief A Array of property values.
35 class DALI_IMPORT_API Property::Array
40 * @brief Default constructor.
45 * @brief Copy Constructor.
47 * @param[in] other The Array to copy from.
49 Array( const Array& other );
52 * @brief Non-virtual destructor.
57 * @brief Retrieve the number of elements in the array.
59 * @return The number of elements in the array.
61 unsigned int Size() const;
64 * @brief Retrieve the number of elements in the array.
66 * @return The number of elements in the array.
68 unsigned int Count() const;
71 * @brief Returns whether the array is empty.
73 * @return true if empty, false otherwise
78 * @brief Clears the array.
83 * @brief Increase the capcity of the array.
85 void Reserve(size_t size);
88 * @brief Resize to size.
90 void Resize(size_t size);
93 * @brief Retrieve the capacity of the array.
95 * @return The allocated capacity of the array
100 * @brief Add an element to the array.
102 * @param[in] value The value to add to the end of the array
104 * @return The a reference to the element.
107 void PushBack(const Value& value);
110 * @brief Const operator to access an element.
112 * @param[in] index The element index to access. No bounds checking is performed.
114 * @return The a reference to the element.
117 const Value& operator[]( const size_t index ) const;
120 * @brief Operator to access an element.
122 * @param[in] index The element index to access. No bounds checking is performed.
124 * @return The a reference to the element.
127 Value& operator[]( const size_t index );
130 * @brief Assignment Operator
132 * @param[in] other The array to copy from.
134 * @return The copied array.
136 Array& operator=( const Array& other );
139 struct DALI_INTERNAL Impl; ///< Private data
140 Impl* mImpl; ///< Pointer to private data
145 #endif // __DALI_PROPERTY_ARRAY_H__