2 * Copyright (c) 2015 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 #include <dali/public-api/object/property-array.h>
22 #include <dali/public-api/common/vector-wrapper.h>
29 }; // unnamed namespace
31 struct Property::Array::Impl
33 typedef std::vector<Value> Array;
38 Property::Array::Array()
43 Property::Array::Array( const Property::Array& other )
46 mImpl->mArray = other.mImpl->mArray;
49 Property::Array::~Array()
55 unsigned int Property::Array::Size() const
57 return mImpl->mArray.size();
60 unsigned int Property::Array::Count() const
65 void Property::Array::PushBack(const Value& value)
67 mImpl->mArray.push_back( value );
70 bool Property::Array::Empty() const
72 return mImpl->mArray.empty();
75 void Property::Array::Clear()
77 mImpl->mArray.clear();
80 void Property::Array::Reserve(size_t size)
82 mImpl->mArray.reserve(size);
85 void Property::Array::Resize(size_t size)
87 mImpl->mArray.resize(size);
90 size_t Property::Array::Capacity()
92 return mImpl->mArray.capacity();
95 const Property::Value& Property::Array::operator[]( const std::size_t index ) const
97 return mImpl->mArray[ index ];
100 Property::Value& Property::Array::operator[]( const std::size_t index )
102 return mImpl->mArray[ index ];
105 Property::Array& Property::Array::operator=( const Property::Array& other )
111 mImpl->mArray = other.mImpl->mArray;