+void Bufferable::change_buffer(Buffer *buf)
+{
+ for(Bufferable *b=this; b; b=b->next_in_buffer)
+ {
+ b->buffer = buf;
+ b->location_dirty = true;
+ b->dirty = true;
+ }
+ for(Bufferable *b=prev_in_buffer; b; b=b->prev_in_buffer)
+ {
+ b->buffer = buf;
+ b->location_dirty = true;
+ b->dirty = true;
+ }
+}
+
+unsigned Bufferable::get_required_buffer_size() const
+{
+ const Bufferable *last = this;
+ for(; last->next_in_buffer; last=last->next_in_buffer) ;
+ return last->offset+last->get_data_size();
+}
+
+Bufferable::AsyncUpdater *Bufferable::refresh_async() const
+{
+ return dirty ? new AsyncUpdater(*this) : 0;
+}
+