We now have a real list of displays.

displays can be dynamically added or removed, and the
list is part of the SF's transaction.

Change-Id: I4186ea39f1317c0e7c044f869004017738968fab
This commit is contained in:
Mathias Agopian 2012-08-02 18:32:23 -07:00 committed by Alex Ray
parent af1e7b7721
commit 67b5851491

View file

@ -56,7 +56,10 @@ public:
inline size_t capacity() const { return mVector.capacity(); }
//! setst the capacity. capacity can never be reduced less than size()
inline ssize_t setCapacity(size_t size) { return mVector.setCapacity(size); }
// returns true if the arguments is known to be identical to this vector
inline bool isIdenticalTo(const KeyedVector& rhs) const;
/*!
* accessors
*/
@ -64,6 +67,7 @@ public:
const VALUE& valueAt(size_t index) const;
const KEY& keyAt(size_t index) const;
ssize_t indexOfKey(const KEY& key) const;
const VALUE& operator[] (size_t index) const;
/*!
* modifying the array
@ -122,6 +126,11 @@ KeyedVector<KEY,VALUE>::KeyedVector()
{
}
template<typename KEY, typename VALUE> inline
bool KeyedVector<KEY,VALUE>::isIdenticalTo(const KeyedVector<KEY,VALUE>& rhs) const {
return mVector.array() == rhs.mVector.array();
}
template<typename KEY, typename VALUE> inline
ssize_t KeyedVector<KEY,VALUE>::indexOfKey(const KEY& key) const {
return mVector.indexOf( key_value_pair_t<KEY,VALUE>(key) );
@ -139,6 +148,11 @@ const VALUE& KeyedVector<KEY,VALUE>::valueAt(size_t index) const {
return mVector.itemAt(index).value;
}
template<typename KEY, typename VALUE> inline
const VALUE& KeyedVector<KEY,VALUE>::operator[] (size_t index) const {
return valueAt(index);
}
template<typename KEY, typename VALUE> inline
const KEY& KeyedVector<KEY,VALUE>::keyAt(size_t index) const {
return mVector.itemAt(index).key;