24 #ifndef _CORE_UTILS_RWLOCK_VECTOR_H_
25 #define _CORE_UTILS_RWLOCK_VECTOR_H_
27 #include <core/threading/read_write_lock.h>
28 #include <core/utils/refptr.h>
34 template <
typename Type>
52 typename std::vector<Type>::iterator last);
72 template <
typename Type>
80 template <
typename Type>
87 template <
typename Type>
93 template <
typename Type>
97 rwlock_->lock_for_read();
101 template <
typename Type>
105 rwlock_->lock_for_write();
111 template <
typename Type>
115 return rwlock_->try_lock_for_read();
121 template <
typename Type>
125 return rwlock_->try_lock_for_write();
129 template <
typename Type>
133 return rwlock_->unlock();
139 template <
typename Type>
143 rwlock_->lock_for_write();
144 std::vector<Type>::push_back(x);
149 template <
typename Type>
153 rwlock_->lock_for_write();
154 std::vector<Type>::pop_back();
161 template <
typename Type>
165 rwlock_->lock_for_write();
166 std::vector<Type>::erase(pos);
174 template <
typename Type>
177 typename std::vector<Type>::iterator last)
179 rwlock_->lock_for_write();
180 std::vector<Type>::erase(first, last);
187 template <
typename Type>
200 template <
typename Type>
204 rwlock_->lock_for_write();
208 for (i = lv.begin(); i != lv.end(); ++i) {
223 template <
typename Type>
227 rwlock_->lock_for_write();
229 typename std::vector<Type>::const_iterator i;
230 for (i = v.begin(); i != v.end(); ++i) {