#include <text_base_types.h>
Public Member Functions | |
SafeDeque () | |
Constructors and destructors. | |
~SafeDeque () | |
size_t | size () |
bool | empty () |
T & | back () |
T & | front () |
T & | operator[] (unsigned int idx) |
void | push_back (const T &value) |
void | push_front (const T &value) |
void | clear () |
Definition at line 228 of file text_base_types.h.
text::SafeDeque< T >::SafeDeque | ( | ) | [inline] |
Constructors and destructors.
Definition at line 232 of file text_base_types.h.
text::SafeDeque< T >::~SafeDeque | ( | ) | [inline] |
Definition at line 237 of file text_base_types.h.
T& text::SafeDeque< T >::back | ( | ) | [inline] |
Definition at line 259 of file text_base_types.h.
Referenced by text::SafeDeque< PageInfo >::back(), and text::TextView::paginate().
00260 { 00261 g_static_rw_lock_reader_lock(&rw_lock); 00262 T& back = data.back(); 00263 g_static_rw_lock_reader_unlock(&rw_lock); 00264 return back; 00265 }
void text::SafeDeque< T >::clear | ( | void | ) | [inline] |
Definition at line 298 of file text_base_types.h.
Referenced by text::TextView::clear_pages(), and text::TextView::render().
00299 { 00300 g_static_rw_lock_writer_lock(&rw_lock); 00301 data.clear(); 00302 g_static_rw_lock_writer_unlock(&rw_lock); 00303 }
bool text::SafeDeque< T >::empty | ( | ) | [inline] |
Definition at line 251 of file text_base_types.h.
00252 { 00253 g_static_rw_lock_reader_lock(&rw_lock); 00254 bool is_empty = data.empty(); 00255 g_static_rw_lock_reader_unlock(&rw_lock); 00256 return is_empty; 00257 }
T& text::SafeDeque< T >::front | ( | ) | [inline] |
Definition at line 267 of file text_base_types.h.
Referenced by text::SafeDeque< PageInfo >::front(), and text::TextView::paginate().
00268 { 00269 g_static_rw_lock_reader_lock(&rw_lock); 00270 T& front = data.front(); 00271 g_static_rw_lock_reader_unlock(&rw_lock); 00272 return front; 00273 }
T& text::SafeDeque< T >::operator[] | ( | unsigned int | idx | ) | [inline] |
Definition at line 275 of file text_base_types.h.
00276 { 00277 g_static_rw_lock_reader_lock(&rw_lock); 00278 T& value = data[idx]; 00279 g_static_rw_lock_reader_unlock(&rw_lock); 00280 return value; 00281 }
void text::SafeDeque< T >::push_back | ( | const T & | value | ) | [inline] |
Definition at line 284 of file text_base_types.h.
Referenced by text::TextView::paginate().
00285 { 00286 g_static_rw_lock_writer_lock(&rw_lock); 00287 data.push_back(value); 00288 g_static_rw_lock_writer_unlock(&rw_lock); 00289 }
void text::SafeDeque< T >::push_front | ( | const T & | value | ) | [inline] |
Definition at line 291 of file text_base_types.h.
Referenced by text::TextView::paginate().
00292 { 00293 g_static_rw_lock_writer_lock(&rw_lock); 00294 data.push_front(value); 00295 g_static_rw_lock_writer_unlock(&rw_lock); 00296 }
size_t text::SafeDeque< T >::size | ( | ) | [inline] |
Definition at line 243 of file text_base_types.h.
Referenced by text::TextView::calculate_next_page_pos(), text::TextView::calculate_prev_page_pos(), text::TextView::check_page_table(), text::TextView::get_anchor_by_page(), text::TextView::get_page_anchor_by_anchor(), text::TextView::get_page_index_by_anchor(), text::TextView::paginate(), and text::SafeDeque< PageInfo >::size().
00244 { 00245 g_static_rw_lock_reader_lock(&rw_lock); 00246 size_t size = data.size(); 00247 g_static_rw_lock_reader_unlock(&rw_lock); 00248 return size; 00249 }